Skip to contentSkip to conversation

scsi: storvsc: Fix a build issue reported by kbuild test robot

PATCH In review K. Y. Srinivasan 2 participants 5 messages Feb 26, 2016 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: storvsc: Fix a build issue reported by kbuild test robot

tree:   https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgit.kernel.org%2fpub%2fscm%2flinux%2fkernel%2fgit%2ftorvalds%2flinux.git&data=01%7c01%7ckys%40microsoft.com%7ce2e0622715844b79ad7108d32796ec3c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ubr4GbBaNS%2ftOz%2buJBk0CL9N0UNG9x2TidLgy6Yovg4%3d master
head:   03c21cb775a313f1ff19be59c5d02df3e3526471
commit: dac582417bc449b1f7f572d3f1dd9d23eec15cc9 storvsc: Properly support Fibre Channel devices
date:   3 weeks ago
config: x86_64-randconfig-s3-01281016 (attached as .config)
reproduce:
        git checkout dac582417bc449b1f7f572d3f1dd9d23eec15cc9
        # save the attached .config to linux build tree
        make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/built-in.o: In function `storvsc_remove':

Quoted 1 line
Quoted 1 line

storvsc_drv.c:(.text+0x213af7): undefined reference to `fc_remove_host'

drivers/built-in.o: In function `storvsc_drv_init':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.init.text+0xcbcc): undefined reference to fc_attach_transport' storvsc_drv.c:(.init.text+0xcc06): undefined reference to fc_release_transport'

drivers/built-in.o: In function `storvsc_drv_exit':

Quoted 1 line
Quoted 1 line

storvsc_drv.c:(.exit.text+0x123c): undefined reference to `fc_release_transport'

With this commit, the storvsc driver depends on FC atttributes. Make this dependency explicit.

---
 drivers/scsi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/Kconfig +1 -0
index 64eed87..24365c3 100644
@@ -594,6 +594,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on SCSI_FC_ATTRS
 	default HYPERV
 	help
 	  Select this option to enable the Hyper-V virtual storage driver.
Signature · 1 line
1.7.4.1
maintainer
#1 lore raw
Quoted 44 lines · K. Y. Srinivasan

tree: https://na01.safelinks.protection.outlook.com/?url=https%3a%2
f%2fgit.kernel.org%2fpub%2fscm%2flinux%2fkernel%2fgit%2ftorvalds%2fli nux.git&data=01%7c01%7ckys%40microsoft.com%7ce2e0622715844b79ad7108d3 2796ec3c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ubr4GbBaNS%2ftO z%2buJBk0CL9N0UNG9x2TidLgy6Yovg4%3d master

head:   03c21cb775a313f1ff19be59c5d02df3e3526471
commit: dac582417bc449b1f7f572d3f1dd9d23eec15cc9 storvsc: Properly
support Fibre Channel devices
date:   3 weeks ago
config: x86_64-randconfig-s3-01281016 (attached as .config)
reproduce:
        git checkout dac582417bc449b1f7f572d3f1dd9d23eec15cc9
        # save the attached .config to linux build tree
        make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/built-in.o: In function `storvsc_remove':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.text+0x213af7): undefined reference to `fc_remove_host'

drivers/built-in.o: In function `storvsc_drv_init':

Quoted 4 lines
Quoted 4 lines

storvsc_drv.c:(.init.text+0xcbcc): undefined reference to fc_attach_transport' storvsc_drv.c:(.init.text+0xcc06): undefined reference to fc_release_transport'

drivers/built-in.o: In function `storvsc_drv_exit':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.exit.text+0x123c): undefined reference to `fc_release_transport'

With this commit, the storvsc driver depends on FC atttributes. Make this
dependency explicit.

---
 drivers/scsi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/Kconfig +0 -0
index 64eed87..24365c3 100644

drivers/scsi/Kconfig config XEN_SCSI_FRONTEND · line 597

Quoted 4 lines
drivers/scsi/Kconfig +1 -0
@@ -594,6 +594,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on SCSI_FC_ATTRS

Well, I suppose continually sending the wrong patch until I get annoyed enough to send the right one is one way of doing it. This patch is wrong. what you want is below.

