From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Tom Rix <trix@redhat.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
Martin Petersen <martin.petersen@oracle.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>
Subject: Re: [PATCH] scsi: scsi_transport_fc: remove unused desc_cnt variable
Date: Mon, 27 Mar 2023 18:02:38 +0000 [thread overview]
Message-ID: <F961DAB1-FAB2-4F65-AD5E-0B804F93FB64@oracle.com> (raw)
In-Reply-To: <20230326003222.1343671-1-trix@redhat.com>
> On Mar 25, 2023, at 5:32 PM, Tom Rix <trix@redhat.com> wrote:
>
> clang with W=1 reports
> drivers/scsi/scsi_transport_fc.c:908:6: error: variable
> 'desc_cnt' set but not used [-Werror,-Wunused-but-set-variable]
> u32 desc_cnt = 0, bytes_remain;
> ^
> This variable is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/scsi/scsi_transport_fc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
> index f12e9467ebb4..64ff2629eaf9 100644
> --- a/drivers/scsi/scsi_transport_fc.c
> +++ b/drivers/scsi/scsi_transport_fc.c
> @@ -905,7 +905,7 @@ fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf,
> {
> struct fc_els_fpin *fpin = (struct fc_els_fpin *)fpin_buf;
> struct fc_tlv_desc *tlv;
> - u32 desc_cnt = 0, bytes_remain;
> + u32 bytes_remain;
> u32 dtag;
> enum fc_host_event_code event_code =
> event_acknowledge ? FCH_EVT_LINK_FPIN_ACK : FCH_EVT_LINK_FPIN;
> @@ -932,7 +932,6 @@ fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf,
> fc_fpin_congn_stats_update(shost, tlv);
> }
>
> - desc_cnt++;
> bytes_remain -= FC_TLV_DESC_SZ_FROM_LENGTH(tlv);
> tlv = fc_tlv_next_desc(tlv);
> }
> --
> 2.27.0
>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
--
Himanshu Madhani Oracle Linux Engineering
next prev parent reply other threads:[~2023-03-27 18:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-26 0:32 [PATCH] scsi: scsi_transport_fc: remove unused desc_cnt variable Tom Rix
2023-03-27 18:02 ` Himanshu Madhani [this message]
2023-03-30 14:29 ` Benjamin Block
2023-04-03 1:38 ` Martin K. Petersen
2023-04-12 2:04 ` Martin K. Petersen
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=F961DAB1-FAB2-4F65-AD5E-0B804F93FB64@oracle.com \
--to=himanshu.madhani@oracle.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.petersen@oracle.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.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 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).