Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2864340rwl; Tue, 27 Dec 2022 00:21:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEEZLiaDHijSGWyzK82yfN3iOvvSplS5F22qhFfd5ynbJdiH7EcatPBElUbKy+5J6nHr/j X-Received: by 2002:a17:907:170c:b0:7c1:2478:a4d8 with SMTP id le12-20020a170907170c00b007c12478a4d8mr18396265ejc.54.1672129295282; Tue, 27 Dec 2022 00:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672129295; cv=none; d=google.com; s=arc-20160816; b=oMFfXo5TcdppROX3skIyOwU6ohGjQqo9jT5IaoyalUNTf/lZzA00tcBU9AW8KGeHp8 ywGglPz+dWkZGf9ICSnuady/S8DBpsyNZslmU+rwgwGmSsf09sA9/Srcl/7CbyZMAB++ ZpBI6gwdKatbQooyrDPSZINNiXCecngOs78dSHdGe8BDO8EMvsxsTniT9l4rEirMgxGA 7KWtJziUGVplSgls/2CCp4kVq9xXdPdwHgCtfW7MzrzF+iOEYFTdpqTC/RJiN63yPsqa 6msG10sqt3I3NHUAGANUEsnkWVKCebBChPwU7UswLDMDG6hDpxbbb0U5HfCjI5Qv6DBl dJOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9t/y96VkangjoY2ZzFN3M38VyG0qQ/5drpLxk4ESR3Q=; b=ykKW46pROuiwYddzTf/HhhQ9ap8D8QmrE+uYn0QwtcCJhFeckTyVnEznz4BdeF6aSg TLmunZt0xZsEUWXm+3kKQjUGmtsoRyxEcWjoWGVzWX+9T3TKxBrDLVCy7gztv0+1t0+x 8Wf4JBVpANGzwZfTUQiiUDiQCpW9EA8RfqPx+4vdHoz00z1Aez8vphGnSsfrfXVuAsAh HgJWE0vtO0kOr+ZFU5Ulkh4ymvAQ4/ufx7K0271TfbV5KZZdgHCUunh9pCYo5A4/v0cE 3zDyC+VpKZq5Zb3wxwf8HmVtrjEOxrwB2ktfqDhr1Fhl04KQrZoR8XyLOn+0qYWimjFp IOSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc18-20020a170907169200b008379ac04127si11903869ejc.199.2022.12.27.00.21.19; Tue, 27 Dec 2022 00:21:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229878AbiL0IRo (ORCPT + 66 others); Tue, 27 Dec 2022 03:17:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiL0IRc (ORCPT ); Tue, 27 Dec 2022 03:17:32 -0500 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 798252604; Tue, 27 Dec 2022 00:17:31 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VYCh-M8_1672129042; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VYCh-M8_1672129042) by smtp.aliyun-inc.com; Tue, 27 Dec 2022 16:17:29 +0800 From: Jiapeng Chong To: james.smart@broadcom.com Cc: dick.kennedy@broadcom.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] scsi: lpfc: lpfc_bsg: Remove set but unused variable 'offset' Date: Tue, 27 Dec 2022 16:16:34 +0800 Message-Id: <20221227081634.52182-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable offset is not effectively used in the function, so delete it. drivers/scsi/lpfc/lpfc_bsg.c:2806:11: warning: variable 'offset' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3559 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/scsi/lpfc/lpfc_bsg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 852b025e2fec..dd304f899f78 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -2803,7 +2803,7 @@ diag_cmd_data_alloc(struct lpfc_hba *phba, { struct lpfc_dmabufext *mlist = NULL; struct lpfc_dmabufext *dmp; - int cnt, offset = 0, i = 0; + int cnt, i = 0; struct pci_dev *pcidev; pcidev = phba->pcidev; @@ -2854,7 +2854,6 @@ diag_cmd_data_alloc(struct lpfc_hba *phba, bpl++; i++; - offset += cnt; size -= cnt; } -- 2.20.1.7.g153144c