From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
pbadari@us.ibm.com
Subject: Re: Isn't sd_major() broken ?
Date: Thu, 10 Apr 2003 22:46:23 +0200 (MEST) [thread overview]
Message-ID: <UTC200304102046.h3AKkNl01295.aeb@smtp.cwi.nl> (raw)
From: Badari Pulavarty <pbadari@us.ibm.com>
I am little confused about the correctness of sd_major()
in drivers/scsi/sd.c.
Isn't sd_major() broken ? Here is the patch to fix it.
--- drivers/scsi/sd.c.org Wed Apr 9 13:12:38 2003
+++ drivers/scsi/sd.c Thu Apr 10 11:01:45 2003
@@ -123,7 +123,7 @@ static int sd_major(int major_idx)
case 1 ... 7:
return SCSI_DISK1_MAJOR + major_idx - 1;
case 8 ... 15:
- return SCSI_DISK8_MAJOR + major_idx;
+ return SCSI_DISK8_MAJOR + major_idx - 8;
default:
BUG();
return 0; /* shut up gcc */
Yes.
The sd_major() patch was from hch in 2.5.51 - maybe you are
the first to use more than 8 majors.
Andries
next reply other threads:[~2003-04-10 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 20:46 Andries.Brouwer [this message]
[not found] <mailman.1049998202.18407.linux-kernel2news@redhat.com>
2003-04-10 20:39 ` Isn't sd_major() broken ? Pete Zaitcev
-- strict thread matches above, loose matches on Subject: below --
2003-04-10 18:01 Badari Pulavarty
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=UTC200304102046.h3AKkNl01295.aeb@smtp.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=pbadari@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).