linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.
@ 2021-03-16  8:32 Dan Carpenter
  2021-03-16 12:32 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-03-16  8:32 UTC (permalink / raw)
  To: kbuild, Stephen Boyd
  Cc: lkp, kbuild-all, linux-kernel, Mark Brown, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 3308 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
config: arm-randconfig-m031-20210316 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.

vim +1318 drivers/usb/host/ohci-hcd.c

78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1313  
5e16fabe5dbcff Sylvain Munaut          2006-12-13  1314  	return retval;
                                                                ^^^^^^^^^^^^^

5e16fabe5dbcff Sylvain Munaut          2006-12-13  1315  
5e16fabe5dbcff Sylvain Munaut          2006-12-13  1316  	/* Error path */
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1317  #ifdef TMIO_OHCI_DRIVER
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 @1318  	platform_driver_unregister(&TMIO_OHCI_DRIVER);
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unreachable

78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1319   error_tmio:
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1320  #endif
3ee38d8bf46b36 Ben Dooks               2008-06-08  1321  #ifdef SM501_OHCI_DRIVER
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1322  	platform_driver_unregister(&SM501_OHCI_DRIVER);
3ee38d8bf46b36 Ben Dooks               2008-06-08  1323   error_sm501:
3ee38d8bf46b36 Ben Dooks               2008-06-08  1324  #endif
de44743b033942 Benjamin Herrenschmidt  2007-01-15  1325  #ifdef SA1111_DRIVER
de44743b033942 Benjamin Herrenschmidt  2007-01-15  1326  	sa1111_driver_unregister(&SA1111_DRIVER);
de44743b033942 Benjamin Herrenschmidt  2007-01-15  1327   error_sa1111:
5e16fabe5dbcff Sylvain Munaut          2006-12-13  1328  #endif
495a678fc62e85 Sylvain Munaut          2006-12-13  1329  #ifdef OF_PLATFORM_DRIVER
d35fb6417655eb Grant Likely            2011-02-22  1330  	platform_driver_unregister(&OF_PLATFORM_DRIVER);
de44743b033942 Benjamin Herrenschmidt  2007-01-15  1331   error_of_platform:
495a678fc62e85 Sylvain Munaut          2006-12-13  1332  #endif
6a6c957eba2081 Geoff Levand            2007-01-15  1333  #ifdef PS3_SYSTEM_BUS_DRIVER
7a4eb7fd50d4df Geoff Levand            2007-06-05  1334  	ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
6a6c957eba2081 Geoff Levand            2007-01-15  1335   error_ps3:
5e16fabe5dbcff Sylvain Munaut          2006-12-13  1336  #endif
684c19e0d95f46 Tony Jones              2007-09-11  1337  	debugfs_remove(ohci_debug_root);
684c19e0d95f46 Tony Jones              2007-09-11  1338  	ohci_debug_root = NULL;
684c19e0d95f46 Tony Jones              2007-09-11  1339  
9beeee6584b9aa Alan Stern              2008-10-02  1340  	clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
5e16fabe5dbcff Sylvain Munaut          2006-12-13  1341  	return retval;
5e16fabe5dbcff Sylvain Munaut          2006-12-13  1342  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36373 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.
  2021-03-16  8:32 drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code Dan Carpenter
@ 2021-03-16 12:32 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2021-03-16 12:32 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: kbuild, Stephen Boyd, kbuild test robot, kbuild-all,
	linux-kernel, Mark Brown, Dmitry Baryshkov, Ian Molton

On Tue, Mar 16, 2021 at 9:32 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
> commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
> config: arm-randconfig-m031-20210316 (attached as .config)
> compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> smatch warnings:
> drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.
>
> vim +1318 drivers/usb/host/ohci-hcd.c
>
> 78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1313
> 5e16fabe5dbcff Sylvain Munaut          2006-12-13  1314         return retval;
>                                                                 ^^^^^^^^^^^^^
>
> 5e16fabe5dbcff Sylvain Munaut          2006-12-13  1315
> 5e16fabe5dbcff Sylvain Munaut          2006-12-13  1316         /* Error path */
> 78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08  1317  #ifdef TMIO_OHCI_DRIVER
> 78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 @1318         platform_driver_unregister(&TMIO_OHCI_DRIVER);
>                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Unreachable

It looks like this has been the case since tmio support was added in:
78c73414f4f6 ("USB: ohci: add support for tmio-ohci cell")

I wonder if any of the original developers are still around to fix it, it should
be trivial.

       Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-16 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16  8:32 drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code Dan Carpenter
2021-03-16 12:32 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).