Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1218477 > unrolled thread

Re: [PATCH] infiniband:cxgb4:Fix if statement check in the function pick_local_ip6adddrs

Started byDoug Ledford <dledford@redhat.com>
First post2015-09-03 20:10 +0200
Last post2015-09-03 20:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] infiniband:cxgb4:Fix if statement check in the function  pick_local_ip6adddrs Doug Ledford <dledford@redhat.com> - 2015-09-03 20:10 +0200

#1218477 — Re: [PATCH] infiniband:cxgb4:Fix if statement check in the function pick_local_ip6adddrs

FromDoug Ledford <dledford@redhat.com>
Date2015-09-03 20:10 +0200
SubjectRe: [PATCH] infiniband:cxgb4:Fix if statement check in the function pick_local_ip6adddrs
Message-ID<q4H7s-2Kv-35@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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


[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web