Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: reduce kernel log spam on driver registration

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>

authored by

Ard Biesheuvel and committed by
Greg Kroah-Hartman
10174220 8f36b3b4

-39
-1
drivers/usb/host/ehci-atmel.c
··· 239 239 if (usb_disabled()) 240 240 return -ENODEV; 241 241 242 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 243 242 ehci_init_driver(&ehci_atmel_hc_driver, &ehci_atmel_drv_overrides); 244 243 return platform_driver_register(&ehci_atmel_driver); 245 244 }
-1
drivers/usb/host/ehci-exynos.c
··· 347 347 if (usb_disabled()) 348 348 return -ENODEV; 349 349 350 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 351 350 ehci_init_driver(&exynos_ehci_hc_driver, &exynos_overrides); 352 351 return platform_driver_register(&exynos_ehci_driver); 353 352 }
-2
drivers/usb/host/ehci-fsl.c
··· 722 722 if (usb_disabled()) 723 723 return -ENODEV; 724 724 725 - pr_info(DRV_NAME ": " DRIVER_DESC "\n"); 726 - 727 725 ehci_init_driver(&fsl_ehci_hc_driver, &ehci_fsl_overrides); 728 726 729 727 fsl_ehci_hc_driver.product_desc =
-1
drivers/usb/host/ehci-hcd.c
··· 1351 1351 if (usb_disabled()) 1352 1352 return -ENODEV; 1353 1353 1354 - printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name); 1355 1354 set_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 1356 1355 if (test_bit(USB_UHCI_LOADED, &usb_hcds_loaded) || 1357 1356 test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
-2
drivers/usb/host/ehci-npcm7xx.c
··· 141 141 if (usb_disabled()) 142 142 return -ENODEV; 143 143 144 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 145 - 146 144 ehci_init_driver(&ehci_npcm7xx_hc_driver, NULL); 147 145 return platform_driver_register(&npcm7xx_ehci_hcd_driver); 148 146 }
-2
drivers/usb/host/ehci-omap.c
··· 284 284 if (usb_disabled()) 285 285 return -ENODEV; 286 286 287 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 288 - 289 287 ehci_init_driver(&ehci_omap_hc_driver, &ehci_omap_overrides); 290 288 return platform_driver_register(&ehci_hcd_omap_driver); 291 289 }
-2
drivers/usb/host/ehci-orion.c
··· 361 361 if (usb_disabled()) 362 362 return -ENODEV; 363 363 364 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 365 - 366 364 ehci_init_driver(&ehci_orion_hc_driver, &orion_overrides); 367 365 return platform_driver_register(&ehci_orion_driver); 368 366 }
-2
drivers/usb/host/ehci-pci.c
··· 423 423 if (usb_disabled()) 424 424 return -ENODEV; 425 425 426 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 427 - 428 426 ehci_init_driver(&ehci_pci_hc_driver, &pci_overrides); 429 427 430 428 /* Entries for the PCI suspend/resume callbacks are special */
-2
drivers/usb/host/ehci-platform.c
··· 529 529 if (usb_disabled()) 530 530 return -ENODEV; 531 531 532 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 533 - 534 532 ehci_init_driver(&ehci_platform_hc_driver, &platform_overrides); 535 533 return platform_driver_register(&ehci_platform_driver); 536 534 }
-2
drivers/usb/host/ehci-spear.c
··· 167 167 if (usb_disabled()) 168 168 return -ENODEV; 169 169 170 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 171 - 172 170 ehci_init_driver(&ehci_spear_hc_driver, &spear_overrides); 173 171 return platform_driver_register(&spear_ehci_hcd_driver); 174 172 }
-2
drivers/usb/host/ehci-st.c
··· 346 346 if (usb_disabled()) 347 347 return -ENODEV; 348 348 349 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 350 - 351 349 ehci_init_driver(&ehci_platform_hc_driver, &platform_overrides); 352 350 return platform_driver_register(&ehci_platform_driver); 353 351 }
-1
drivers/usb/host/fotg210-hcd.c
··· 5692 5692 if (usb_disabled()) 5693 5693 return -ENODEV; 5694 5694 5695 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 5696 5695 set_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5697 5696 if (test_bit(USB_UHCI_LOADED, &usb_hcds_loaded) || 5698 5697 test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
-1
drivers/usb/host/ohci-at91.c
··· 699 699 if (usb_disabled()) 700 700 return -ENODEV; 701 701 702 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 703 702 ohci_init_driver(&ohci_at91_hc_driver, &ohci_at91_drv_overrides); 704 703 705 704 /*
-1
drivers/usb/host/ohci-da8xx.c
··· 551 551 if (usb_disabled()) 552 552 return -ENODEV; 553 553 554 - pr_info("%s: " DRIVER_DESC "\n", DRV_NAME); 555 554 ohci_init_driver(&ohci_da8xx_hc_driver, &da8xx_overrides); 556 555 557 556 /*
-1
drivers/usb/host/ohci-exynos.c
··· 310 310 if (usb_disabled()) 311 311 return -ENODEV; 312 312 313 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 314 313 ohci_init_driver(&exynos_ohci_hc_driver, &exynos_overrides); 315 314 return platform_driver_register(&exynos_ohci_driver); 316 315 }
-1
drivers/usb/host/ohci-hcd.c
··· 1276 1276 if (usb_disabled()) 1277 1277 return -ENODEV; 1278 1278 1279 - printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name); 1280 1279 pr_debug ("%s: block sizes: ed %zd td %zd\n", hcd_name, 1281 1280 sizeof (struct ed), sizeof (struct td)); 1282 1281 set_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
-2
drivers/usb/host/ohci-nxp.c
··· 275 275 if (usb_disabled()) 276 276 return -ENODEV; 277 277 278 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 279 - 280 278 ohci_init_driver(&ohci_nxp_hc_driver, NULL); 281 279 return platform_driver_register(&ohci_hcd_nxp_driver); 282 280 }
-2
drivers/usb/host/ohci-omap.c
··· 423 423 if (usb_disabled()) 424 424 return -ENODEV; 425 425 426 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 427 - 428 426 ohci_init_driver(&ohci_omap_hc_driver, &omap_overrides); 429 427 return platform_driver_register(&ohci_hcd_omap_driver); 430 428 }
-2
drivers/usb/host/ohci-pci.c
··· 306 306 if (usb_disabled()) 307 307 return -ENODEV; 308 308 309 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 310 - 311 309 ohci_init_driver(&ohci_pci_hc_driver, &pci_overrides); 312 310 313 311 #ifdef CONFIG_PM
-2
drivers/usb/host/ohci-platform.c
··· 346 346 if (usb_disabled()) 347 347 return -ENODEV; 348 348 349 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 350 - 351 349 ohci_init_driver(&ohci_platform_hc_driver, &platform_overrides); 352 350 return platform_driver_register(&ohci_platform_driver); 353 351 }
-2
drivers/usb/host/ohci-pxa27x.c
··· 608 608 if (usb_disabled()) 609 609 return -ENODEV; 610 610 611 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 612 - 613 611 ohci_init_driver(&ohci_pxa27x_hc_driver, &pxa27x_overrides); 614 612 ohci_pxa27x_hc_driver.hub_control = pxa27x_ohci_hub_control; 615 613
-1
drivers/usb/host/ohci-s3c2410.c
··· 474 474 if (usb_disabled()) 475 475 return -ENODEV; 476 476 477 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 478 477 ohci_init_driver(&ohci_s3c2410_hc_driver, NULL); 479 478 480 479 /*
-2
drivers/usb/host/ohci-spear.c
··· 179 179 if (usb_disabled()) 180 180 return -ENODEV; 181 181 182 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 183 - 184 182 ohci_init_driver(&ohci_spear_hc_driver, &spear_overrides); 185 183 return platform_driver_register(&spear_ohci_hcd_driver); 186 184 }
-2
drivers/usb/host/ohci-st.c
··· 324 324 if (usb_disabled()) 325 325 return -ENODEV; 326 326 327 - pr_info("%s: " DRIVER_DESC "\n", hcd_name); 328 - 329 327 ohci_init_driver(&ohci_platform_hc_driver, &platform_overrides); 330 328 return platform_driver_register(&ohci_platform_driver); 331 329 }