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: <1185202432.3417.7.camel@localhost.localdomain>
Date:	Mon, 23 Jul 2007 09:53:51 -0500
From:	James Bottomley <James.Bottomley@...elEye.com>
To:	Frederik Deweerdt <deweerdt@...e.fr>
Cc:	jens.axboe@...cle.com, fujita.tomonori@....ntt.co.jp,
	linux-kernel@...r.kernel.org,
	linux-scsi <linux-scsi@...r.kernel.org>
Subject: Re: [patch] drivers/scsi/scsi_sysfs.c:718: warning: unused
	variable `rq'

On Mon, 2007-07-23 at 16:36 +0200, Frederik Deweerdt wrote:
> -	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);

Actually, that's not really a good fix because the same problem will
reoccur elsewhere.  This is a more correct fix:

James

diff --git a/include/linux/bsg.h b/include/linux/bsg.h
index f415f89..2344dab 100644
--- a/include/linux/bsg.h
+++ b/include/linux/bsg.h
@@ -60,8 +60,13 @@ struct bsg_class_device {
 extern int bsg_register_queue(struct request_queue *, struct device *, const char *);
 extern void bsg_unregister_queue(struct request_queue *);
 #else
-#define bsg_register_queue(disk, dev, name)		(0)
-#define bsg_unregister_queue(disk)	do { } while (0)
+static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name)
+{
+	return 0;
+}
+static inline void bsg_unregister_queue(struct request_queue *rq)
+{
+}
 #endif
 
 #endif /* __KERNEL__ */


-
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