Re: [patch] kill compile warning on twl4030-power.c

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

 



> > > -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> > > -       /* Disabling AC charger effect on sleep-active transitions */
> > > -       err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> > > -                                       R_CFG_P1_TRANSITION);
> > > -       data &= 0x0;
> > 
> > This does not make sense :) 
> 
> Why not? That data variable is only used on 3430SDP and LABRADOR
> anyways. Any other build will keep generating "unused variable" warnings
> and that's annoying :-p

Because a logical and with 0 will always result in 0. So the read is
useless. So the original code is probably wrong.

Cheers,

Peter.
-- 
goa is a state of mind
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux