usb: reduce kernel log spam on driver registration
authorArd Biesheuvel <ardb@kernel.org>
Thu, 25 Aug 2022 17:03:27 +0000 (19:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 07:07:53 +0000 (09:07 +0200)
Drivers are typically supposed to be quiet unless they are actually
probed, but for some reason, USB host controllers seem to be exempt from
this rule, and happily broadcast their existence into the kernel log at
boot even if the hardware in question is nowhere to be found.

Let's fix that, and remove these pr_info() calls.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avi Fishman <avifishman70@gmail.com>
Cc: Tomer Maimon <tmaimon77@gmail.com>
Cc: Tali Perry <tali.perry1@gmail.com>
Cc: Patrick Venture <venture@google.com>
Cc: Nancy Yuen <yuenn@google.com>
Cc: Benjamin Fair <benjaminfair@google.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220825170327.674446-1-ardb@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 files changed:
drivers/usb/host/ehci-atmel.c
drivers/usb/host/ehci-exynos.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-npcm7xx.c
drivers/usb/host/ehci-omap.c
drivers/usb/host/ehci-orion.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-platform.c
drivers/usb/host/ehci-spear.c
drivers/usb/host/ehci-st.c
drivers/usb/host/fotg210-hcd.c
drivers/usb/host/ohci-at91.c
drivers/usb/host/ohci-da8xx.c
drivers/usb/host/ohci-exynos.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-nxp.c
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci-pci.c
drivers/usb/host/ohci-platform.c
drivers/usb/host/ohci-pxa27x.c
drivers/usb/host/ohci-s3c2410.c
drivers/usb/host/ohci-spear.c
drivers/usb/host/ohci-st.c

index 05d41fd65f254838ef7c917e498f61a056aefb5c..0e995019c1df915e0057b335cef3f1d832615203 100644 (file)
@@ -239,7 +239,6 @@ static int __init ehci_atmel_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
        ehci_init_driver(&ehci_atmel_hc_driver, &ehci_atmel_drv_overrides);
        return platform_driver_register(&ehci_atmel_driver);
 }
index 1a9b7572e17fe681056f054ac764a98ba31919eb..a65e365e3a047ed9b0ff600ee85eaad9a46ee33c 100644 (file)
@@ -347,7 +347,6 @@ static int __init ehci_exynos_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
        ehci_init_driver(&exynos_ehci_hc_driver, &exynos_overrides);
        return platform_driver_register(&exynos_ehci_driver);
 }
index 896c0d107f725d8ecd5d2d525b2b643d1c192a44..9cea785934e596434a0ff380667f29771913168a 100644 (file)
@@ -722,8 +722,6 @@ static int __init ehci_fsl_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info(DRV_NAME ": " DRIVER_DESC "\n");
-
        ehci_init_driver(&fsl_ehci_hc_driver, &ehci_fsl_overrides);
 
        fsl_ehci_hc_driver.product_desc =
index 684164fa97169d3da8f8c50e65c0cc86b089797b..a1930db0da1c3c82af1e6becd92ac8f34f5efe48 100644 (file)
@@ -1351,7 +1351,6 @@ static int __init ehci_hcd_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name);
        set_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
        if (test_bit(USB_UHCI_LOADED, &usb_hcds_loaded) ||
                        test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
index 1d2e2c3c0bf011c3edf01510d2781e8b6afb458b..f4060b3cba1a8687bc37015713daba9b2036bd55 100644 (file)
@@ -141,8 +141,6 @@ static int __init ehci_npcm7xx_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_npcm7xx_hc_driver, NULL);
        return platform_driver_register(&npcm7xx_ehci_hcd_driver);
 }
index 8c45bc17a580eedf334bbd3878b89636c2001e93..7dd984722a7f7daeafb66504475bf3b91d8ff6ed 100644 (file)
@@ -284,8 +284,6 @@ static int __init ehci_omap_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_omap_hc_driver, &ehci_omap_overrides);
        return platform_driver_register(&ehci_hcd_omap_driver);
 }
index 3626758b3e2aa1ccd27881509e97b2b1ff67214a..2c8b1e6f1fffebf3efc95c7c784782470572a652 100644 (file)
@@ -361,8 +361,6 @@ static int __init ehci_orion_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_orion_hc_driver, &orion_overrides);
        return platform_driver_register(&ehci_orion_driver);
 }
index 9937c5a7efc2d139cf759355fa0530f0dfc0b180..9581952d999a633956732dc5a8650dac89a3e34f 100644 (file)
@@ -423,8 +423,6 @@ static int __init ehci_pci_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_pci_hc_driver, &pci_overrides);
 
        /* Entries for the PCI suspend/resume callbacks are special */
index 6924f0316e9a8375456d0401b2b3fa0299ff2aad..50491eea94092c7b81ee50d9c693d308c4650296 100644 (file)
@@ -529,8 +529,6 @@ static int __init ehci_platform_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_platform_hc_driver, &platform_overrides);
        return platform_driver_register(&ehci_platform_driver);
 }
index 3694e450a11a1be32ba3389219fd4c6c0b4d3ec6..13369289d9cc286e868854358a79d61c00b859fa 100644 (file)
@@ -167,8 +167,6 @@ static int __init ehci_spear_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_spear_hc_driver, &spear_overrides);
        return platform_driver_register(&spear_ehci_hcd_driver);
 }
