public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* aacraid question: is maximum_num_containers supposed to be minimum?
@ 2012-01-11  8:28 Dan Carpenter
  2012-01-11  8:38 ` Xi Wang
  2012-01-11 14:15 ` Mark Salyzyn
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-01-11  8:28 UTC (permalink / raw)
  To: Adaptec OEM Raid Solutions; +Cc: linux-scsi, linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-11 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11  8:28 aacraid question: is maximum_num_containers supposed to be minimum? Dan Carpenter
2012-01-11  8:38 ` Xi Wang
2012-01-11  9:04   ` Dan Carpenter
2012-01-11 14:15 ` Mark Salyzyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox