Re: drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: warning: is used uninitialized in this function

From: Tony Lindgren
Date: Fri Apr 27 2018 - 12:05:33 EST


Hi,

* kbuild test robot <lkp@xxxxxxxxx> [180418 17:48]:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: a27fc14219f2e3c4a46ba9177b04d9b52c875532
> commit: 5d1ebbda0318b1ba55eaa1fae3fd867af17b0774 phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4
> date: 5 weeks ago
> config: x86_64-randconfig-a0-04190121 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
> git checkout 5d1ebbda0318b1ba55eaa1fae3fd867af17b0774
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
> #'target_mem_ref' not supported by expression#'drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':
> >> drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: warning: is used uninitialized in this function [-Wuninitialized]
> val |= values[i] << i;
> ~~~~~~^~~

Thanks for the report and sorry for the delay in responding. Looks
like gpiod_get_array_value_cansleep initializes values. But we do
have wrong defines here, see the patch belwo.

Not sure if that is enough to fix the warning here though? I'm not
seeing the warning here with gcc-7.3.0 binutils-2.30.

Regards,

Tony

8< ---------------------