From mboxrd@z Thu Jan 1 00:00:00 1970 From: "eric miao" Subject: Re: [PATCH] gpio: max732x: add support for MAX7319, MAX7320-7327 I2C Port Expanders Date: Fri, 11 Jul 2008 17:39:50 +0800 Message-ID: References: <4875A893.3090402@gmail.com> <20080711102952.31d2d943@hyperion.delvare> <20080711113114.79d80212@hyperion.delvare> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080711113114.79d80212-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Errors-To: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org To: Jean Delvare Cc: David Brownell , Jack Ren , i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org, linux-arm-kernel List-Id: linux-i2c@vger.kernel.org > > Oh, and one more thing as I just notice it: > >> +static inline int is_group_a(struct max732x_chip *chip, unsigned off) >> +{ >> + return (1u << off) & chip->mask_group_a; >> +} > > Given the way you use it, can't you just define this function as: > > static inline int is_group_a(struct max732x_chip *chip, unsigned off) > { > return (off < 8); > } > > ? As this is the only place where you use chip->mask_group_a, you would > be able to get rid of it. > I want to get rid of it either but I'm afraid not. (off < 8) doesn't necessarily mean it's in group_a, max7320 is an exception. > -- > Jean Delvare > -- Cheers - eric _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c