From: Doug Ledford <dledford@redhat.com>
To: Nicholas Krause <xerofoify@gmail.com>, swise@chelsio.com
Cc: sean.hefty@intel.com, hal.rosenstock@gmail.com,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] infiniband:cxgb4:Fix if statement check in the function pick_local_ip6adddrs
Date: Thu, 3 Sep 2015 14:05:47 -0400 [thread overview]
Message-ID: <55E88BFB.8070609@redhat.com> (raw)
In-Reply-To: <1440644459-13595-1-git-send-email-xerofoify@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
On 08/26/2015 11:00 PM, Nicholas Krause wrote:
> This fixes a if statement checking the return value of the function
> get_lladdr for success in the function pick_local_ip6addrs to instead
> of directly checking the return value of this call check the opposite
> as get_lladdr returns zero for success which would incorrectly make
> this if statement block not execute with the current if statement
> check.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Thanks, applied.
> ---
> drivers/infiniband/hw/cxgb4/cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
> index 3ad8dc7..b85b94b 100644
> --- a/drivers/infiniband/hw/cxgb4/cm.c
> +++ b/drivers/infiniband/hw/cxgb4/cm.c
> @@ -2976,7 +2976,7 @@ static int pick_local_ip6addrs(struct c4iw_dev *dev, struct iw_cm_id *cm_id)
> struct sockaddr_in6 *la6 = (struct sockaddr_in6 *)&cm_id->local_addr;
> struct sockaddr_in6 *ra6 = (struct sockaddr_in6 *)&cm_id->remote_addr;
>
> - if (get_lladdr(dev->rdev.lldi.ports[0], &addr, IFA_F_TENTATIVE)) {
> + if (!get_lladdr(dev->rdev.lldi.ports[0], &addr, IFA_F_TENTATIVE)) {
> memcpy(la6->sin6_addr.s6_addr, &addr, 16);
> memcpy(ra6->sin6_addr.s6_addr, &addr, 16);
> return 0;
>
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
prev parent reply other threads:[~2015-09-03 18:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1440644459-13595-1-git-send-email-xerofoify@gmail.com>
[not found] ` <1440644459-13595-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-27 14:18 ` [PATCH] infiniband:cxgb4:Fix if statement check in the function pick_local_ip6adddrs Steve Wise
2015-09-03 18:05 ` Doug Ledford [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=55E88BFB.8070609@redhat.com \
--to=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
--cc=swise@chelsio.com \
--cc=xerofoify@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 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).