[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5459AC0C.8080703@wwwdotorg.org>
Date: Tue, 04 Nov 2014 21:48:12 -0700
From: Stephen Warren <swarren@...dotorg.org>
To: Scott Branden <sbranden@...adcom.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Russell King <rmk+kernel@....linux.org.uk>,
Peter Griffin <peter.griffin@...aro.org>,
Chris Ball <chris@...ntf.net>,
Piotr Krol <pietrushnic@...il.com>
CC: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
Joe Perches <joe@...ches.com>,
linux-rpi-kernel@...ts.infradead.org, Ray Jui <rjui@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCHv2 2/5] mmc: sdhci-bcm2835: make shift calculations consistent
On 10/30/2014 12:36 AM, Scott Branden wrote:
> Make the shift calculations consistent rather than having different
> implementations to calculate the same thing.
> diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c
> +#define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)
This should really be the following so people don't have to memorize
operator precedence:
#define REG_OFFSET_IN_BITS(reg) (((reg) << 3) & 0x18)
(I've been bit by people mis-remembering precedence in very similar code...)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists