mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Frederik Deweerdt <deweerdt@free.fr>
Cc: James.Bottomley@SteelEye.com, jens.axboe@oracle.com,
	fujita.tomonori@lab.ntt.co.jp, linux-kernel@vger.kernel.org
Subject: Re: [patch] drivers/scsi/scsi_sysfs.c:718: warning: unused variable `rq'
Date: Mon, 23 Jul 2007 16:47:52 +0200	[thread overview]
Message-ID: <20070723144752.GJ26212@stusta.de> (raw)
In-Reply-To: <20070723143637.GB23448@slug>

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@gmail.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


  reply	other threads:[~2007-07-23 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 14:36 Frederik Deweerdt
2007-07-23 14:47 ` Adrian Bunk [this message]
2007-07-23 14:53 ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070723144752.GJ26212@stusta.de \
    --to=bunk@stusta.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=deweerdt@free.fr \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®