Received: by 10.223.176.46 with SMTP id f43csp101213wra; Thu, 18 Jan 2018 14:33:03 -0800 (PST) X-Google-Smtp-Source: ACJfBot2CU+40f/r3xdXVZ3mV7+3kqc+n9FS+HLHaBGOpyp14FHOUNgelkarlV21uS9YbFWR0WQp X-Received: by 10.99.44.22 with SMTP id s22mr6307304pgs.35.1516314783471; Thu, 18 Jan 2018 14:33:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516314783; cv=none; d=google.com; s=arc-20160816; b=o7v8J3/e/zWXHhs78CUKT5yqA5ydHVoVXNH28Gtzu+lXAt5ESXC57zohge0/pz3Qkq +bbV2TQGq8A6mvFBepooHfR72aDXNvB6SS3En+ihOM+jy5FeMRPORJQZEWsgY90WveTZ 8yrf3q68Tu2AjsWULWxo2gY25Rgmam+S2TGupFE790Bpr6N7FKZBW7i2KdT3if7LxeD9 KJXpWfz8NFgaN+u7cWzDkLNlB5a1o2/jZFBbb2hQ3eB6uyBVl0Jxp4DrKJLQ6HCATmML +TsMI5yNi07Di/sZklUQ6Vw3Vy7ZDiPp0WONP9OgoqlnIIUdQCEm+wB1bfXLgagg81/U w8Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=QKRubZ+THtdGLlTvOH8gujx2En5TH+ViHTI4DMsnbeg=; b=momlss9rf/SwIB3JhPDA4Hh/L8SgkHVxTAFmsLiiLN6Rag0jl4zGcWKYmFGm0dypoH LCKeykU5hGra4p5tfL6jkYxApU5MLmo1Rt7VvBIQAzdE7x//UQYgjtU5DNDkiYvn72Xz doULrlEKHHKH2/O3z0NW67DbwLP/F+UjNtib+ipHm+UdfKns3Qc5Y4h8wfl+4I3POn1v +g2hv7mVSIq6oe187VFbkr4Xj374xV+mpxe2wDzQHm/KTU+/h84T8vZwAbAOIuXNEZ31 hMWos8DIIvfHpIYxor1o2lpdn3EtHt0nsLPAc3817PrTFkjgY77nruTXOhyhiMLwzIUC cKvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=Z0lNJGLX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24-v6si261113pll.361.2018.01.18.14.32.49; Thu, 18 Jan 2018 14:33:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=Z0lNJGLX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932462AbeARWbL (ORCPT + 99 others); Thu, 18 Jan 2018 17:31:11 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:45627 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932234AbeARWbC (ORCPT ); Thu, 18 Jan 2018 17:31:02 -0500 Received: by mail-qt0-f194.google.com with SMTP id x27so26289429qtm.12 for ; Thu, 18 Jan 2018 14:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kudzu-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QKRubZ+THtdGLlTvOH8gujx2En5TH+ViHTI4DMsnbeg=; b=Z0lNJGLXMSdQu3+QInYTH3lJTTJB0l75UdQVpJ01X5UmypL6APs6M2lIHYxih8IcVK 435ALfbz9pi/xYzzsz8HLaxpvvcAbzo6yrt9jF2/lLlMZvtYM17JNN0F+RmLPxg/D5kj A93MFT7cmFtIOnfEh/+9JoiWBrhfZbR/XVom4HH6J75mBZ8LLA3h2DgRqwNDSEOaio68 fZgWcVof2RQteuJXIgNLZn9YNEymUIerNTJ552BCHE7jAcLVGqLunAI8zbNRZY47YBgp bDU4NTI1WZNLcJi6tZKFoW1Ax9L3JWcl0mZF96CRjhAtIYAahIxCojWSdNs3joyxWw67 hvMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QKRubZ+THtdGLlTvOH8gujx2En5TH+ViHTI4DMsnbeg=; b=gPR35iBJ0AjswaNCiBugmHDv2emGb7g1tNEjVl6EPVrkObJDdW2ghmoCaFwQyNfYd5 jnHsSBfxKkE6VazZPPuJp3zSKlm7wmq0qWVGMdVQigCV6KswyEJ5B+kXCa9hFif1HomV 23illEhYlRnMq/AGDnSlMwz3EN7eqP9j2AUb+F96O0vITPZUn7ULlad2Sk6QICQiYuTK OoZKyS2ILlurIMoLRtCHfWcX1yfHPCSMNAR8Jyw96mcl8KftQ8mxoaOt1sRkNIezOU+H kvJ/NKq9ETulGsxZ/KpgqtDNa7CilHRo565VH14ZSm5fU6CLuxkHhPRKLCgmqxPNENrc g5Jw== X-Gm-Message-State: AKwxytf7uADDA9FoKjcKVjtcsw6iQq84Vv2XlGIVtTRjhX2YAheJa8VH NFmVEITIuTsSMOCLeRjNA3R6AA== X-Received: by 10.200.57.75 with SMTP id t11mr37366599qtb.325.1516314661831; Thu, 18 Jan 2018 14:31:01 -0800 (PST) Received: from kudzu.us ([98.122.141.161]) by smtp.gmail.com with ESMTPSA id y140sm5252581qkb.37.2018.01.18.14.31.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 14:31:01 -0800 (PST) Date: Thu, 18 Jan 2018 17:30:59 -0500 From: Jon Mason To: Arnd Bergmann Cc: Kurt Schwemmer , Logan Gunthorpe , Dave Jiang , Allen Hubbe , Stephen Bates , linux-pci@vger.kernel.org, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [RESEND] ntb_hw_switchtec: fix logic error Message-ID: <20180118223058.GE25893@kudzu.us> References: <20180116135116.4065102-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180116135116.4065102-1-arnd@arndb.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 16, 2018 at 02:50:51PM +0100, Arnd Bergmann wrote: > Newer gcc (version 7 and 8 presumably) warn about a statement mixing > the << operator with logical and: > > drivers/ntb/hw/mscc/ntb_hw_switchtec.c: In function 'switchtec_ntb_init_sndev': > drivers/ntb/hw/mscc/ntb_hw_switchtec.c:888:24: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] > > My interpretation here is that the author must have intended a bitmask > rather than a comparison, so I'm changing the '&&' to '&', which makes > a lot more sense in the context. > > Fixes: 1b249475275d ("ntb_hw_switchtec: Allow using Switchtec NTB in multi-partition setups") > Reviewed-by: Logan Gunthorpe > Signed-off-by: Arnd Bergmann > ---- > Originally sent on Dec 9, but this patch never got picked up Sorry for missing the patch. Applied to ntb-next. Thanks, Jon > --- > drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c > index bcd5b6fb3800..76acb8bba3f2 100644 > --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c > +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c > @@ -885,7 +885,7 @@ static int switchtec_ntb_init_sndev(struct switchtec_ntb *sndev) > } > > sndev->peer_partition = ffs(tpart_vec) - 1; > - if (!(part_map && (1 << sndev->peer_partition))) { > + if (!(part_map & (1 << sndev->peer_partition))) { > dev_err(&sndev->stdev->dev, > "ntb target partition is not NT partition\n"); > return -ENODEV; > -- > 2.9.0 >