All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <ooo@electrozaur.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Benny Halevy <bhalevy@primarydata.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-kernel@vger.kernel.org, osd-dev@open-osd.org,
	linux-scsi@vger.kernel.org, Joe Perches <joe@perches.com>
Subject: Re: [PATCH v2] osd: remove deadcode
Date: Wed, 24 Feb 2016 16:58:51 +0200	[thread overview]
Message-ID: <56CDC52B.1040407@electrozaur.com> (raw)
In-Reply-To: <1456312888-22074-1-git-send-email-sudipm.mukherjee@gmail.com>

On 02/24/2016 01:21 PM, Sudip Mukherjee wrote:
> The variable is_ver1 is always true and so OSD_CAP_LEN can never be
> used.
> Reported by Coverity.
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>

ACK-by: Boaz harrosh <ooo@elecrozaur.com>

Thanks
> ---
> 
> v2: Joe Perches asked to mention the tool used in the commit log.
> 
>  drivers/scsi/osd/osd_initiator.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
> index d8a2b51..3b11aad 100644
> --- a/drivers/scsi/osd/osd_initiator.c
> +++ b/drivers/scsi/osd/osd_initiator.c
> @@ -2006,9 +2006,8 @@ EXPORT_SYMBOL(osd_sec_init_nosec_doall_caps);
>   */
>  void osd_set_caps(struct osd_cdb *cdb, const void *caps)
>  {
> -	bool is_ver1 = true;
>  	/* NOTE: They start at same address */
> -	memcpy(&cdb->v1.caps, caps, is_ver1 ? OSDv1_CAP_LEN : OSD_CAP_LEN);
> +	memcpy(&cdb->v1.caps, caps, OSDv1_CAP_LEN);
>  }
>  
>  bool osd_is_sec_alldata(struct osd_security_parameters *sec_parms __unused)
> 

  parent reply	other threads:[~2016-02-24 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24 11:21 [PATCH v2] osd: remove deadcode Sudip Mukherjee
2016-02-24 13:41 ` Matthew R. Ochs
2016-02-24 14:58 ` Boaz Harrosh [this message]
2016-02-26  2:12 ` 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=56CDC52B.1040407@electrozaur.com \
    --to=ooo@electrozaur.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bhalevy@primarydata.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=osd-dev@open-osd.org \
    --cc=sudipm.mukherjee@gmail.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.