target: Move a declaration of a global variable into a header file
Hannes Reinecke
Reviewed-byQuoted 34 lines · Bart Van Assche
This patch avoids that sparse reports the following warning:
drivers/target/target_core_configfs.c:2267:33: warning: symbol 'target_core_dev_item_ops' was not declared. Should it be static?Fixes c17cd24959cd ("target/configfs: Kill se_device->dev_link_magic")Signed-off-by Bart Van Assche <[email protected]>Cc Nicholas Bellinger <[email protected]>Cc Christoph Hellwig <[email protected]>Cc Hannes Reinecke <[email protected]>Cc Mike Christie <[email protected]>--- drivers/target/target_core_fabric_configfs.c | 2 -- drivers/target/target_core_internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)drivers/target/target_core_fabric_configfs.c +0
-2@@ -623,8 +623,6 @@ static struct configfs_attribute *target_fabric_port_attrs[] = { NULL, }; -extern struct configfs_item_operations target_core_dev_item_ops; -static int target_fabric_port_link (struct config_item *lun_ci,struct config_item *se_dev_ci)drivers/target/target_core_internal.h +0
-0
drivers/target/target_core_internal.h int target_for_each_device(int (*fn)(struct se_device *dev, void *data), · line 94
Quoted 7 lines
drivers/target/target_core_internal.h +1
-0@@ -88,6 +88,7 @@ int target_for_each_device(int (*fn)(struct se_device *dev, void *data), void *data);/* target_core_configfs.c */ +extern struct configfs_item_operations target_core_dev_item_ops;void target_setup_backend_cits (struct target_backend *);/* target_core_fabric_configfs.c */
Reviewed-by Hannes Reinecke <[email protected]>
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)