Message ID | 20201206061438.EIlu-Bvu8%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/12] zlib: export S390 symbols for zlib modules | expand |
Hello, should we probably put these to lib/zlib_dfltcc/dfltcc_syms.c along with the other EXPORT_SYMBOL statements? Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> On 06.12.2020 07:14, Andrew Morton wrote: > From: Randy Dunlap <rdunlap@infradead.org> > Subject: zlib: export S390 symbols for zlib modules > > Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y > by exporting the 2 needed symbols in dfltcc_inflate.c. > > Fixes these build errors: > > ERROR: modpost: "dfltcc_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! > ERROR: modpost: "dfltcc_can_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! > > Link: https://lkml.kernel.org/r/20201123191712.4882-1-rdunlap@infradead.org > Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Reported-by: kernel test robot <lkp@intel.com> > Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> > Cc: Mikhail Zaslonko <zaslonko@linux.ibm.com> > Cc: Heiko Carstens <hca@linux.ibm.com> > Cc: Vasily Gorbik <gor@linux.ibm.com> > Cc: Christian Borntraeger <borntraeger@de.ibm.com> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > > lib/zlib_dfltcc/dfltcc_inflate.c | 3 +++ > 1 file changed, 3 insertions(+) > > --- a/lib/zlib_dfltcc/dfltcc_inflate.c~zlib-export-s390-symbols-for-zlib-modules > +++ a/lib/zlib_dfltcc/dfltcc_inflate.c > @@ -4,6 +4,7 @@ > #include "dfltcc_util.h" > #include "dfltcc.h" > #include <asm/setup.h> > +#include <linux/export.h> > #include <linux/zutil.h> > > /* > @@ -29,6 +30,7 @@ int dfltcc_can_inflate( > return is_bit_set(dfltcc_state->af.fns, DFLTCC_XPND) && > is_bit_set(dfltcc_state->af.fmts, DFLTCC_FMT0); > } > +EXPORT_SYMBOL(dfltcc_can_inflate); > > static int dfltcc_was_inflate_used( > z_streamp strm > @@ -147,3 +149,4 @@ dfltcc_inflate_action dfltcc_inflate( > return (cc == DFLTCC_CC_OP1_TOO_SHORT || cc == DFLTCC_CC_OP2_TOO_SHORT) ? > DFLTCC_INFLATE_BREAK : DFLTCC_INFLATE_CONTINUE; > } > +EXPORT_SYMBOL(dfltcc_inflate); > _ >
On 12/7/20 1:03 AM, Zaslonko Mikhail wrote: > Hello, > > should we probably put these to lib/zlib_dfltcc/dfltcc_syms.c along with the other EXPORT_SYMBOL statements? Hi, I didn't know about that file. :) That change makes sense. At least that's how some modules used to do it. Not so much nowadays, but this one might as well consistent within itself. Do you want to fix it or should I? Thanks. > Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> > > On 06.12.2020 07:14, Andrew Morton wrote: >> From: Randy Dunlap <rdunlap@infradead.org> >> Subject: zlib: export S390 symbols for zlib modules >> >> Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y >> by exporting the 2 needed symbols in dfltcc_inflate.c. >> >> Fixes these build errors: >> >> ERROR: modpost: "dfltcc_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! >> ERROR: modpost: "dfltcc_can_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! >> >> Link: https://lkml.kernel.org/r/20201123191712.4882-1-rdunlap@infradead.org >> Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate") >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >> Reported-by: kernel test robot <lkp@intel.com> >> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> >> Cc: Mikhail Zaslonko <zaslonko@linux.ibm.com> >> Cc: Heiko Carstens <hca@linux.ibm.com> >> Cc: Vasily Gorbik <gor@linux.ibm.com> >> Cc: Christian Borntraeger <borntraeger@de.ibm.com> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> >> --- >> >> lib/zlib_dfltcc/dfltcc_inflate.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> --- a/lib/zlib_dfltcc/dfltcc_inflate.c~zlib-export-s390-symbols-for-zlib-modules >> +++ a/lib/zlib_dfltcc/dfltcc_inflate.c >> @@ -4,6 +4,7 @@ >> #include "dfltcc_util.h" >> #include "dfltcc.h" >> #include <asm/setup.h> >> +#include <linux/export.h> >> #include <linux/zutil.h> >> >> /* >> @@ -29,6 +30,7 @@ int dfltcc_can_inflate( >> return is_bit_set(dfltcc_state->af.fns, DFLTCC_XPND) && >> is_bit_set(dfltcc_state->af.fmts, DFLTCC_FMT0); >> } >> +EXPORT_SYMBOL(dfltcc_can_inflate); >> >> static int dfltcc_was_inflate_used( >> z_streamp strm >> @@ -147,3 +149,4 @@ dfltcc_inflate_action dfltcc_inflate( >> return (cc == DFLTCC_CC_OP1_TOO_SHORT || cc == DFLTCC_CC_OP2_TOO_SHORT) ? >> DFLTCC_INFLATE_BREAK : DFLTCC_INFLATE_CONTINUE; >> } >> +EXPORT_SYMBOL(dfltcc_inflate); >> _ >>
On 08.12.2020 01:45, Randy Dunlap wrote: > On 12/7/20 1:03 AM, Zaslonko Mikhail wrote: >> Hello, >> >> should we probably put these to lib/zlib_dfltcc/dfltcc_syms.c along with the other EXPORT_SYMBOL statements? > > Hi, > I didn't know about that file. :) > > That change makes sense. At least that's how some modules used > to do it. Not so much nowadays, but this one might as well > consistent within itself. > > Do you want to fix it or should I? Please, go ahead. Thanks. > > Thanks. > >> Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> >> >> On 06.12.2020 07:14, Andrew Morton wrote: >>> From: Randy Dunlap <rdunlap@infradead.org> >>> Subject: zlib: export S390 symbols for zlib modules >>> >>> Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y >>> by exporting the 2 needed symbols in dfltcc_inflate.c. >>> >>> Fixes these build errors: >>> >>> ERROR: modpost: "dfltcc_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! >>> ERROR: modpost: "dfltcc_can_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! >>> >>> Link: https://lkml.kernel.org/r/20201123191712.4882-1-rdunlap@infradead.org >>> Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate") >>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >>> Reported-by: kernel test robot <lkp@intel.com> >>> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> >>> Cc: Mikhail Zaslonko <zaslonko@linux.ibm.com> >>> Cc: Heiko Carstens <hca@linux.ibm.com> >>> Cc: Vasily Gorbik <gor@linux.ibm.com> >>> Cc: Christian Borntraeger <borntraeger@de.ibm.com> >>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> >>> --- >>> >>> lib/zlib_dfltcc/dfltcc_inflate.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> --- a/lib/zlib_dfltcc/dfltcc_inflate.c~zlib-export-s390-symbols-for-zlib-modules >>> +++ a/lib/zlib_dfltcc/dfltcc_inflate.c >>> @@ -4,6 +4,7 @@ >>> #include "dfltcc_util.h" >>> #include "dfltcc.h" >>> #include <asm/setup.h> >>> +#include <linux/export.h> >>> #include <linux/zutil.h> >>> >>> /* >>> @@ -29,6 +30,7 @@ int dfltcc_can_inflate( >>> return is_bit_set(dfltcc_state->af.fns, DFLTCC_XPND) && >>> is_bit_set(dfltcc_state->af.fmts, DFLTCC_FMT0); >>> } >>> +EXPORT_SYMBOL(dfltcc_can_inflate); >>> >>> static int dfltcc_was_inflate_used( >>> z_streamp strm >>> @@ -147,3 +149,4 @@ dfltcc_inflate_action dfltcc_inflate( >>> return (cc == DFLTCC_CC_OP1_TOO_SHORT || cc == DFLTCC_CC_OP2_TOO_SHORT) ? >>> DFLTCC_INFLATE_BREAK : DFLTCC_INFLATE_CONTINUE; >>> } >>> +EXPORT_SYMBOL(dfltcc_inflate); >>> _ >>> > >
On 12/8/20 12:19 AM, Zaslonko Mikhail wrote: > > > On 08.12.2020 01:45, Randy Dunlap wrote: >> On 12/7/20 1:03 AM, Zaslonko Mikhail wrote: >>> Hello, >>> >>> should we probably put these to lib/zlib_dfltcc/dfltcc_syms.c along with the other EXPORT_SYMBOL statements? >> >> Hi, >> I didn't know about that file. :) >> >> That change makes sense. At least that's how some modules used >> to do it. Not so much nowadays, but this one might as well >> consistent within itself. >> >> Do you want to fix it or should I? > > Please, go ahead. > > Thanks. Hi, How do you feel about eliminating the dfltcc_syms.c file and putting the EXPORT_SYMBOL()s in the source file(s) where they occur? as expressed in coding-style.rst: In source files, separate functions with one blank line. If the function is exported, the **EXPORT** macro for it should follow immediately after the closing function brace line. (also move the MODULE_LICENSE() to a different source file.) >> >> Thanks. >> >>> Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> >>> >>> On 06.12.2020 07:14, Andrew Morton wrote: >>>> From: Randy Dunlap <rdunlap@infradead.org> >>>> Subject: zlib: export S390 symbols for zlib modules >>>> >>>> Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y >>>> by exporting the 2 needed symbols in dfltcc_inflate.c. thanks.
--- a/lib/zlib_dfltcc/dfltcc_inflate.c~zlib-export-s390-symbols-for-zlib-modules +++ a/lib/zlib_dfltcc/dfltcc_inflate.c @@ -4,6 +4,7 @@ #include "dfltcc_util.h" #include "dfltcc.h" #include <asm/setup.h> +#include <linux/export.h> #include <linux/zutil.h> /* @@ -29,6 +30,7 @@ int dfltcc_can_inflate( return is_bit_set(dfltcc_state->af.fns, DFLTCC_XPND) && is_bit_set(dfltcc_state->af.fmts, DFLTCC_FMT0); } +EXPORT_SYMBOL(dfltcc_can_inflate); static int dfltcc_was_inflate_used( z_streamp strm @@ -147,3 +149,4 @@ dfltcc_inflate_action dfltcc_inflate( return (cc == DFLTCC_CC_OP1_TOO_SHORT || cc == DFLTCC_CC_OP2_TOO_SHORT) ? DFLTCC_INFLATE_BREAK : DFLTCC_INFLATE_CONTINUE; } +EXPORT_SYMBOL(dfltcc_inflate);