* [PATCH] scsi_dh_alua: Declare local functions static
@ 2016-04-14 17:27 Bart Van Assche
2016-04-15 5:58 ` Hannes Reinecke
2016-04-15 20:23 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2016-04-14 17:27 UTC (permalink / raw)
To: James Bottomley, Martin K. Petersen
Cc: Hannes Reinecke, Christoph Hellwig, Ewan Milne,
linux-scsi@vger.kernel.org
This patch avoids that building with W=1 causes gcc to report the
following type of warning:
no previous prototype for ... [-Wmissing-prototypes]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ewan Milne <emilne@redhat.com>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 8eaed05..e034f12 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -190,8 +190,8 @@ static int submit_stpg(struct scsi_device *sdev, int group_id,
ALUA_FAILOVER_RETRIES, NULL, req_flags);
}
-struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
- int group_id)
+static struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
+ int group_id)
{
struct alua_port_group *pg;
@@ -219,8 +219,8 @@ struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
* Allocate a new port_group structure for a given
* device.
*/
-struct alua_port_group *alua_alloc_pg(struct scsi_device *sdev,
- int group_id, int tpgs)
+static struct alua_port_group *alua_alloc_pg(struct scsi_device *sdev,
+ int group_id, int tpgs)
{
struct alua_port_group *pg, *tmp_pg;
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi_dh_alua: Declare local functions static
2016-04-14 17:27 [PATCH] scsi_dh_alua: Declare local functions static Bart Van Assche
@ 2016-04-15 5:58 ` Hannes Reinecke
2016-04-15 20:23 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2016-04-15 5:58 UTC (permalink / raw)
To: Bart Van Assche, James Bottomley, Martin K. Petersen
Cc: Christoph Hellwig, Ewan Milne, linux-scsi@vger.kernel.org
On 04/14/2016 07:27 PM, Bart Van Assche wrote:
> This patch avoids that building with W=1 causes gcc to report the
> following type of warning:
>
> no previous prototype for ... [-Wmissing-prototypes]
>
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Ewan Milne <emilne@redhat.com>
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 8eaed05..e034f12 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -190,8 +190,8 @@ static int submit_stpg(struct scsi_device *sdev, int group_id,
> ALUA_FAILOVER_RETRIES, NULL, req_flags);
> }
>
> -struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
> - int group_id)
> +static struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
> + int group_id)
> {
> struct alua_port_group *pg;
>
> @@ -219,8 +219,8 @@ struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
> * Allocate a new port_group structure for a given
> * device.
> */
> -struct alua_port_group *alua_alloc_pg(struct scsi_device *sdev,
> - int group_id, int tpgs)
> +static struct alua_port_group *alua_alloc_pg(struct scsi_device *sdev,
> + int group_id, int tpgs)
> {
> struct alua_port_group *pg, *tmp_pg;
>
>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi_dh_alua: Declare local functions static
2016-04-14 17:27 [PATCH] scsi_dh_alua: Declare local functions static Bart Van Assche
2016-04-15 5:58 ` Hannes Reinecke
@ 2016-04-15 20:23 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-04-15 20:23 UTC (permalink / raw)
To: Bart Van Assche
Cc: James Bottomley, Martin K. Petersen, Hannes Reinecke,
Christoph Hellwig, Ewan Milne, linux-scsi@vger.kernel.org
>>>>> "Bart" == Bart Van Assche <bart.vanassche@sandisk.com> writes:
Bart> This patch avoids that building with W=1 causes gcc to report the
Bart> following type of warning:
Bart> no previous prototype for ... [-Wmissing-prototypes]
Applied to 4.7/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-15 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 17:27 [PATCH] scsi_dh_alua: Declare local functions static Bart Van Assche
2016-04-15 5:58 ` Hannes Reinecke
2016-04-15 20:23 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).