All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Bart Van Assche <bart.vanassche@wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org,
	Douglas Gilbert <dgilbert@interlog.com>,
	Hannes Reinecke <hare@suse.com>, Christoph Hellwig <hch@lst.de>,
	Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH 18/19] scsi_debug: Remove a set-but-not-used variable
Date: Fri, 25 Aug 2017 17:53:30 +0200	[thread overview]
Message-ID: <6e387b21-055e-455f-9067-0e50af0cb155@suse.de> (raw)
In-Reply-To: <20170823214009.15015-19-bart.vanassche@wdc.com>

On 08/23/2017 11:40 PM, Bart Van Assche wrote:
> This patch avoids that gcc reports the following warning when
> building with W=1:
> 
> drivers/scsi/scsi_debug.c:2264:15: warning: variable ?pcontrol? set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Douglas Gilbert <dgilbert@interlog.com>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  drivers/scsi/scsi_debug.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index 3be980d47268..77a0335eb757 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -2261,7 +2261,7 @@ static int resp_ie_l_pg(unsigned char * arr)
>  static int resp_log_sense(struct scsi_cmnd * scp,
>                            struct sdebug_dev_info * devip)
>  {
> -	int ppc, sp, pcontrol, pcode, subpcode, alloc_len, len, n;
> +	int ppc, sp, pcode, subpcode, alloc_len, len, n;
>  	unsigned char arr[SDEBUG_MAX_LSENSE_SZ];
>  	unsigned char *cmd = scp->cmnd;
>  
> @@ -2272,7 +2272,6 @@ static int resp_log_sense(struct scsi_cmnd * scp,
>  		mk_sense_invalid_fld(scp, SDEB_IN_CDB, 1, ppc ? 1 : 0);
>  		return check_condition_result;
>  	}
> -	pcontrol = (cmd[2] & 0xc0) >> 6;
>  	pcode = cmd[2] & 0x3f;
>  	subpcode = cmd[3] & 0xff;
>  	alloc_len = get_unaligned_be16(cmd + 7);
> 
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)

  parent reply	other threads:[~2017-08-25 15:53 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 21:39 [PATCH 00/19] SCSI patches for kernel v4.14 Bart Van Assche
2017-08-23 21:39 ` [PATCH 01/19] Remove an obsolete function declaration Bart Van Assche
2017-08-24  9:02   ` Christoph Hellwig
2017-08-23 21:39 ` [PATCH 02/19] Avoid sign extension of scsi_device.type Bart Van Assche
2017-08-24  6:10   ` Hannes Reinecke
2017-08-24  9:02   ` Christoph Hellwig
2017-08-23 21:39 ` [PATCH 03/19] Suppress gcc 7 fall-through warnings reported with W=1 Bart Van Assche
2017-08-24  9:03   ` Christoph Hellwig
2017-08-23 21:39 ` [PATCH 04/19] Convert a strncmp() call into a strcmp() call Bart Van Assche
2017-08-24  9:03   ` Christoph Hellwig
2017-08-25 15:43   ` Hannes Reinecke
2017-08-23 21:39 ` [PATCH 05/19] scsi_setup_fs_cmnd(): Call scsi_req_init() instead of open-coding it Bart Van Assche
2017-08-24  9:05   ` Christoph Hellwig
2017-08-24 16:17     ` Bart Van Assche
2017-08-23 21:39 ` [PATCH 06/19] Document which queue type a function is intended for Bart Van Assche
2017-08-24  9:05   ` Christoph Hellwig
2017-08-24 16:57     ` Bart Van Assche
2017-08-24 16:58       ` hch
2017-08-24 17:22         ` Bart Van Assche
2017-08-25 15:44   ` Hannes Reinecke
2017-08-23 21:39 ` [PATCH 07/19] Fix RCU handling of scsi_device.vpd_pg8[03] Bart Van Assche
2017-08-24  9:07   ` Christoph Hellwig
2017-08-24 16:54     ` Bart Van Assche
2017-08-25  5:58       ` Seymour, Shane M
2017-08-25  6:59         ` hch
2017-08-25 20:04         ` Bart Van Assche
2017-08-28  2:02           ` Seymour, Shane M
2017-08-25 15:49   ` Hannes Reinecke
2017-08-25 16:26     ` Bart Van Assche
2017-08-23 21:39 ` [PATCH 08/19] Use blk_mq_rq_to_pdu() to convert a request to a SCSI command pointer Bart Van Assche
2017-08-24  9:07   ` Christoph Hellwig
2017-08-23 21:39 ` [PATCH 09/19] sd, sr: Convert two assignments into warning statements Bart Van Assche
2017-08-24  9:08   ` Christoph Hellwig
2017-08-23 21:40 ` [PATCH 10/19] sd: Fix indentation Bart Van Assche
2017-08-24  9:08   ` Christoph Hellwig
2017-08-25 15:50   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 11/19] sd: Remove a useless comparison Bart Van Assche
2017-08-25 15:50   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 12/19] sg: Fix type of last blk_trace_setup() argument Bart Van Assche
2017-08-24  9:08   ` Christoph Hellwig
2017-08-25 15:51   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 13/19] libiscsi: Fix indentation Bart Van Assche
2017-08-24  9:08   ` Christoph Hellwig
2017-08-25 15:51   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 14/19] libsas: Remove a set-but-not-used variable Bart Van Assche
2017-08-24  9:09   ` Christoph Hellwig
2017-08-25 15:51   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 15/19] libsas: Annotate fall-through in a switch statement Bart Van Assche
2017-08-24  9:09   ` Christoph Hellwig
2017-08-25 15:52   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 16/19] scsi_transport_sas, sas_tlr_supported(): Check kzalloc() return value Bart Van Assche
2017-08-24  9:09   ` Christoph Hellwig
2017-08-25 15:52   ` Hannes Reinecke
2017-08-23 21:40 ` [PATCH 17/19] scsi_transport_srp: Suppress a W=1 compiler warning Bart Van Assche
2017-08-24  9:11   ` Christoph Hellwig
2017-08-24 16:27     ` Bart Van Assche
2017-08-25 15:29       ` hch
2017-08-25 15:40         ` Bart Van Assche
2017-08-25 15:56           ` hch
2017-08-23 21:40 ` [PATCH 18/19] scsi_debug: Remove a set-but-not-used variable Bart Van Assche
2017-08-24  9:12   ` Christoph Hellwig
2017-08-25 15:53   ` Hannes Reinecke [this message]
2017-08-23 21:40 ` [PATCH 19/19] iscsi_tcp: " Bart Van Assche
2017-08-24  9:12   ` Christoph Hellwig
2017-08-25 15:53   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e387b21-055e-455f-9067-0e50af0cb155@suse.de \
    --to=hare@suse.de \
    --cc=bart.vanassche@wdc.com \
    --cc=dgilbert@interlog.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.