Re: [PATCH2 6/6] staging: brcm80211: align message upon driver load with Kconfig driver name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 21, 2011 at 10:54:53AM +0100, Arend van Spriel wrote:
> Both SoftMAC and FullMAC driver print information upon loading containing
> description and version number. The descriptive text has been aligned with
> the descriptive text used in Kconfig.
> 
> Reviewed-by: Brett Rudley <brudley@xxxxxxxxxxxx>
> Reviewed-by: Henry Ptasinski <henryp@xxxxxxxxxxxx>
> Reviewed-by: Roland Vossen <rvossen@xxxxxxxxxxxx>
> Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
> ---
>  drivers/staging/brcm80211/brcmfmac/dhd_linux.c   |   16 ++++++----------
>  drivers/staging/brcm80211/brcmsmac/wl_mac80211.c |   11 +++++------
>  2 files changed, 11 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
> index 29fff59..a326d0b 100644
> --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
> +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
> @@ -387,12 +387,6 @@ module_param(dhd_pktgen_len, uint, 0);
>  #define DHD_COMPILED
>  #endif
>  
> -static char dhd_version[] = "Dongle Host Driver, version " EPI_VERSION_STR
> -#ifdef DHD_DEBUG
> -"\nCompiled in " " on " __DATE__ " at " __TIME__
> -#endif
> -;
> -
>  #if defined(CONFIG_WIRELESS_EXT)
>  struct iw_statistics *dhd_get_wireless_stats(struct net_device *dev);
>  #endif				/* defined(CONFIG_WIRELESS_EXT) */
> @@ -2103,7 +2097,11 @@ dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
>  	dhd->early_suspend.resume = dhd_late_resume;
>  	register_early_suspend(&dhd->early_suspend);
>  #endif
> -
> +	DHD_ERROR(("Broadcom IEEE802.11n embedded FullMAC WLAN Driver, "
> +		   "version " EPI_VERSION_STR "\n"));

It's an error to print this out?  No, don't ever do this.

> +#ifdef DHD_DEBUG
> +	DHD_ERROR(("Compiled at " __TIME__ " on " __DATE__ "\n"));
> +#endif

I fail to see why this would _ever_ be needed.  Please just remove it.

>  	return &dhd->pub;
>  
>  fail:
> @@ -2466,9 +2464,7 @@ static int __init dhd_module_init(void)
>  
>  	error = dhd_bus_register();
>  
> -	if (!error)
> -		printf("\n%s\n", dhd_version);
> -	else {
> +	if (error) {
>  		DHD_ERROR(("%s: sdio_register_driver failed\n", __func__));
>  		goto faild;
>  	}
> diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
> index f9ba048..e8b3505 100644
> --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
> +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
> @@ -768,18 +768,17 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
>  		WL_ERROR("%s: regulatory_hint failed, status %d\n",
>  			 __func__, err);
>  	}
> -	WL_ERROR("wl%d: Broadcom BCM43xx 802.11 MAC80211 Driver (" PHY_VERSION_STR ")",
> -		 unit);
> +	WL_ERROR("wl%d: Broadcom IEEE802.11n PCIe SoftMAC WLAN Driver, "
> +		 "version " PHY_VERSION_STR "\n", unit);

Same here, this is not an error, nor is it anything that should ever be
sent to the kernel log at any point in time, _unless_ you have some
debug flags enabled.  And even then, I doubt it's needed as you can get
this information from other places (sysfs?), right?

>  
>  #ifdef BCMDBG
> -	printf(" (Compiled at " __TIME__ " on " __DATE__ ")");
> -#endif				/* BCMDBG */
> -	printf("\n");
> +	WL_ERROR("wl%d: Compiled at " __TIME__ " on " __DATE__ "\n", unit);

Same thing as above.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux