From: Douglas Gilbert <dougg@torque.net>
To: Tony Battersby <tonyb@cybernetics.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] fix /proc/scsi/sg/devices when no SCSI devices
Date: Tue, 22 Jan 2008 23:11:26 +0100 [thread overview]
Message-ID: <47966A0E.10900@torque.net> (raw)
In-Reply-To: <4796514D.6010908@cybernetics.com>
Tony Battersby wrote:
> The patch "[SCSI] sg: use idr to replace static arrays" in 2.6.24-rc1
> causes a bogus line to appear in /proc/scsi/sg/devices containing
> "-1 -1 -1 -1 -1 -1 -1 -1 -1" when there are no SCSI devices in the
> system. In 2.6.23, /proc/scsi/sg/devices is empty when there are no
> SCSI devices in the system. A similar problem exists with
> /proc/scsi/sg/device_strs. The following patch restores the behavior
> of 2.6.23.
>
> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> ---
> --- linux-2.6.24-rc8-git5/drivers/scsi/sg.c.orig 2008-01-22 15:08:46.000000000 -0500
> +++ linux-2.6.24-rc8-git5/drivers/scsi/sg.c 2008-01-22 15:09:05.000000000 -0500
> @@ -2521,7 +2521,7 @@ sg_idr_max_id(int id, void *p, void *dat
> static int
> sg_last_dev(void)
> {
> - int k = 0;
> + int k = -1;
> unsigned long iflags;
>
> read_lock_irqsave(&sg_index_lock, iflags);
>
>
> -
Tony,
Thanks.
Signed-off-by: Douglas Gilbert <dougg@torque.net>
prev parent reply other threads:[~2008-01-22 22:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 20:25 [PATCH] fix /proc/scsi/sg/devices when no SCSI devices Tony Battersby
2008-01-22 22:11 ` Douglas Gilbert [this message]
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=47966A0E.10900@torque.net \
--to=dougg@torque.net \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=tonyb@cybernetics.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.