lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240405225156.GE91663@darkstar.musicnaut.iki.fi>
Date: Sat, 6 Apr 2024 01:51:56 +0300
From: Aaro Koskinen <aaro.koskinen@....fi>
To: Arnd Bergmann <arnd@...nel.org>
Cc: linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>,
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
	linux-usb@...r.kernel.org
Subject: Re: [PATCH 25/34] usb: gadget: omap_udc: remove unused variable

Hi,

On Wed, Apr 03, 2024 at 10:06:43AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The driver_desc variable is only used in some configurations:
> 
> drivers/usb/gadget/udc/omap_udc.c:113:19: error: unused variable 'driver_desc' [-Werror,-Wunused-const-variable]
> 
> Since there is only ever one user of it, just open-code the string in place
> and remove the global variable and the macro behind it. This also helps
> grep for the MODULE_DESCRIPTION string.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Acked-by: Aaro Koskinen <aaro.koskinen@....fi>

A.

> ---
>  drivers/usb/gadget/udc/omap_udc.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c
> index f90eeecf27de..e13b8ec8ef8a 100644
> --- a/drivers/usb/gadget/udc/omap_udc.c
> +++ b/drivers/usb/gadget/udc/omap_udc.c
> @@ -56,7 +56,6 @@
>  /* ISO too */
>  #define	USE_ISO
>  
> -#define	DRIVER_DESC	"OMAP UDC driver"
>  #define	DRIVER_VERSION	"4 October 2004"
>  
>  #define OMAP_DMA_USB_W2FC_TX0		29
> @@ -110,7 +109,6 @@ MODULE_PARM_DESC(use_dma, "enable/disable DMA");
>  
>  
>  static const char driver_name[] = "omap_udc";
> -static const char driver_desc[] = DRIVER_DESC;
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -2299,13 +2297,11 @@ static int proc_udc_show(struct seq_file *s, void *_)
>  
>  	spin_lock_irqsave(&udc->lock, flags);
>  
> -	seq_printf(s, "%s, version: " DRIVER_VERSION
> +	seq_printf(s, "OMAP UDC driver, version: " DRIVER_VERSION
>  #ifdef	USE_ISO
>  		" (iso)"
>  #endif
> -		"%s\n",
> -		driver_desc,
> -		use_dma ?  " (dma)" : "");
> +		"%s\n", use_dma ?  " (dma)" : "");
>  
>  	tmp = omap_readw(UDC_REV) & 0xff;
>  	seq_printf(s,
> @@ -2994,6 +2990,6 @@ static struct platform_driver udc_driver = {
>  
>  module_platform_driver(udc_driver);
>  
> -MODULE_DESCRIPTION(DRIVER_DESC);
> +MODULE_DESCRIPTION("OMAP UDC driver");
>  MODULE_LICENSE("GPL");
>  MODULE_ALIAS("platform:omap_udc");
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