index f74433aac94860e70bdf8fb705593f1a6b67dde0..1086078133f8ba4e90302979d013ff2d4f51d6d5 100644 (file)
@@ -346,8 +346,6 @@ static int __init ehci_platform_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ehci_init_driver(&ehci_platform_hc_driver, &platform_overrides);
        return platform_driver_register(&ehci_platform_driver);
 }
index f8c111e08a0d5fc11e57dbc55a3022c012b4a68d..3d1dbcf4c07326ff39a09fe1b25f7a9363e4bfc8 100644 (file)
@@ -5692,7 +5692,6 @@ static int __init fotg210_hcd_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
        set_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
        if (test_bit(USB_UHCI_LOADED, &usb_hcds_loaded) ||
                        test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
index 98326465e2dc25a4abb3fc4d73c8955507a3bc05..adf0998f02992e8ea6a4ca9922f990a3d6a68f41 100644 (file)
@@ -699,7 +699,6 @@ static int __init ohci_at91_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
        ohci_init_driver(&ohci_at91_hc_driver, &ohci_at91_drv_overrides);
 
        /*
index 1371b0c249ece0d4985222e74f91ea6caf637128..d4818e8d652b2eb8d870c741e7a28b3c934749d2 100644 (file)
@@ -551,7 +551,6 @@ static int __init ohci_da8xx_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", DRV_NAME);
        ohci_init_driver(&ohci_da8xx_hc_driver, &da8xx_overrides);
 
        /*
index 5f5e8a64c8e2e01761fbf710c298d6e2fe2cc831..a060be6ae27423c5b44141127e1e6d9b712600bc 100644 (file)
@@ -310,7 +310,6 @@ static int __init ohci_exynos_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
        ohci_init_driver(&exynos_ohci_hc_driver, &exynos_overrides);
        return platform_driver_register(&exynos_ohci_driver);
 }
index c4c821c2288c262d88aa2864bb6a252937011a5f..0457dd9f6c19ab7985524ead90bc81294531e4d5 100644 (file)
@@ -1276,7 +1276,6 @@ static int __init ohci_hcd_mod_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name);
        pr_debug ("%s: block sizes: ed %zd td %zd\n", hcd_name,
                sizeof (struct ed), sizeof (struct td));
        set_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
index 106a6bcefb0871991099c0e229e8b379151ae0d0..5b32e683e367d3dd10aa95350d6f136962c9f0d3 100644 (file)
@@ -275,8 +275,6 @@ static int __init ohci_nxp_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_nxp_hc_driver, NULL);
        return platform_driver_register(&ohci_hcd_nxp_driver);
 }
index f5bc9c8bdc9a3edc24b962e777cbb7352f92437f..cb29701df911c5fe29d77f5838e2de6203aec72b 100644 (file)
@@ -423,8 +423,6 @@ static int __init ohci_omap_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_omap_hc_driver, &omap_overrides);
        return platform_driver_register(&ohci_hcd_omap_driver);
 }
index 41efe927d8f3f5ec4cfcdd7fd20e43fc09408b2f..a146b2d3ef0bc2a43ee8872454c44d5efe7891c7 100644 (file)
@@ -306,8 +306,6 @@ static int __init ohci_pci_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_pci_hc_driver, &pci_overrides);
 
 #ifdef CONFIG_PM
index 0adae626512766e0f32cb7c9c61e2bace05df5a7..6d56b52966c73a451372892eaf53fcca066e1b0d 100644 (file)
@@ -346,8 +346,6 @@ static int __init ohci_platform_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_platform_hc_driver, &platform_overrides);
        return platform_driver_register(&ohci_platform_driver);
 }
index ab4f610a0140f2bc87bd283c17344dac1d6f0130..f2504b884e92e0918311ceb3d269a70185fa6744 100644 (file)
@@ -608,8 +608,6 @@ static int __init ohci_pxa27x_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_pxa27x_hc_driver, &pxa27x_overrides);
        ohci_pxa27x_hc_driver.hub_control = pxa27x_ohci_hub_control;
 
index 12264c0486013fb22c32485a7b4ac92788ebd904..7207c7a3cf492e77fc5ba8c93f0cb2c2fb672a2a 100644 (file)
@@ -474,7 +474,6 @@ static int __init ohci_s3c2410_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
        ohci_init_driver(&ohci_s3c2410_hc_driver, NULL);
 
        /*
index 9b81f420656d6b8ec5b2fd3fbda9bdc8f8d44655..71a3f18fe1be553a4e11c554b686d987db4769d3 100644 (file)
@@ -179,8 +179,6 @@ static int __init ohci_spear_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_spear_hc_driver, &spear_overrides);
        return platform_driver_register(&spear_ohci_hcd_driver);
 }
index ac796ccd93ef45e3a1b233b1cb53c4b49cb0dfa7..2e542a344aae814384e39efc84f70e5631c64de0 100644 (file)
@@ -324,8 +324,6 @@ static int __init ohci_platform_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
-
        ohci_init_driver(&ohci_platform_hc_driver, &platform_overrides);
        return platform_driver_register(&ohci_platform_driver);
 }