lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141112104300.GA31213@infradead.org>
Date:	Wed, 12 Nov 2014 02:43:00 -0800
From:	Christoph Hellwig <hch@...radead.org>
To:	Charles Chiou <ch1102chiou@...il.com>
Cc:	JBottomley@...allels.com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [V2 PATCH 1/4] scsi:stex.c Support to Pegasus series.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