Re: drivers/extcon/extcon-intel-cht-wc.c:153:3: warning: this statement may fall through

From: Hans de Goede
Date: Sat Dec 02 2023 - 17:54:59 EST


Hi,

On 11/22/23 00:27, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c2d5304e6c648ebcf653bace7e51e0e6742e46c8
> commit: de85d79f4aab67fe0537dd6e2c5d545b88239cc4 mfd: Add Cherry Trail Whiskey Cove PMIC driver
> date: 6 years ago
> config: i386-randconfig-002-20231120 (https://download.01.org/0day-ci/archive/20231122/202311220741.oIvJcjV4-lkp@xxxxxxxxx/config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231122/202311220741.oIvJcjV4-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202311220741.oIvJcjV4-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
> drivers/extcon/extcon-intel-cht-wc.c: In function 'cht_wc_extcon_get_charger':
>>> drivers/extcon/extcon-intel-cht-wc.c:153:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> dev_warn(ext->dev,
> ^~~~~~~~~~~~~~~~~~
> "Unhandled charger type %d, defaulting to SDP\n",
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ret);
> ~~~~
> drivers/extcon/extcon-intel-cht-wc.c:157:2: note: here
> case CHT_WC_USBSRC_TYPE_SDP:
> ^~~~

I have no idea why lkp is reporting this warning now, this has long been fixed, see:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/extcon/extcon-intel-cht-wc.c?id=962341b54b99965ebec5f70c8d39f1c382eea833

Regards,

Hans