You want HYPERV_STORAGE to be built in if the FC attributes are, otherwise you don't care because if they're N the FC code will be compiled out.

James

---

drivers/scsi/Kconfig +1 -0
index e2f31c9..5ecabdb 100644
@@ -596,6 +596,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on m || SCSI_FC_ATTRS
 	default HYPERV
 	help
 	  Select this option to enable the Hyper-V virtual storage driver.
#2 lore raw
Quoted 57 lines

-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Friday, February 26, 2016 2:25 PM
To: KY Srinivasan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] scsi: storvsc: Fix a build issue reported by kbuild test robot

Quoted 3 lines · K. Y. Srinivasan

tree: https://na01.safelinks.protection.outlook.com/?url=https%3a%2
f%2fgit.kernel.org%2fpub%2fscm%2flinux%2fkernel%2fgit%2ftorvalds%2fli

nux.git&data=01%7c01%7ckys%40microsoft.com%7ce2e0622715844b79ad71 08d3

Quoted 1 line

2796ec3c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ubr4GbBaNS %2ftO

Quoted 35 lines

z%2buJBk0CL9N0UNG9x2TidLgy6Yovg4%3d master

head:   03c21cb775a313f1ff19be59c5d02df3e3526471
commit: dac582417bc449b1f7f572d3f1dd9d23eec15cc9 storvsc: Properly
support Fibre Channel devices
date:   3 weeks ago
config: x86_64-randconfig-s3-01281016 (attached as .config)
reproduce:
        git checkout dac582417bc449b1f7f572d3f1dd9d23eec15cc9
        # save the attached .config to linux build tree
        make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/built-in.o: In function `storvsc_remove':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.text+0x213af7): undefined reference to `fc_remove_host'

drivers/built-in.o: In function `storvsc_drv_init':

Quoted 4 lines
Quoted 4 lines

storvsc_drv.c:(.init.text+0xcbcc): undefined reference to fc_attach_transport' storvsc_drv.c:(.init.text+0xcc06): undefined reference to fc_release_transport'

drivers/built-in.o: In function `storvsc_drv_exit':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.exit.text+0x123c): undefined reference to `fc_release_transport'

With this commit, the storvsc driver depends on FC atttributes. Make this
dependency explicit.

---
 drivers/scsi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 13 lines

drivers/scsi/Kconfig config XEN_SCSI_FRONTEND · line 597

Quoted 9 lines
drivers/scsi/Kconfig +1 -0
index 64eed87..24365c3 100644
@@ -594,6 +594,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on SCSI_FC_ATTRS

Well, I suppose continually sending the wrong patch until I get annoyed enough to send the right one is one way of doing it. This patch is wrong. what you want is below.

James, that was not my intent; although it is a tempting strategy! Here is an excerpt of your comments on v2 of this patch:
(dated Jan 29 of this year):

"No ... if you want to depend on the FC_ATTRS then a simple depend works. If you want to be able to build without them or with them, then that line must read

depends on m || SCSI_FC_ATTRS != m"

Since all I wanted was to depend on FC_ATTRS I chose to go with your recommendation - which also happened to be what I had initially sent (v1 of this patch).

Quoted 4 lines

You want HYPERV_STORAGE to be built in if the FC attributes are, otherwise you don't care because if they're N the FC code will be compiled out.

If FC attributes are built in, I have no issue - I want to be able to build the storvsc driver both as a module as well as built in. However, if storvsc is built as part of the kernel, I want to make sure that FC attributes are also built as part of the kernel. The build test failure that was reported was this case. With this patch, the build issue reported by kbuild cannot happen since if the FC_ATTRS are built as a module, storvsc cannot be builtin.

Regards,

K. Y

Quoted 17 lines

James

---

drivers/scsi/Kconfig +1 -0
index e2f31c9..5ecabdb 100644
@@ -596,6 +596,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on m || SCSI_FC_ATTRS
 	default HYPERV
 	help
 	  Select this option to enable the Hyper-V virtual storage driver.
maintainer
#3 lore raw
Quoted 88 lines · KY Srinivasan
Quoted 64 lines

