Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755456AbbHGHMe (ORCPT ); Fri, 7 Aug 2015 03:12:34 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:46529 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbbHGHMd (ORCPT ); Fri, 7 Aug 2015 03:12:33 -0400 Date: Fri, 07 Aug 2015 00:12:32 -0700 (PDT) Message-Id: <20150807.001232.883736987030332955.davem@davemloft.net> To: mathieu@codeaurora.org Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] stmmac: dwmac-ipq806x: fix static checker warning From: David Miller In-Reply-To: <1438734302-22930-1-git-send-email-mathieu@codeaurora.org> References: <1438734302-22930-1-git-send-email-mathieu@codeaurora.org> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 07 Aug 2015 00:12:32 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 952 Lines: 25 From: Mathieu Olivari Date: Tue, 4 Aug 2015 17:25:02 -0700 > The patch b1c17215d718: "stmmac: add ipq806x glue layer", leads to the > following static checker warning: > > .../stmmac/dwmac-ipq806x.c:314 ipq806x_gmac_probe() > warn: double left shift '1 << (1 << gmac->id)' > > The NSS_COMMON_CLK_SRC_CTRL_OFFSET macro is used once as an offset, and > once as a mask, which is a bug indeed. We'll fix it by defining the > offset as the real offset value and computing the mask from it when > required. > > Tested on IPQ806x ref designs AP148 & DB149. > > Reported-by: Dan Carpenter > Signed-off-by: Mathieu Olivari Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/