From: Dan Carpenter <dan.carpenter@oracle.com>
To: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: aacraid question: is maximum_num_containers supposed to be minimum?
Date: Wed, 11 Jan 2012 11:28:43 +0300 [thread overview]
Message-ID: <20120111082842.GA31452@elgon.mountain> (raw)
MAXIMUM_NUM_CONTAINERS is consistently used as a minimum not a maximum
so I was wondering what was up with that? This is ancient code that
predates git.
drivers/scsi/aacraid/aachba.c
382 if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
383 maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
384 fsa_dev_ptr = kzalloc(sizeof(*fsa_dev_ptr) * maximum_num_containers,
385 GFP_KERNEL);
Btw, if maximum_num_containers were really a maximum instead of minimum
then it should be unsigned. That was what brought the code to my
attention initially.
drivers/scsi/aacraid/linit.c
1235 if (shost->max_id < MAXIMUM_NUM_CONTAINERS)
1236 shost->max_id = MAXIMUM_NUM_CONTAINERS;
1237 else
1238 shost->this_id = shost->max_id;
regards,
dan carpenter
next reply other threads:[~2012-01-11 8:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 8:28 Dan Carpenter [this message]
2012-01-11 8:38 ` aacraid question: is maximum_num_containers supposed to be minimum? Xi Wang
2012-01-11 9:04 ` Dan Carpenter
2012-01-11 14:15 ` Mark Salyzyn
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=20120111082842.GA31452@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=aacraid@adaptec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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