All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c
@ 2020-12-19  5:25 Randy Dunlap
  2020-12-23 17:16 ` Christian Borntraeger
  2020-12-27  6:24   ` kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2020-12-19  5:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Zaslonko Mikhail, Andrew Morton,
	Acked-by : Ilya Leoshkevich, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger

In 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.

Fixes: 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Zaslonko Mikhail <zaslonko@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
---
 lib/zlib_dfltcc/dfltcc.c         |    6 +++++-
 lib/zlib_dfltcc/dfltcc_deflate.c |    3 +++
 lib/zlib_dfltcc/dfltcc_syms.c    |   17 -----------------
 3 files changed, 8 insertions(+), 18 deletions(-)

--- linux-next-20201218.orig/lib/zlib_dfltcc/dfltcc.c
+++ linux-next-20201218/lib/zlib_dfltcc/dfltcc.c
@@ -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"
 
@@ -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");
--- linux-next-20201218.orig/lib/zlib_dfltcc/dfltcc_deflate.c
+++ linux-next-20201218/lib/zlib_dfltcc/dfltcc_deflate.c
@@ -4,6 +4,7 @@
 #include "dfltcc_util.h"
 #include "dfltcc.h"
 #include <asm/setup.h>
+#include <linux/export.h>
 #include <linux/zutil.h>
 
 /*
@@ -34,6 +35,7 @@ int dfltcc_can_deflate(
 
     return 1;
 }
+EXPORT_SYMBOL(dfltcc_can_deflate);
 
 static void dfltcc_gdht(
     z_streamp strm
@@ -277,3 +279,4 @@ again:
         goto again; /* deflate() must use all input or all output */
     return 1;
 }
+EXPORT_SYMBOL(dfltcc_deflate);
--- linux-next-20201218.orig/lib/zlib_dfltcc/dfltcc_syms.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * linux/lib/zlib_dfltcc/dfltcc_syms.c
- *
- * Exported symbols for the s390 zlib dfltcc support.
- *
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/zlib.h>
-#include "dfltcc.h"
-
-EXPORT_SYMBOL(dfltcc_can_deflate);
-EXPORT_SYMBOL(dfltcc_deflate);
-EXPORT_SYMBOL(dfltcc_reset);
-MODULE_LICENSE("GPL");

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c
  2020-12-19  5:25 [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c Randy Dunlap
@ 2020-12-23 17:16 ` Christian Borntraeger
  2020-12-27  6:24   ` kernel test robot
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2020-12-23 17:16 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Zaslonko Mikhail, Andrew Morton, Acked-by : Ilya Leoshkevich,
	Heiko Carstens, Vasily Gorbik



On 19.12.20 06:25, Randy Dunlap wrote:
> In 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.
> 
> Fixes: 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Zaslonko Mikhail <zaslonko@linux.ibm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>

Makes sense
I see that Andrew has already picked this up, in case this helps

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  lib/zlib_dfltcc/dfltcc.c         |    6 +++++-
>  lib/zlib_dfltcc/dfltcc_deflate.c |    3 +++
>  lib/zlib_dfltcc/dfltcc_syms.c    |   17 -----------------
>  3 files changed, 8 insertions(+), 18 deletions(-)
> 
> --- linux-next-20201218.orig/lib/zlib_dfltcc/dfltcc.c
> +++ linux-next-20201218/lib/zlib_dfltcc/dfltcc.c
> @@ -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"
>  
> @@ -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");
> --- linux-next-20201218.orig/lib/zlib_dfltcc/dfltcc_deflate.c
> +++ linux-next-20201218/lib/zlib_dfltcc/dfltcc_deflate.c
> @@ -4,6 +4,7 @@
>  #include "dfltcc_util.h"
>  #include "dfltcc.h"
>  #include <asm/setup.h>
> +#include <linux/export.h>
>  #include <linux/zutil.h>
>  
>  /*
> @@ -34,6 +35,7 @@ int dfltcc_can_deflate(
>  
>      return 1;
>  }
> +EXPORT_SYMBOL(dfltcc_can_deflate);
>  
>  static void dfltcc_gdht(
>      z_streamp strm
> @@ -277,3 +279,4 @@ again:
>          goto again; /* deflate() must use all input or all output */
>      return 1;
>  }
> +EXPORT_SYMBOL(dfltcc_deflate);
> --- linux-next-20201218.orig/lib/zlib_dfltcc/dfltcc_syms.c
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-only
> -/*
> - * linux/lib/zlib_dfltcc/dfltcc_syms.c
> - *
> - * Exported symbols for the s390 zlib dfltcc support.
> - *
> - */
> -
> -#include <linux/init.h>
> -#include <linux/module.h>
> -#include <linux/zlib.h>
> -#include "dfltcc.h"
> -
> -EXPORT_SYMBOL(dfltcc_can_deflate);
> -EXPORT_SYMBOL(dfltcc_deflate);
> -EXPORT_SYMBOL(dfltcc_reset);
> -MODULE_LICENSE("GPL");
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c
  2020-12-19  5:25 [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c Randy Dunlap
@ 2020-12-27  6:24   ` kernel test robot
  2020-12-27  6:24   ` kernel test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-12-27  6:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1853 bytes --]

Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.10 next-20201223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/zlib-move-EXPORT_SYMBOL-and-MODULE_LICENSE-out-of-dfltcc_syms-c/20201219-133014
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/df58521cca1c606bd9f91f0a03441f38f57cac65
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Randy-Dunlap/zlib-move-EXPORT_SYMBOL-and-MODULE_LICENSE-out-of-dfltcc_syms-c/20201219-133014
        git checkout df58521cca1c606bd9f91f0a03441f38f57cac65
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> make[3]: *** No rule to make target 'lib/zlib_dfltcc/dfltcc_syms.o', needed by 'lib/zlib_dfltcc/built-in.a'.
   make[3]: Target '__build' not remade because of errors.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 51600 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c
@ 2020-12-27  6:24   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-12-27  6:24 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: kbuild-all, Randy Dunlap, Zaslonko Mikhail, Andrew Morton,
	Linux Memory Management List, Acked-by : Ilya Leoshkevich,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.10 next-20201223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/zlib-move-EXPORT_SYMBOL-and-MODULE_LICENSE-out-of-dfltcc_syms-c/20201219-133014
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/df58521cca1c606bd9f91f0a03441f38f57cac65
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Randy-Dunlap/zlib-move-EXPORT_SYMBOL-and-MODULE_LICENSE-out-of-dfltcc_syms-c/20201219-133014
        git checkout df58521cca1c606bd9f91f0a03441f38f57cac65
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> make[3]: *** No rule to make target 'lib/zlib_dfltcc/dfltcc_syms.o', needed by 'lib/zlib_dfltcc/built-in.a'.
   make[3]: Target '__build' not remade because of errors.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51600 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-27  6:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-19  5:25 [PATCH] zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c Randy Dunlap
2020-12-23 17:16 ` Christian Borntraeger
2020-12-27  6:24 ` kernel test robot
2020-12-27  6:24   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.