diff mbox series

scsi: do not put scsi_common in a separate module

Message ID 20221123131801.4409-1-hare@suse.de (mailing list archive)
State Changes Requested
Headers show
Series scsi: do not put scsi_common in a separate module | expand

Commit Message

Hannes Reinecke Nov. 23, 2022, 1:18 p.m. UTC
scsi_common.ko is a tiny module which is not shared with anything,
so include it in scsi_mod.ko like the rest of the files.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Nov. 23, 2022, 1:20 p.m. UTC | #1
On Wed, Nov 23, 2022 at 02:18:01PM +0100, Hannes Reinecke wrote:
> scsi_common.ko is a tiny module which is not shared with anything,
> so include it in scsi_mod.ko like the rest of the files.

It is shared between the scsi initiator and target code.
kernel test robot Nov. 24, 2022, 12:29 p.m. UTC | #2
Hi Hannes,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on jejb-scsi/for-next linus/master v6.1-rc6 next-20221124]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hannes-Reinecke/scsi-do-not-put-scsi_common-in-a-separate-module/20221123-213847
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20221123131801.4409-1-hare%40suse.de
patch subject: [PATCH] scsi: do not put scsi_common in a separate module
config: arc-randconfig-m041-20221122
compiler: arc-elf-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/7f10f5c8423c80a4a9069fd81733035b88409baf
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hannes-Reinecke/scsi-do-not-put-scsi_common-in-a-separate-module/20221123-213847
        git checkout 7f10f5c8423c80a4a9069fd81733035b88409baf
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   arc-elf-ld: drivers/target/target_core_transport.o: in function `scsi_command_size':
   target_core_transport.c:(.text+0x58): undefined reference to `scsi_command_size_tbl'
>> arc-elf-ld: target_core_transport.c:(.text+0x58): undefined reference to `scsi_command_size_tbl'
   arc-elf-ld: drivers/target/target_core_transport.o: in function `translate_sense_reason':
   target_core_transport.c:(.text+0x4a2): undefined reference to `scsi_build_sense_buffer'
>> arc-elf-ld: target_core_transport.c:(.text+0x4a2): undefined reference to `scsi_build_sense_buffer'
>> arc-elf-ld: target_core_transport.c:(.text+0x4b2): undefined reference to `scsi_set_sense_information'
>> arc-elf-ld: target_core_transport.c:(.text+0x4b2): undefined reference to `scsi_set_sense_information'
   arc-elf-ld: drivers/target/target_core_spc.o: in function `spc_emulate_request_sense':
   target_core_spc.c:(.text+0x920): undefined reference to `scsi_build_sense_buffer'
>> arc-elf-ld: target_core_spc.c:(.text+0x920): undefined reference to `scsi_build_sense_buffer'
   arc-elf-ld: drivers/target/target_core_spc.o: in function `spc_emulate_report_luns':
   target_core_spc.c:(.text+0xf50): undefined reference to `int_to_scsilun'
>> arc-elf-ld: target_core_spc.c:(.text+0xf50): undefined reference to `int_to_scsilun'
   arc-elf-ld: target_core_spc.c:(.text+0xf8e): undefined reference to `int_to_scsilun'
   arc-elf-ld: target_core_spc.c:(.text+0xf8e): undefined reference to `int_to_scsilun'
kernel test robot Nov. 24, 2022, 4:21 p.m. UTC | #3
Hi Hannes,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on jejb-scsi/for-next linus/master v6.1-rc6]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hannes-Reinecke/scsi-do-not-put-scsi_common-in-a-separate-module/20221123-213847
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20221123131801.4409-1-hare%40suse.de
patch subject: [PATCH] scsi: do not put scsi_common in a separate module
config: microblaze-randconfig-c043-20221124
compiler: microblaze-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/7f10f5c8423c80a4a9069fd81733035b88409baf
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hannes-Reinecke/scsi-do-not-put-scsi_common-in-a-separate-module/20221123-213847
        git checkout 7f10f5c8423c80a4a9069fd81733035b88409baf
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   microblaze-linux-ld: drivers/target/target_core_transport.o: in function `scsi_command_size':
>> target_core_transport.o:(.text+0xb4): undefined reference to `scsi_command_size_tbl'
   microblaze-linux-ld: drivers/target/target_core_transport.o: in function `scsi_command_control':
   target_core_transport.o:(.text+0xf4): undefined reference to `scsi_command_size_tbl'
   microblaze-linux-ld: drivers/target/target_core_transport.o: in function `translate_sense_reason':
>> target_core_transport.o:(.text+0xf78): undefined reference to `scsi_build_sense_buffer'
>> microblaze-linux-ld: target_core_transport.o:(.text+0xfac): undefined reference to `scsi_set_sense_information'
   microblaze-linux-ld: drivers/target/target_core_spc.o: in function `spc_emulate_report_luns':
>> (.text+0xff8): undefined reference to `int_to_scsilun'
>> microblaze-linux-ld: (.text+0x1140): undefined reference to `int_to_scsilun'
   microblaze-linux-ld: drivers/target/target_core_spc.o: in function `spc_emulate_request_sense':
>> target_core_spc.o:(.text+0x1798): undefined reference to `scsi_build_sense_buffer'
   microblaze-linux-ld: drivers/target/sbp/sbp_target.o: in function `sbp_fetch_command':
>> .tmp_gl_sbp_target.o:(.text+0x344c): undefined reference to `scsi_command_size_tbl'
   microblaze-linux-ld: drivers/vhost/scsi.o: in function `vhost_scsi_handle_vq':
>> .tmp_gl_scsi.o:(.text+0x73a4): undefined reference to `scsi_command_size_tbl'
diff mbox series

Patch

diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index f055bfd54a68..d9f5f27246b1 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -20,7 +20,6 @@  CFLAGS_aha152x.o =   -DAHA152X_STAT -DAUTOCONF
 obj-$(CONFIG_PCMCIA)		+= pcmcia/
 
 obj-$(CONFIG_SCSI)		+= scsi_mod.o
-obj-$(CONFIG_SCSI_COMMON)	+= scsi_common.o
 
 obj-$(CONFIG_RAID_ATTRS)	+= raid_class.o
 
@@ -167,6 +166,7 @@  scsi_mod-y			+= scsi_trace.o scsi_logging.o
 scsi_mod-$(CONFIG_PM)		+= scsi_pm.o
 scsi_mod-$(CONFIG_SCSI_DH)	+= scsi_dh.o
 scsi_mod-$(CONFIG_BLK_DEV_BSG)	+= scsi_bsg.o
+scsi_mod-$(CONFIG_SCSI_COMMON)	+= scsi_common.o
 
 hv_storvsc-y			:= storvsc_drv.o