Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c

In commit 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules"), I
added EXPORT_SYMBOL()s to dfltcc_inflate.c but then Mikhail said that
these should probably be in dfltcc_syms.c with the other
EXPORT_SYMBOL()s.

However, that is contrary to the current kernel style, which places
EXPORT_SYMBOL() immediately after the function that it applies to, so
move all EXPORT_SYMBOL()s to their respective function locations and
drop the dfltcc_syms.c file. Also move MODULE_LICENSE() from the
deleted file to dfltcc.c.

[rdunlap@infradead.org: remove dfltcc_syms.o from Makefile]
Link: https://lkml.kernel.org/r/20201227171837.15492-1-rdunlap@infradead.org

Link: https://lkml.kernel.org/r/20201219052530.28461-1-rdunlap@infradead.org
Fixes: 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Zaslonko Mikhail <zaslonko@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Randy Dunlap and committed by
Linus Torvalds
605cc30d f0bb29e8

+9 -19
+1 -1
lib/zlib_dfltcc/Makefile
··· 8 8 9 9 obj-$(CONFIG_ZLIB_DFLTCC) += zlib_dfltcc.o 10 10 11 - zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o dfltcc_syms.o 11 + zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o
+5 -1
lib/zlib_dfltcc/dfltcc.c
··· 1 1 // SPDX-License-Identifier: Zlib 2 2 /* dfltcc.c - SystemZ DEFLATE CONVERSION CALL support. */ 3 3 4 - #include <linux/zutil.h> 4 + #include <linux/export.h> 5 + #include <linux/module.h> 5 6 #include "dfltcc_util.h" 6 7 #include "dfltcc.h" 7 8 ··· 54 53 dfltcc_state->dht_threshold = DFLTCC_DHT_MIN_SAMPLE_SIZE; 55 54 dfltcc_state->param.ribm = DFLTCC_RIBM; 56 55 } 56 + EXPORT_SYMBOL(dfltcc_reset); 57 + 58 + MODULE_LICENSE("GPL");
+3
lib/zlib_dfltcc/dfltcc_deflate.c
··· 4 4 #include "dfltcc_util.h" 5 5 #include "dfltcc.h" 6 6 #include <asm/setup.h> 7 + #include <linux/export.h> 7 8 #include <linux/zutil.h> 8 9 9 10 /* ··· 35 34 36 35 return 1; 37 36 } 37 + EXPORT_SYMBOL(dfltcc_can_deflate); 38 38 39 39 static void dfltcc_gdht( 40 40 z_streamp strm ··· 279 277 goto again; /* deflate() must use all input or all output */ 280 278 return 1; 281 279 } 280 + EXPORT_SYMBOL(dfltcc_deflate);
-17
lib/zlib_dfltcc/dfltcc_syms.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * linux/lib/zlib_dfltcc/dfltcc_syms.c 4 - * 5 - * Exported symbols for the s390 zlib dfltcc support. 6 - * 7 - */ 8 - 9 - #include <linux/init.h> 10 - #include <linux/module.h> 11 - #include <linux/zlib.h> 12 - #include "dfltcc.h" 13 - 14 - EXPORT_SYMBOL(dfltcc_can_deflate); 15 - EXPORT_SYMBOL(dfltcc_deflate); 16 - EXPORT_SYMBOL(dfltcc_reset); 17 - MODULE_LICENSE("GPL");