-----Original Message-----
From: James Bottomley [mailto:[email protected] ]
Sent: Friday, February 26, 2016 2:25 PM
To: KY Srinivasan <[email protected]>; [email protected] ;
[email protected]; [email protected]; [email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] scsi: storvsc: Fix a build issue reported by kbuild test
robot

Quoted 5 lines · K. Y. Srinivasan

tree:
https://na01.safelinks.protection.outlook.com/?url=https%3a%2
f%2fgit.kernel.org%2fpub%2fscm%2flinux%2fkernel%2fgit%2ftorvalds% 2fli

nux.git&data=01%7c01%7ckys%40microsoft.com%7ce2e0622715844b79ad71 08d3

Quoted 1 line

2796ec3c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ubr4GbBaNS %2ftO

Quoted 37 lines

z%2buJBk0CL9N0UNG9x2TidLgy6Yovg4%3d master

head:   03c21cb775a313f1ff19be59c5d02df3e3526471
commit: dac582417bc449b1f7f572d3f1dd9d23eec15cc9 storvsc:
Properly
support Fibre Channel devices
date:   3 weeks ago
config: x86_64-randconfig-s3-01281016 (attached as .config)
reproduce:
        git checkout dac582417bc449b1f7f572d3f1dd9d23eec15cc9
        # save the attached .config to linux build tree
        make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/built-in.o: In function `storvsc_remove':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.text+0x213af7): undefined reference to `fc_remove_host'

drivers/built-in.o: In function `storvsc_drv_init':

Quoted 4 lines
Quoted 4 lines

storvsc_drv.c:(.init.text+0xcbcc): undefined reference to fc_attach_transport' storvsc_drv.c:(.init.text+0xcc06): undefined reference to fc_release_transport'

drivers/built-in.o: In function `storvsc_drv_exit':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.exit.text+0x123c): undefined reference to `fc_release_transport'

With this commit, the storvsc driver depends on FC atttributes. Make
this
dependency explicit.

---
 drivers/scsi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 14 lines

drivers/scsi/Kconfig config XEN_SCSI_FRONTEND · line 597

Quoted 9 lines
drivers/scsi/Kconfig +1 -0
index 64eed87..24365c3 100644
@@ -594,6 +594,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on SCSI_FC_ATTRS

Well, I suppose continually sending the wrong patch until I get annoyed
enough to send the right one is one way of doing it. This patch is wrong. what you want is below.

James, that was not my intent; although it is a tempting strategy! Here is an excerpt of your comments on v2 of this patch:
(dated Jan 29 of this year):

"No ... if you want to depend on the FC_ATTRS then a simple depend works. If you want to be able to build without them or with them, then
that line must read

Quoted 6 lines

depends on m || SCSI_FC_ATTRS != m"

Since all I wanted was to depend on FC_ATTRS I chose to go with your recommendation -
which also happened to be what I had initially sent (v1 of this patch).

If you're going to depend on the FC_ATTRS then you don't need all of the

#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)

In the driver, because you're never building without it. I thought those were put in to satisfy Hannes' request that the driver be buildable without the attributes?

Quoted 11 lines
Quoted 3 lines

You want HYPERV_STORAGE to be built in if the FC attributes are, otherwise you don't care because if they're N the FC code will be compiled out.

If FC attributes are built in, I have no issue - I want to be able to build the storvsc driver both as a module as well as built in. However, if storvsc is built as part of the kernel, I want to make sure that FC attributes are also built as part of the kernel. The build test failure that was reported was this case. With this patch, the build issue reported by kbuild cannot happen since if the FC_ATTRS are built as a module, storvsc cannot be builtin.

Oh, right, the line should read

depends on m || SCSI_FC_ATTRS != m

for that case.

James

#4 lore raw
Quoted 134 lines

-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Friday, February 26, 2016 3:33 PM
To: KY Srinivasan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] scsi: storvsc: Fix a build issue reported by kbuild test robot

Quoted 3 lines · KY Srinivasan
Quoted 3 lines

-----Original Message-----
From: James Bottomley

