All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@emulex.com>
To: Dave Jones <davej@redhat.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: suspicious self-assignment in lpfc
Date: Thu, 20 Feb 2014 14:19:21 -0500	[thread overview]
Message-ID: <53065539.4040704@emulex.com> (raw)
In-Reply-To: <20140218174211.GA17778@redhat.com>

yeah - this is pretty silly.  I'll cut a patch to remove the lines.

-- james s


On 2/18/2014 12:42 PM, Dave Jones wrote:
> Looking through coverity reports, and it flagged lpfc_read_fcf_conn_tbl()
> due to the following patch..
>
> commit df0d085fdd2e7c39d1249c2d4ad6b3e176efb60c
> Author: James Smart <james.smart@emulex.com>
> Date:   Fri May 31 17:05:08 2013 -0400
>
>      [SCSI] lpfc 8.3.40: Fixed FCoE connection list vlan identifier and add FCF list debug
>      
>      Signed-off-by: James Smart <james.smart@emulex.com>
>      Signed-off-by: James Bottomley <JBottomley@Parallels.com>
>
> diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
> index 0f6e2548f35d..0309cc15aad6 100644
> --- a/drivers/scsi/lpfc/lpfc_hbadisc.c
> +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
> @@ -6158,12 +6158,44 @@ lpfc_read_fcf_conn_tbl(struct lpfc_hba *phba,
>                  memcpy(&conn_entry->conn_rec, &conn_rec[i],
>                          sizeof(struct lpfc_fcf_conn_rec));
>                  conn_entry->conn_rec.vlan_tag =
> -                       le16_to_cpu(conn_entry->conn_rec.vlan_tag) & 0xFFF;
> +                       conn_entry->conn_rec.vlan_tag;
>                  conn_entry->conn_rec.flags =
> -                       le16_to_cpu(conn_entry->conn_rec.flags);
> +                       conn_entry->conn_rec.flags;
>                  list_add_tail(&conn_entry->list,
>                          &phba->fcf_conn_rec_list);
>
>
> Now that we're not caring about endianness, those two assignments are redundant.
> I gather this has passed testing, because surely someone would have complained by now,
> but can they be removed, or should they be doing something else entirely ?
>
> 	Dave
>
>
>


      reply	other threads:[~2014-02-20 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 17:42 suspicious self-assignment in lpfc Dave Jones
2014-02-20 19:19 ` James Smart [this message]

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=53065539.4040704@emulex.com \
    --to=james.smart@emulex.com \
    --cc=davej@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    /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.