Skip to contentSkip to conversation

scsi: remove useless acpi functions in the head file

PATCH Superseded Hanjun Guo 4 participants 7 messages Jan 10, 2017 – Jan 11, 2017 SCSI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hanjun Guo

author
#0 lore raw

PATCH 1/1 scsi: remove useless acpi functions in the head file

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

---
 include/scsi/scsi.h | 10 ----------
 1 file changed, 10 deletions(-)
include/scsi/scsi.h +0 -10
index 8ec7c30..a1e1930 100644
@@ -29,16 +29,6 @@ enum scsi_timeouts {
  */
 #define SCAN_WILD_CARD	~0
 
-#ifdef CONFIG_ACPI
-struct acpi_bus_type;
-
-extern int
-scsi_register_acpi_bus_type(struct acpi_bus_type *bus);
-
-extern void
-scsi_unregister_acpi_bus_type(struct acpi_bus_type *bus);
-#endif
-
 /** scsi_status_is_good - check the status return.
  *
  * @status: the status passed up from the driver (including host and
Signature · 1 line
1.7.12.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Hanjun Guo

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

---
 include/scsi/scsi.h | 10 ----------
 1 file changed, 10 deletions(-)
include/scsi/scsi.h +0 -3
index 8ec7c30..a1e1930 100644
@@ -29,16 +29,6 @@ enum scsi_timeouts {
  */
 #define SCAN_WILD_CARD	~0
 
-#ifdef CONFIG_ACPI
-struct acpi_bus_type;
-

include/scsi/scsi.h enum scsi_timeouts { · line 34

Quoted 10 lines
include/scsi/scsi.h +0 -7
-extern int
-scsi_register_acpi_bus_type(struct acpi_bus_type *bus);
-
-extern void
-scsi_unregister_acpi_bus_type(struct acpi_bus_type *bus);
-#endif
-
 /** scsi_status_is_good - check the status return.
  *
  * @status: the status passed up from the driver (including host and

Looks ok,

Reviewed-by
#2 lore raw
Quoted 8 lines · John Garry
Quoted 7 lines · Hanjun Guo

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

Just out of curiosity, did you find this by some tool? If so, can you please let me know the tool name so that I can avoid such problems in the future? Thanks.

-Aaron

Quoted 31 lines
Quoted 16 lines
---
 include/scsi/scsi.h | 10 ----------
 1 file changed, 10 deletions(-)
include/scsi/scsi.h +0 -3
index 8ec7c30..a1e1930 100644
@@ -29,16 +29,6 @@ enum scsi_timeouts {
  */
 #define SCAN_WILD_CARD	~0
 
-#ifdef CONFIG_ACPI
-struct acpi_bus_type;
-

include/scsi/scsi.h enum scsi_timeouts { · line 34

Quoted 10 lines
include/scsi/scsi.h +0 -7
-extern int
-scsi_register_acpi_bus_type(struct acpi_bus_type *bus);
-
-extern void
-scsi_unregister_acpi_bus_type(struct acpi_bus_type *bus);
-#endif
-
 /** scsi_status_is_good - check the status return.
  *
  * @status: the status passed up from the driver (including host and

Looks ok,

author
#3 lore raw
Quoted 8 lines · Aaron Lu
Quoted 7 lines · John Garry
Quoted 6 lines · Hanjun Guo

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

Quoted 6 lines
Quoted 1 line
Quoted 1 line

Just out of curiosity, did you find this by some tool? If so, can you please let me know the tool name so that I can avoid such problems in the future? Thanks.

No, not found by tool. I was working on a patch set which tried to introduce a new acpi bus type [1], so I greped the usage of "struct acpi_bus_type" then found this issue :)

[1]: https://lkml.org/lkml/2016/12/31/40

Thanks
Hanjun

#4 lore raw
Quoted 12 lines · Hanjun Guo
Quoted 11 lines · Aaron Lu
Quoted 8 lines · John Garry
Quoted 7 lines · Hanjun Guo

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

Quoted 7 lines
Quoted 3 lines

Just out of curiosity, did you find this by some tool? If so, can you please let me know the tool name so that I can avoid such problems in the future? Thanks.

No, not found by tool. I was working on a patch set which tried to introduce a new acpi bus type [1], so I greped the usage of "struct acpi_bus_type" then found this issue :)

I see, thanks for the cleanup.

Regards,
Aaron

Reviewed-by on v1 1/1
#5 lore raw
In reply to Hanjun Guo
Quoted 5 lines · Hanjun Guo

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

                                   ^
				   header?
Quoted 3 lines

---

Otherwise,

Signature · 6 lines
Johannes Thumshirn                                          Storage
[email protected]                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
author
#6 lore raw
Quoted 8 lines · Johannes Thumshirn
Quoted 5 lines · Hanjun Guo

From: Hanjun Guo <[email protected]>

commit f1bc1e4c44b1 ("ata: acpi: rework the ata acpi bind support") removed scsi_register_acpi_bus_type() and scsi_unregister_acpi_bus_type(), but forgot to remove them in the head file, do it now.

                                   ^
				   header?

Yes, will update the patch.

Quoted 4 lines
Quoted 2 lines

---

Otherwise,

Thanks!
Hanjun