From patchwork Wed Feb 20 12:56:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10822091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F9356C2 for ; Wed, 20 Feb 2019 12:42:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 268ED2E0AE for ; Wed, 20 Feb 2019 12:42:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AE832E099; Wed, 20 Feb 2019 12:42:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 902712E0AF for ; Wed, 20 Feb 2019 12:42:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727607AbfBTMmr (ORCPT ); Wed, 20 Feb 2019 07:42:47 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:4240 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727409AbfBTMmr (ORCPT ); Wed, 20 Feb 2019 07:42:47 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 98E67860AE19152F784E; Wed, 20 Feb 2019 20:42:42 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Wed, 20 Feb 2019 20:42:33 +0800 From: YueHaibing To: Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , , CC: YueHaibing , , , Subject: [PATCH -next] mptfusion: remove set but not used variable 'req_idx, frameOffset' Date: Wed, 20 Feb 2019 12:56:14 +0000 Message-ID: <20190220125614.47474-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/message/fusion/mptspi.c: In function 'mptspi_writeIOCPage4': drivers/message/fusion/mptspi.c:262:9: warning: variable 'frameOffset' set but not used [-Wunused-but-set-variable] drivers/message/fusion/mptspi.c:261:9: warning: variable 'req_idx' set but not used [-Wunused-but-set-variable] They're never used and can be removed. Signed-off-by: YueHaibing --- drivers/message/fusion/mptspi.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 7172b0b16bdd..eabc4de5816c 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -258,8 +258,6 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id) IOCPage4_t *IOCPage4Ptr; MPT_FRAME_HDR *mf; dma_addr_t dataDma; - u16 req_idx; - u32 frameOffset; u32 flagsLength; int ii; @@ -276,9 +274,6 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id) */ pReq = (Config_t *)mf; - req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); - frameOffset = ioc->req_sz - sizeof(IOCPage4_t); - /* Complete the request frame (same for all requests). */ pReq->Action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;