From patchwork Thu Aug 20 13:14:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Saxena X-Patchwork-Id: 7044271 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AC758C05AC for ; Thu, 20 Aug 2015 13:14:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC0DA20570 for ; Thu, 20 Aug 2015 13:14:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF7042056E for ; Thu, 20 Aug 2015 13:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752317AbbHTNOd (ORCPT ); Thu, 20 Aug 2015 09:14:33 -0400 Received: from bastion.smtp.avagotech.com ([202.86.248.61]:46455 "EHLO sgpsmtp1.avagotech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbbHTNOc (ORCPT ); Thu, 20 Aug 2015 09:14:32 -0400 Received: from PALEXCH11.lsi.com (palexch11.lsi.com [128.94.223.42]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by sgpsmtp1.avagotech.com (Postfix) with ESMTPS id EDE6511D2F6; Thu, 20 Aug 2015 06:14:29 -0700 (PDT) Received: from PALEXCH12.lsi.com (128.94.222.97) by PALEXCH11.lsi.com (128.94.223.42) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 20 Aug 2015 09:14:27 -0400 Received: from palmhbs0.lsi.com (128.94.222.181) by PALEXCH12-EXT.lsi.com (128.94.222.103) with Microsoft SMTP Server id 14.3.158.1; Thu, 20 Aug 2015 09:14:27 -0400 Received: from localhost (dhcp-135-24-192-142.lsi.com [135.24.192.142]) by palmhbs0.lsi.com (8.13.8/8.12.11) with ESMTP id t7KDJrcG028553; Thu, 20 Aug 2015 09:19:54 -0400 From: Message-ID: <201508201319.t7KDJrcG028553@palmhbs0.lsi.com> Date: Thu, 20 Aug 2015 18:44:19 +0530 To: , , , , , , , Subject: [PATCH v2 04/10] megaraid_sas : Code cleanup-use local variable drv_ops inside megasas_ioc_init_fusion MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: uday.lingala@avagotech.com User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Signed-off-by: Sumit Saxena Signed-off-by: Kashyap Desai Reviewed-by: Martin Petersen --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index bfc7a67..f82085a 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -607,6 +607,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) int i; struct megasas_header *frame_hdr; const char *sys_info; + MFI_CAPABILITIES *drv_ops; fusion = instance->ctrl_context; @@ -654,20 +655,19 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) init_frame->cmd = MFI_CMD_INIT; init_frame->cmd_status = 0xFF; + drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations); + /* driver support Extended MSIX */ if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER) || (instance->pdev->device == PCI_DEVICE_ID_LSI_FURY)) - init_frame->driver_operations. - mfi_capabilities.support_additional_msix = 1; + drv_ops->mfi_capabilities.support_additional_msix = 1; /* driver supports HA / Remote LUN over Fast Path interface */ - init_frame->driver_operations.mfi_capabilities.support_fp_remote_lun - = 1; - init_frame->driver_operations.mfi_capabilities.support_max_255lds - = 1; - init_frame->driver_operations.mfi_capabilities.support_ndrive_r1_lb - = 1; - init_frame->driver_operations.mfi_capabilities.security_protocol_cmds_fw - = 1; + drv_ops->mfi_capabilities.support_fp_remote_lun = 1; + + drv_ops->mfi_capabilities.support_max_255lds = 1; + drv_ops->mfi_capabilities.support_ndrive_r1_lb = 1; + drv_ops->mfi_capabilities.security_protocol_cmds_fw = 1; + /* Convert capability to LE32 */ cpu_to_le32s((u32 *)&init_frame->driver_operations.mfi_capabilities);