public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Chiou <ch1102chiou@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [V2 PATCH 1/4] scsi:stex.c Support to Pegasus series.
Date: Thu, 13 Nov 2014 18:00:57 +0800	[thread overview]
Message-ID: <54648159.8070402@gmail.com> (raw)
In-Reply-To: <20141112104300.GA31213@infradead.org>



On 11/12/2014 06:43 PM, Christoph Hellwig wrote:
>> +	u8  yellowstone;
>
> Calling this flag yellowstone seems a bit confusing as there already
> is a st_yel card type, and this only seems a subset of those.  Maybe
> a ->support_pm flag or similar would be useful?
>

OK, I'll modify it.

>> +	u32 subID;
>
> We don't use camelCaps, but I don't think you even need this variable at
> all..
>
>>
>>   	hba->cardtype = (unsigned int) id->driver_data;
>>   	ci = &stex_card_info[hba->cardtype];
>> +	subID = id->subdevice;
>> +	if ((subID == 0x4221 || subID == 0x4222 ||
>> +	    subID == 0x4223 || subID == 0x4224 ||
>> +	    subID == 0x4225 || subID == 0x4226 ||
>> +	    subID == 0x4227 || subID == 0x4261 ||
>> +	    subID == 0x4262 || subID == 0x4263 ||
>> +	    subID == 0x4264 || subID == 0x4265) &&
>> +	    (hba->cardtype == st_yel)) {
>> +		hba->yellowstone = 1;
>> +	} else if (hba->cardtype == st_yel) {
>> +		hba->yellowstone = 0;
>> +	}
>
> Just write this as
>
> 	switch (id->subdevice) {
> 	case 0x4221:
> 	case 0x4222:
> 	case 0x4223:
> 	case 0x4224:
> 	case 0x4225:
> 	case 0x4226:
> 	case 0x4227:
> 	case 0x4261:
> 	case 0x4262:
> 	case 0x4263:
> 	case 0x4264:
> 	case 0x4265:
> 		if (hba->cardtype == st_yel) {
> 			hba->supports_pm = 1;
> 			break;
> 		}
> 	default:
> 		hba->supports_pm = 0;
> 	}
>

OK, I'll correct this. Thank you!

      reply	other threads:[~2014-11-13 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  3:26 [V2 PATCH 1/4] scsi:stex.c Support to Pegasus series Charles Chiou
2014-11-12 10:43 ` Christoph Hellwig
2014-11-13 10:00   ` Charles Chiou [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=54648159.8070402@gmail.com \
    --to=ch1102chiou@gmail.com \
    --cc=JBottomley@parallels.com \
    --cc=hch@infradead.org \
    --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