]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
extcon: cht-wc: Return from default case to avoid warnings
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 27 Aug 2018 15:35:53 +0000 (18:35 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:24 +0000 (13:16 +0100)
commit5a68b712f25a4ff62bf5984821834ec946d82584
tree62013a5ada632b376d68258aaa07926b8ba3e5d2
parentcf4b5da4869ac99109e9148ce9d8a9acbbc739bf
extcon: cht-wc: Return from default case to avoid warnings

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 962341b54b99965ebec5f70c8d39f1c382eea833 ]

When we have first case to fall through it's not enough to put
single comment there to satisfy compiler. Instead of doing that,
return fall back value directly from default case.

This to avoid following warnings:

drivers/extcon/extcon-intel-cht-wc.c: In function ‘cht_wc_extcon_get_charger’:
include/linux/device.h:1420:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
  _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/extcon/extcon-intel-cht-wc.c:148:3: note: in expansion of macro ‘dev_warn’
   dev_warn(ext->dev,
   ^~~~~~~~
drivers/extcon/extcon-intel-cht-wc.c:152:2: note: here
  case CHT_WC_USBSRC_TYPE_SDP:
  ^~~~

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/extcon/extcon-intel-cht-wc.c