[SCSI] megaraid_sas: Optimize HostMSIxVectors setting
authoradam radford <aradford@gmail.com>
Tue, 20 Mar 2012 02:49:53 +0000 (19:49 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 23 Apr 2012 18:26:10 +0000 (19:26 +0100)
The following patch for megaraid_sas removes an incorrect comment and
optimizes the setting of HostMSIxVectors.  This was found during a
code review by Tomas Henzl @ RedHat.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/megaraid/megaraid_sas_fusion.c

index bfd87fab39aa7ff9949d2fe423c24f91fddc273e..a610cf1d48473301f60a805fc2636bdd3d0d7714 100644 (file)
@@ -634,9 +634,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
                fusion->reply_frames_desc_phys;
        IOCInitMessage->SystemRequestFrameBaseAddress =
                fusion->io_request_frames_phys;
-       /* Set to 0 for none or 1 MSI-X vectors */
-       IOCInitMessage->HostMSIxVectors = (instance->msix_vectors > 0 ?
-                                          instance->msix_vectors : 0);
+       IOCInitMessage->HostMSIxVectors = instance->msix_vectors;
        init_frame = (struct megasas_init_frame *)cmd->frame;
        memset(init_frame, 0, MEGAMFI_FRAME_SIZE);