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] [day] [month] [year] [list]
Message-ID: <20070723144752.GJ26212@stusta.de>
Date:	Mon, 23 Jul 2007 16:47:52 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	Frederik Deweerdt <deweerdt@...e.fr>
Cc:	James.Bottomley@...elEye.com, jens.axboe@...cle.com,
	fujita.tomonori@....ntt.co.jp, linux-kernel@...r.kernel.org
Subject: Re: [patch] drivers/scsi/scsi_sysfs.c:718: warning: unused
	variable `rq'

On Mon, Jul 23, 2007 at 04:36:38PM +0200, Frederik Deweerdt wrote:
> Hi James,
> 
> A compile of the latest git on arm triggers the following warning:
>   CC [M]  drivers/scsi/scsi_sysfs.o
>   drivers/scsi/scsi_sysfs.c: In function `scsi_sysfs_add_sdev':
>   drivers/scsi/scsi_sysfs.c:718: warning: unused variable `rq'
> 
> The following patch kills the intermediary variable.
> 
> Regards,
> Frederik
> 
> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@...il.com>
> 
> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
> index 34cdce6..9e5cc4f 100644
> --- a/drivers/scsi/scsi_sysfs.c
> +++ b/drivers/scsi/scsi_sysfs.c
> @@ -715,7 +715,6 @@ static int attr_add(struct device *dev, struct device_attribute *attr)
>  int scsi_sysfs_add_sdev(struct scsi_device *sdev)
>  {
>  	int error, i;
> -	struct request_queue *rq = sdev->request_queue;
>  
>  	if ((error = scsi_device_set_state(sdev, SDEV_RUNNING)) != 0)
>  		return error;
> @@ -736,7 +735,8 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
>  	 * released by the sdev_class .release */
>  	get_device(&sdev->sdev_gendev);
>  
> -	error = bsg_register_queue(rq, &sdev->sdev_gendev, NULL);
> +	error = bsg_register_queue(sdev->request_queue,
> +				   &sdev->sdev_gendev, NULL);
>  
>  	if (error)
>  		sdev_printk(KERN_INFO, sdev,

A better solution would be to make the dummy bsg_{,un}register_queue() 
for the CONFIG_BLK_DEV_BSG=n case static inline's.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