From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752294AbdLFRhS (ORCPT ); Wed, 6 Dec 2017 12:37:18 -0500 Received: from ale.deltatee.com ([207.54.116.67]:59456 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbdLFRhO (ORCPT ); Wed, 6 Dec 2017 12:37:14 -0500 To: Arnd Bergmann , Kurt Schwemmer , Jon Mason , Dave Jiang , Allen Hubbe Cc: Stephen Bates , Colin Ian King , Doug Meyer , Kelvin Cao , linux-pci@vger.kernel.org, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org References: <20171206141923.817850-1-arnd@arndb.de> From: Logan Gunthorpe Message-ID: <6cdab766-60a2-0ef9-5495-f842acde8604@deltatee.com> Date: Wed, 6 Dec 2017 10:37:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171206141923.817850-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, linux-pci@vger.kernel.org, kelvin.cao@microsemi.com, dmeyer@gigaio.com, colin.king@canonical.com, sbates@raithlin.com, Allen.Hubbe@emc.com, dave.jiang@intel.com, jdmason@kudzu.us, kurt.schwemmer@microsemi.com, arnd@arndb.de X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH] ntb_hw_switchtec: fix logic error X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, Thanks, nice catch. On 06/12/17 07:19 AM, 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") > Signed-off-by: Arnd Bergmann Reviewed-by: Logan Gunthorpe Logan