Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1102757pxx; Fri, 30 Oct 2020 02:00:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzbEkNbZ8AdZOPIuojS54IBHGdf7VvpVaTjrM5YV8xjDoKtjXVWTS9xRD7X9liDX36paPE X-Received: by 2002:aa7:d844:: with SMTP id f4mr1161587eds.194.1604048457261; Fri, 30 Oct 2020 02:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604048457; cv=none; d=google.com; s=arc-20160816; b=zdVlmhZo98wSB60ZzytJIl03G52wakDt4ZNTLtDEBdRC3YtvxmvFUEM8p/jVrpVMgM vEcv1wDTmB2iiyRpb2kxUlUJRfQKznAJ1lrQNEIAPmO/+4vB/XXuFvkkxNpN4uR0zHZK VoML7Cizf6xjf3mEbZYJHB6WyCQBa514N9h08tjn+cMJsiVnnoETXLvILBEXGEC/ZHip eITgqIvd2HFKRXkDMTJuTw4Th0XUhwttaISr9mzVoI+N7lyuIQhCpq9ELXOf2crwU2gR AUHWAVpJoJPPoo9tgbrexagHEDzDsy+Gf0qHhGLCi63qwcDI5emNFMfCsu27CP63Hzst 4PRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KFyha+jVWs3vNAUNnCwlqigcK5fuTIaB3MtArdLXUM0=; b=E+AuvoZ0KpmIaCYCIkJ1GyBk6yrVB36/QXjy32yBZ1g8VkVHSyPb4vk9mQyVs8jtzW BrpFtUdE9FjaWNiU1xMgmJ2bUv7Edt/VAzng/4q/tyNRif3UFNAydxAcHIqH4vAODr9J 9Amo/G3RtkyytGWkXi+qZ9PnDj9fy2EK2X7uso/halFkq2D0quxgf+HbHfx73zpSdrZ5 KBkDm3Qmvuxyksum3u14FIASVSFL9/zej/q9L/UCth+tAS5RjsDSq0m+rbk/vWrrOX6I b16JbWOe4+wNYWEqapBcOeFIBQORqL5/g7nens0qDtW0WRuaInhhg6Bt5XjktSEYRkOb W/Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D3eRChZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si3634578eja.480.2020.10.30.02.00.34; Fri, 30 Oct 2020 02:00:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D3eRChZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbgJ3I7P (ORCPT + 99 others); Fri, 30 Oct 2020 04:59:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgJ3I7O (ORCPT ); Fri, 30 Oct 2020 04:59:14 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC4C2C0613D2; Fri, 30 Oct 2020 01:59:14 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id r186so4668223pgr.0; Fri, 30 Oct 2020 01:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KFyha+jVWs3vNAUNnCwlqigcK5fuTIaB3MtArdLXUM0=; b=D3eRChZMk3Ya3kNvefizgHTyq1bXsF7+MKPHNGuBnYSiseVZapuqwII/RifglV4+yG kP5IhURWpWVadOMYibOzQ8YpDo5JAz+6nPcMGtXN0HeWbgIBzXVMxXCvm/XCg+lPvy8K nHTyidfA/0A0jWRLxeOsIgeTGNh65E9T+xy093U7V9Y57GH0a+7CJzyZlAHHNv5808IS KMU4/vfsuORPz7RqybcpihpXLy5t9bm20t4OGTgIxX7RWod0/jqjHu+Zzf0psLj/zW+I oDCr3OdYF4vELku89NtEq6YEhvbUjLPnJfWHXmQReUUfDRIU+XFSKN63/VVYk1L/NC1t 6VQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KFyha+jVWs3vNAUNnCwlqigcK5fuTIaB3MtArdLXUM0=; b=WHcoDXSKmlrV2IgvqlU9oXqF6QdWyYpDRGycQzalwqYfJe5oApruB4GyvbaCZ+OCo4 ICw4MupRK5EmH4nf8//rAglQ0JhBvXKt5+mqSpWSWexn32EORQfLbeLmYcAHtPVa1YrJ i/N0VilYico4htGiCgrzzP7Tma2rXT1WvU47tAAKX0Xjl3f1Iiu4vD0MYhHv9eCPFYX2 ipYk6Ku6567xp+G/5Mn+aBVk3CIB024I/YRL5+IwvMEsi5seDYSS0mj2Zth8ZD4ZEZgK OeuUUxmdqpgvOs61/eUTWGU16PVbo4eirU3Fc4GV2ZG2UwuYejOW+T9O37JX1xQpRGpV HH4g== X-Gm-Message-State: AOAM531SduqThDlVt80VLBZgHsFSUscuGR3rsGC2LutkuyAZ65i4FQYp lh9y1vzTJ1RvYoxun4jnDG0= X-Received: by 2002:a17:90a:1f0b:: with SMTP id u11mr1596212pja.105.1604048354235; Fri, 30 Oct 2020 01:59:14 -0700 (PDT) Received: from shane-XPS-13-9380.hsd1.ca.comcast.net ([2601:646:8800:1c00:33f6:681c:5049:8b27]) by smtp.gmail.com with ESMTPSA id n19sm5200786pfu.24.2020.10.30.01.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 01:59:13 -0700 (PDT) From: Xie He To: Zou Wei Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] net: wan: sdla: Use bitwise instead of arithmetic Date: Fri, 30 Oct 2020 01:58:59 -0700 Message-Id: <20201030085859.448125-1-xie.he.0141@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <1603873191-106077-1-git-send-email-zou_wei@huawei.com> References: <1603873191-106077-1-git-send-email-zou_wei@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Fix the following coccinelle warnings: > > ./drivers/net/wan/sdla.c:841:38-39: WARNING: sum of probable bitmasks, consider | > > Reported-by: Hulk Robot > Signed-off-by: Zou Wei > --- > drivers/net/wan/sdla.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c > index bc2c1c7..cf43f4c 100644 > --- a/drivers/net/wan/sdla.c > +++ b/drivers/net/wan/sdla.c > @@ -838,7 +838,8 @@ static void sdla_receive(struct net_device *dev) > case SDLA_S502A: > case SDLA_S502E: > if (success) > - __sdla_read(dev, SDLA_502_RCV_BUF + SDLA_502_DATA_OFS, skb_put(skb,len), len); > + __sdla_read(dev, SDLA_502_RCV_BUF | SDLA_502_DATA_OFS, > + skb_put(skb, len), len); > > SDLA_WINDOW(dev, SDLA_502_RCV_BUF); > cmd->opp_flag = 0; No, this is not a bit-OR. This is a sum. The argument is an address, SDLA_502_RCV_BUF is a base address, SDLA_502_DATA_OFS is an offset. They should be sumed instead of bit-OR'ed.