Re: [PATCH 2/7] ASoC: rt5677: clean up gpiolib callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 02, 2015 at 02:09:13AM +0300, Vladimir Zapolskiy wrote:

> +		if (value)
> +			val = RT5677_GPIO_OUT_HI(offset);

It seems like a greater variation in variable names might be called for
here.

>  		regmap_update_bits(rt5677->regmap, RT5677_GPIO_CTRL2,
> -			0x1 << (offset * 3 + 1), !!value << (offset * 3 + 1));
> +				   RT5677_GPIO_OUT_MASK(offset), val);

Besides, isn't the minimal change here just to remove the !! (or do
nothing)?  C defines a mapping between boolean and integer values.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux