public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Charles Chiou <ch1102chiou@gmail.com>
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: Wed, 12 Nov 2014 02:43:00 -0800	[thread overview]
Message-ID: <20141112104300.GA31213@infradead.org> (raw)
In-Reply-To: <5462D366.5030106@gmail.com>

> +	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?

> +	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;
	}


  reply	other threads:[~2014-11-12 10:43 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 [this message]
2014-11-13 10:00   ` Charles Chiou

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=20141112104300.GA31213@infradead.org \
    --to=hch@infradead.org \
    --cc=JBottomley@parallels.com \
    --cc=ch1102chiou@gmail.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