Re: [PATCH 08/10] [scsi] mpt2sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.

From: Martin K. Petersen
Date: Thu Aug 21 2014 - 16:47:52 EST


>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxxx> writes:

Sreekanth,

+ if (((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_READY) ||
+ (ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_OPERATIONAL)
+ return 0;

I find the following easier to read:

switch (ioc_state & MPI2_IOC_STATE_MASK) {
case MPI2_IOC_STATE_READY:
case MPI2_IOC_STATE_OPERATIONAL:
return 0;
}

but that's just personal preference...

+ if (ioc_state & MPI2_DOORBELL_USED) {
+ dhsprintk(ioc, printk(MPT2SAS_INFO_FMT
+ "unexpected doorbell activ!e\n", ioc->name));

Typo.

+ if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {

ioc_state & MPI2_IOC_STATE_MASK again. Maybe you should just introduce a
variable for that and save a bunch of parentheses?

Otherwise OK.

Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

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