linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varun Prakash <varun@chelsio.com>
To: Colin King <colin.king@canonical.com>
Cc: "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln'
Date: Mon, 29 Jan 2018 20:45:52 +0530	[thread overview]
Message-ID: <20180129151539.GA1752@chelsio.com> (raw)
In-Reply-To: <20180124145801.18920-1-colin.king@canonical.com>

On Wed, Jan 24, 2018 at 02:58:01PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer ln is assigned a value that is never read, it is re-assigned
> a new value in the list_for_each loop hence the initialization is
> redundant and can be removed.
> 
> Cleans up clang warning:
> drivers/scsi/csiostor/csio_lnode.c:117:21: warning: Value stored to 'ln'
> during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/scsi/csiostor/csio_lnode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
> index be5ee2d37815..7dbbbb81a1e7 100644
> --- a/drivers/scsi/csiostor/csio_lnode.c
> +++ b/drivers/scsi/csiostor/csio_lnode.c
> @@ -114,7 +114,7 @@ static enum csio_ln_ev fwevt_to_lnevt[] = {
>  static struct csio_lnode *
>  csio_ln_lookup_by_portid(struct csio_hw *hw, uint8_t portid)
>  {
> -	struct csio_lnode *ln = hw->rln;
> +	struct csio_lnode *ln;
>  	struct list_head *tmp;
>  
>  	/* Match siblings lnode with portid */

Acked-by: Varun Prakash <varun@chelsio.com> 

  reply	other threads:[~2018-01-29 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 14:58 [PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln' Colin King
2018-01-29 15:15 ` Varun Prakash [this message]
2018-01-31  2:24 ` 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=20180129151539.GA1752@chelsio.com \
    --to=varun@chelsio.com \
    --cc=colin.king@canonical.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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).