[mailto:[email protected]

Quoted 13 lines
Quoted 13 lines

]
Sent: Friday, February 26, 2016 2:25 PM
To: KY Srinivasan <[email protected]>; [email protected] ;
[email protected]; [email protected]; [email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] scsi: storvsc: Fix a build issue reported by kbuild test
robot

Quoted 4 lines
Quoted 4 lines · K. Y. Srinivasan
Quoted 3 lines

tree:
https://na01.safelinks.protection.outlook.com/?url=https%3a%2

f%2fgit.kernel.org%2fpub%2fscm%2flinux%2fkernel%2fgit%2ftorvalds%

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

2fli

nux.git&data=01%7c01%7ckys%40microsoft.com%7ce2e0622715844b79ad71

Quoted 3 lines
Quoted 3 lines

08d3

Quoted 1 line

2796ec3c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ubr4GbBaNS

Quoted 62 lines
Quoted 38 lines

%2ftO

Quoted 37 lines

z%2buJBk0CL9N0UNG9x2TidLgy6Yovg4%3d master

head:   03c21cb775a313f1ff19be59c5d02df3e3526471
commit: dac582417bc449b1f7f572d3f1dd9d23eec15cc9 storvsc:
Properly
support Fibre Channel devices
date:   3 weeks ago
config: x86_64-randconfig-s3-01281016 (attached as .config)
reproduce:
        git checkout dac582417bc449b1f7f572d3f1dd9d23eec15cc9
        # save the attached .config to linux build tree
        make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/built-in.o: In function `storvsc_remove':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.text+0x213af7): undefined reference to `fc_remove_host'

drivers/built-in.o: In function `storvsc_drv_init':

Quoted 4 lines
Quoted 4 lines

storvsc_drv.c:(.init.text+0xcbcc): undefined reference to fc_attach_transport' storvsc_drv.c:(.init.text+0xcc06): undefined reference to fc_release_transport'

drivers/built-in.o: In function `storvsc_drv_exit':

Quoted 2 lines
Quoted 2 lines

storvsc_drv.c:(.exit.text+0x123c): undefined reference to `fc_release_transport'

With this commit, the storvsc driver depends on FC atttributes. Make
this
dependency explicit.

---
 drivers/scsi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 14 lines

drivers/scsi/Kconfig config XEN_SCSI_FRONTEND · line 597

Quoted 9 lines
drivers/scsi/Kconfig +1 -0
index 64eed87..24365c3 100644
@@ -594,6 +594,7 @@ config XEN_SCSI_FRONTEND
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
 	depends on SCSI && HYPERV
+	depends on SCSI_FC_ATTRS

Well, I suppose continually sending the wrong patch until I get annoyed
enough to send the right one is one way of doing it. This patch is wrong. what you want is below.

James, that was not my intent; although it is a tempting strategy! Here is an excerpt of your comments on v2 of this patch:
(dated Jan 29 of this year):

"No ... if you want to depend on the FC_ATTRS then a simple depend works. If you want to be able to build without them or with them, then
that line must read

Quoted 6 lines

depends on m || SCSI_FC_ATTRS != m"

Since all I wanted was to depend on FC_ATTRS I chose to go with your recommendation -
which also happened to be what I had initially sent (v1 of this patch).

If you're going to depend on the FC_ATTRS then you don't need all of the

#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)

In the driver, because you're never building without it. I thought those were put in to satisfy Hannes' request that the driver be buildable without the attributes?

Quoted 11 lines
Quoted 3 lines

You want HYPERV_STORAGE to be built in if the FC attributes are, otherwise you don't care because if they're N the FC code will be compiled out.

If FC attributes are built in, I have no issue - I want to be able to build the storvsc driver both as a module as well as built in. However, if storvsc is built as part of the kernel, I want to make sure that FC attributes are also built as part of the kernel. The build test failure that was reported was this case. With this patch, the build issue reported by kbuild cannot happen since if the FC_ATTRS are built as a module, storvsc cannot be builtin.

Quoted 5 lines

Oh, right, the line should read

depends on m || SCSI_FC_ATTRS != m

for that case.

Thanks James. I tested your suggestion and I will send out the updated version of the patch.

Regards,

K. Y