Skip to content

Commit

Permalink
zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c
Browse files Browse the repository at this point in the history
In commit 11fb479 ("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.

[[email protected]: remove dfltcc_syms.o from Makefile]
  Link: https://lkml.kernel.org/r/[email protected]

Link: https://lkml.kernel.org/r/[email protected]
Fixes: 11fb479 ("zlib: export S390 symbols for zlib modules")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Acked-by: Ilya Leoshkevich <[email protected]>
Acked-by: Christian Borntraeger <[email protected]>
Cc: Zaslonko Mikhail <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rddunlap authored and torvalds committed Dec 29, 2020
1 parent f0bb29e commit 605cc30
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/zlib_dfltcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

obj-$(CONFIG_ZLIB_DFLTCC) += zlib_dfltcc.o

zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o dfltcc_syms.o
zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o
6 changes: 5 additions & 1 deletion lib/zlib_dfltcc/dfltcc.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: Zlib
/* dfltcc.c - SystemZ DEFLATE CONVERSION CALL support. */

#include <linux/zutil.h>
#include <linux/export.h>
#include <linux/module.h>
#include "dfltcc_util.h"
#include "dfltcc.h"

Expand Down Expand Up @@ -53,3 +54,6 @@ void dfltcc_reset(
dfltcc_state->dht_threshold = DFLTCC_DHT_MIN_SAMPLE_SIZE;
dfltcc_state->param.ribm = DFLTCC_RIBM;
}
EXPORT_SYMBOL(dfltcc_reset);

MODULE_LICENSE("GPL");
3 changes: 3 additions & 0 deletions lib/zlib_dfltcc/dfltcc_deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "dfltcc_util.h"
#include "dfltcc.h"
#include <asm/setup.h>
#include <linux/export.h>
#include <linux/zutil.h>

/*
Expand Down Expand Up @@ -34,6 +35,7 @@ int dfltcc_can_deflate(

return 1;
}
EXPORT_SYMBOL(dfltcc_can_deflate);

static void dfltcc_gdht(
z_streamp strm
Expand Down Expand Up @@ -277,3 +279,4 @@ int dfltcc_deflate(
goto again; /* deflate() must use all input or all output */
return 1;
}
EXPORT_SYMBOL(dfltcc_deflate);
17 changes: 0 additions & 17 deletions lib/zlib_dfltcc/dfltcc_syms.c

This file was deleted.

0 comments on commit 605cc30

Please sign in to comment.