Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp84586iog; Sun, 12 Jun 2022 19:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWlVjn6d9RbxOntOhjDb7VZf7cHipAKbprk2k46whOZ11DToexfmOFwk4EoWV9nFO2GruL X-Received: by 2002:a05:6402:5384:b0:431:6d84:b451 with SMTP id ew4-20020a056402538400b004316d84b451mr38944052edb.46.1655088470648; Sun, 12 Jun 2022 19:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655088470; cv=none; d=google.com; s=arc-20160816; b=feourg5YumGY4StQlwBVrCX8LGBX47bh3f9y+hmpB1SEexulD4gN8gNBtVuuC1e758 34H5mLzinV6/5I4Cg3KMzU6Zl1/zxW70ddSvWcgW6Oqz1aFTc6k83xmkNVZzZMCpHh8+ wElQ0r3Yq+F4b2b0uLyMUSlYQIhNEOOi6HcdDsLMs8dp/5Z5jHzuLsEEgOi1skpbzwaZ ZBc50pkhwwXzZZmaZK2VoJYTrc3cMQSwOw5J5F7VMGAB3VGhpb5dnenpp4VnA/twfsDI Pok6dNRtNTCkMDYKXGpWDP2SGNyTSHMTYQOv/XnoBP/UjuYwW16uUo4GxAwpqHoGzlKx jcJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=yYqxLJD9L7jF0DbXTBjQ2+Y6uu/CuTM1/7fsErODsm4=; b=bhBgXG/PYSQpKp/iYkwpXi22XeYnwxqcGH/1Mx8ohgWqyAlrJH7BGVXTdseRwegM2a heuJZ2GsUQ9bB8JI7vIKZyedh+7uz9g027XFg8tKaxXtv+Q7QZi8M+FExElrvCwo28F1 xN9eDe6yiX0aPLzaH42NfTS4XcUTU3hSjozgijkBJQuN5m2VPGkpGKfRAV/lwTLZJHZn kGRzYAp4WWLkawEAVj1Z4MTodkfJ4hRa68BzJ0FBYJ11UK81LKmpFyHP5z6L/bRxpM3j c6Bg+et6vyKQQnluGpXwRN2TieEEf5qtL81+k+l1fQKu6DnOyDkeUpH8pPS3U5MReXBc egZA== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020a05640226cb00b0042fadee7b8esi7655186edd.322.2022.06.12.19.47.26; Sun, 12 Jun 2022 19:47:50 -0700 (PDT) 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233910AbiFMCU6 (ORCPT + 99 others); Sun, 12 Jun 2022 22:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230422AbiFMCU5 (ORCPT ); Sun, 12 Jun 2022 22:20:57 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14BE913F10; Sun, 12 Jun 2022 19:20:55 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LLwFY3xzQzRj51; Mon, 13 Jun 2022 10:17:37 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.58) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 13 Jun 2022 10:20:53 +0800 From: Xiu Jianfeng To: , , , CC: , Subject: [PATCH RESEND --next] scsi: lpfc: Use memset_startat() helper in lpfc_nvmet_xmt_fcp_op_cmp Date: Mon, 13 Jun 2022 10:18:51 +0800 Message-ID: <20220613021851.59699-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.58] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Use memset_startat() helper to simplify the code, no functional change in this patch. Signed-off-by: Xiu Jianfeng --- drivers/scsi/lpfc/lpfc_nvmet.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index c0ee0b39075d..c3cb7e8a2a7c 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -722,7 +722,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, struct lpfc_nvmet_tgtport *tgtp; struct nvmefc_tgt_fcp_req *rsp; struct lpfc_async_xchg_ctx *ctxp; - uint32_t status, result, op, start_clean, logerr; + uint32_t status, result, op, logerr; struct lpfc_wcqe_complete *wcqe = &rspwqe->wcqe_cmpl; #ifdef CONFIG_SCSI_LPFC_DEBUG_FS int id; @@ -820,9 +820,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, /* lpfc_nvmet_xmt_fcp_release() will recycle the context */ } else { ctxp->entry_cnt++; - start_clean = offsetof(struct lpfc_iocbq, cmd_flag); - memset(((char *)cmdwqe) + start_clean, 0, - (sizeof(struct lpfc_iocbq) - start_clean)); + memset_startat(cmdwqe, 0, cmd_flag); #ifdef CONFIG_SCSI_LPFC_DEBUG_FS if (ctxp->ts_cmd_nvme) { ctxp->ts_isr_data = cmdwqe->isr_timestamp; -- 2.17.1