From patchwork Thu Jun 27 17:38:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020177 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 C072313B4 for ; Thu, 27 Jun 2019 17:39:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2322283F9 for ; Thu, 27 Jun 2019 17:39:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A650328478; Thu, 27 Jun 2019 17:39:09 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 5C4C4283F9 for ; Thu, 27 Jun 2019 17:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727065AbfF0RjF (ORCPT ); Thu, 27 Jun 2019 13:39:05 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:45222 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726508AbfF0RjE (ORCPT ); Thu, 27 Jun 2019 13:39:04 -0400 Received: by mail-pl1-f195.google.com with SMTP id bi6so1658852plb.12; Thu, 27 Jun 2019 10:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BmWQUcU2r9aSCalrpP1YGhOrzTxy2nd2SVISgnXVZz8=; b=cp82nNmVm2PRtqX0SqhkHVGfZeCKaWbud0R/fplCa38BlrKAgSDizqukEWxcEn7hzl QlZq0P7dITVjl1M2j4R5tHfhlW1gF3QdFps5V0Vi8H/MT1rT6JkgXkh0N5HRo2o3NWhN Y+zje59uKbRZ5iIpGrM1hfCXT8KnihceXAWsBARn1XG3fCrf2WHEk3b6/HwZ08+t4XX2 m/lq41TF0lo8zCWBPVRLoyUWrhfb+TJCSV5OQCRE4hdQdJWB3hn7leG0+MlqxUm3aiv+ sBNRZR8Cs1YoxSvMpjjQOeo60g3BN1KC/ryZOMJTCnij5zkyKvkUt+aweK8JJMkeKrcP Io1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BmWQUcU2r9aSCalrpP1YGhOrzTxy2nd2SVISgnXVZz8=; b=cjCMSmvBqP6G0Q95pnwMtUxTh/sfw7TyDuV13qW9ShnSNZpZupNsSGANDWBfQuSfAG XvhSlZvYmaEBPw8j0L30XRSxisyDW7+GUvz5WjTVRFrLQSI5lpOkmJmQ8UuCyIDaBBMT OJroE2LjxfElZPwVJ9FbBNo3o3E95y6xFMUHO7j6wodClE8ogVGRaPDHJWuxi90D5CXu r41AdHhIldGWewCJZepWvGe6jYq3aLGOsgCWlOnpwmNsD/lSgP9LEnPvbXBb0jFh7oSN rUBo0bJhqlYSaPIjM/ga6sYtxKnJzmmtRl6SyNlv5nnbsE8kxOaVtLwfIjo/KWcQPmwf ZESQ== X-Gm-Message-State: APjAAAV0gJjOaOvOOSIZRbQXny8ChT3FxjvRj6LlAJzB4tz+NmB3ZjrJ zwDBobsJGgCPqf1Uc+3/IUM= X-Google-Smtp-Source: APXvYqy/nNd1a2Q4D/H/QsqL/K3So4yhu1uB/GBPxayD3BZ4AhUnsEhyok8k4Vb8DMXd1bRAb00P4w== X-Received: by 2002:a17:902:7c03:: with SMTP id x3mr6099922pll.242.1561657144057; Thu, 27 Jun 2019 10:39:04 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id r196sm2869217pgr.84.2019.06.27.10.39.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:39:03 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 34/87] message: fusion: remove memset after pci_alloc_consistent in mptbase.c Date: Fri, 28 Jun 2019 01:38:57 +0800 Message-Id: <20190627173858.3623-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 pci_alloc_consistent calls dma_alloc_coherent directly In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/message/fusion/mptbase.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index d8882b0a1338..845d1ef8abdf 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -4507,7 +4507,6 @@ PrimeIocFifos(MPT_ADAPTER *ioc) dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Total alloc @ %p[%p], sz=%d[%x] bytes\n", ioc->name, mem, (void *)(ulong)alloc_dma, total_size, total_size)); - memset(mem, 0, total_size); ioc->alloc_total += total_size; ioc->alloc = mem; ioc->alloc_dma = alloc_dma; From patchwork Thu Jun 27 17:42:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020187 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 1985B1398 for ; Thu, 27 Jun 2019 17:42:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BFC3201F5 for ; Thu, 27 Jun 2019 17:42:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F01F6284F5; Thu, 27 Jun 2019 17:42:45 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 A37B1201F5 for ; Thu, 27 Jun 2019 17:42:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726652AbfF0Rml (ORCPT ); Thu, 27 Jun 2019 13:42:41 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44570 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfF0Rmk (ORCPT ); Thu, 27 Jun 2019 13:42:40 -0400 Received: by mail-pl1-f194.google.com with SMTP id t7so1669302plr.11; Thu, 27 Jun 2019 10:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5Ezs9yR+V5CEPE+IWEBe9x8qjfB3g7Yh4jRZ8SzibyA=; b=E3IFscwpCQB8sJI70WBjsKLJ7UQpmaanZzv4uGMJpfxLGX+3dAH9RGaZc34Dizh0Hh 3YbX3B6pZZUvDG145ojbz9jRwkkDlxRkMsGEjEWXIr6w4/MsKLsOTZ9XWQzjvxknkM3U b3d1WeAyLhU7SDosgxozzecg4oIZYZFk1SS1bNwuyR+DPuWjPJDrCnpWHEAVyVzbyAiJ nS2EJWBTO3nqzYLAz8T1QD4lG3EzkApff+oItLdTmIlSSO8OUkAGsW9Sf11WB1JCyhg9 OX/vcyD8CggmPrUpICqxfYbc8bf7SKwP3ST33GaRl7+B/QYyvsc8V+1cKhK3Od4LIdYC M05g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5Ezs9yR+V5CEPE+IWEBe9x8qjfB3g7Yh4jRZ8SzibyA=; b=Q5hnpYLg8OlF/uT4JTr67eoYLFb7v0VzIfvKOf+/ki10vwhkHFrpZOI2fwlco/Q55s mGkOQe9II5F3Xe+HuRpqf2cj59WCai2tSYe2rdE3slHyyFSFH3ODKxiHGWPLJp9hbL4/ D/kgjpEocCebUdpNnBsRxxkVJnNIUX1QJsPqs0NE8kyHyOx9x4rVuKaRPPofDGZVDzVB GRph3OzeKJ3S5qt4nPQEgedbmDN5HDu/KQcAYbnWP59dzRxmADDx1Qr/ivcXj7NU+QU2 rFtsEMhYLSwlLsBH3NDbH/JEEXXsvPH/PD47iu24NI0siO3D8m2Fvp4aJpa9xXE962aX isWg== X-Gm-Message-State: APjAAAWcT31bETuk/lCccvrY2HGdHOVSbRhj5FCWwEPQQnxWb4Pmntta QoZVfT3tc6FQZtg1onRf3Lo= X-Google-Smtp-Source: APXvYqzDscwAugDNoZLFZc6wRWIqEpE67Vy1X5tO9PF2LiSKJal69Ppl31lKuwNBFw4yvRaV7TkG0g== X-Received: by 2002:a17:902:7b84:: with SMTP id w4mr5910694pll.22.1561657360043; Thu, 27 Jun 2019 10:42:40 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id y22sm3963842pfo.39.2019.06.27.10.42.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:42:39 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 52/87] scsi: qlogicpti: remove memset after dma_alloc_coherent in qlogicpti.c Date: Fri, 28 Jun 2019 01:42:33 +0800 Message-Id: <20190627174233.4776-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/qlogicpti.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 9335849f6bea..7868db052042 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -828,8 +828,6 @@ static int qpti_map_queues(struct qlogicpti *qpti) printk("QPTI: Cannot map request queue.\n"); return -1; } - memset(qpti->res_cpu, 0, QSIZE(RES_QUEUE_LEN)); - memset(qpti->req_cpu, 0, QSIZE(QLOGICPTI_REQ_QUEUE_LEN)); return 0; } From patchwork Thu Jun 27 17:42:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020191 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 9AC6C1398 for ; Thu, 27 Jun 2019 17:42:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F26C201F5 for ; Thu, 27 Jun 2019 17:42:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 838EC284F5; Thu, 27 Jun 2019 17:42:57 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 15E0D201F5 for ; Thu, 27 Jun 2019 17:42:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbfF0Rm4 (ORCPT ); Thu, 27 Jun 2019 13:42:56 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46716 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfF0Rmz (ORCPT ); Thu, 27 Jun 2019 13:42:55 -0400 Received: by mail-pl1-f194.google.com with SMTP id e5so1657694pls.13; Thu, 27 Jun 2019 10:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=czn3EWz06kwMCEMtsQe0/flLmYYN2GTMsUHF6cAN/yM=; b=hKQTwtwX7167NpH+v1Asuggh/g7b2T9ttFn/pEdyb/QY5b0CVyWCaGAkvF5pN4s/g3 /nIu5Dv628pzTE96YEsfu/QT/xe5/+sXNePvQAtJ/E9h59Vp+Z+nFyTafCFy561pnyUD vcgHOdyecU3wdePTXqdZBecqfe0OPWsZqc/P0uonQY9Iv79lOZxUP7C0ir9EDd9UKS3i /Cz2UEwwvpNTnivGdiB5A9JVAWYFwSyiJhdR59sLtVc0q2vlXHSeFeQSy1juuC68IPc8 lMyxUt787XM3PS7QXl+bUth+7brG0ccknxXkZ75WRURtwnF/XjgwXzjQyFKCAlgB9cSu vzdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=czn3EWz06kwMCEMtsQe0/flLmYYN2GTMsUHF6cAN/yM=; b=tqWDeJfL9nS9vTfSL4Kp1VbrDjvn/bMa9PEk15EHQb/IM1UuSs9w9V7hZ3t82sEwpd YBBR2kqJ2Ea8X/JRcRo5Wc63vtln95WOnJdb8HT78czcSvNF5rDwSAwtenyNxloam83x mopGiBudVKvGeDfel2dbtT5OpCpo1PqsHgbcRPsbo4mXBulN9qji22tcbiso+Szx5PtN lVed7zNVcP3nZEJ7W6DyRJzRLPoYsTelbhhP9P3cgPdQOcciNw/ATiXilIvWZbjCr1Tf NvD/4CcugWmU/m179dQJTAEJCMml01rabZZiEP4EpAf+MWJSK4S/vkFfQTLePUAr6NQ/ 21lA== X-Gm-Message-State: APjAAAUv7BFGXzpaDi6gVJTI/WvLVk4hUJLqHCa0vnYmPgyqP0nCxW6m AG2cK2G4N3ZAILbO8wuaBZQ= X-Google-Smtp-Source: APXvYqzOJM+wi7hC4AdeABa1mwhVC+Rgm36FaAEoqyjwEVgn83VRXKJ39qmMhXRB1+SrxAtm1Kep8w== X-Received: by 2002:a17:902:9b81:: with SMTP id y1mr6298339plp.194.1561657374827; Thu, 27 Jun 2019 10:42:54 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id i123sm4791784pfe.147.2019.06.27.10.42.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:42:54 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , QLogic-Storage-Upstream@qlogic.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 53/87] scsi: qla4xxx: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:42:47 +0800 Message-Id: <20190627174248.4830-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/qla4xxx/ql4_mbx.c | 1 - drivers/scsi/qla4xxx/ql4_os.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index dac9a7013208..eb3167186586 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c @@ -2354,7 +2354,6 @@ int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config) rval = QLA_ERROR; goto exit_config_acb; } - memset(acb, 0, acb_len); switch (acb_config) { case ACB_CONFIG_DISABLE: diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 8c674eca09f1..8666d4fc93da 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -9478,8 +9478,6 @@ static int qla4xxx_context_reset(struct scsi_qla_host *ha) goto exit_port_reset; } - memset(acb, 0, acb_len); - rval = qla4xxx_get_acb(ha, acb_dma, PRIMARI_ACB, acb_len); if (rval != QLA_SUCCESS) { rval = -EIO; From patchwork Thu Jun 27 17:43:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020195 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 5B6BE1398 for ; Thu, 27 Jun 2019 17:43:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FA06284C3 for ; Thu, 27 Jun 2019 17:43:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4164228565; Thu, 27 Jun 2019 17:43:19 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 D391E284C3 for ; Thu, 27 Jun 2019 17:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727144AbfF0RnO (ORCPT ); Thu, 27 Jun 2019 13:43:14 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39457 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfF0RnN (ORCPT ); Thu, 27 Jun 2019 13:43:13 -0400 Received: by mail-pl1-f193.google.com with SMTP id b7so1676316pls.6; Thu, 27 Jun 2019 10:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AxIMu4BJ+ITDn4HqQxvZfXnYWuXpvemPdfghlXEyazU=; b=gsj5Mqv5FWgw2C8ZSbqPk4d3GPDt6a75jDCmFUt0ohXVM0ntKg46pDsV5+kfDd9Ntn 1H5qWukGYQd+BQLzJkqij2QH29ZPTGjXw9Kqghol5YjjZQW0Q+joWN6WFrRUyQyCbEUN O/4NJ7XR4kb+564XUAt0q+MHqHjOMyMdANVXTQzg+/am43cgpNirltYbrH0hfYuDlusI o3+tAJovmDfLVeaftXXCHCAH1HBCc7x+Fw2vnTEUhayojJSnwXlP/xSLn6JrOykz7Omp 25G6M8Zwffl33Hn5bF50Rc6oLrXeLw6cV01HxPAH0WR3EbNIAqZA6q6c8jwAhQAv2DuO NAqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AxIMu4BJ+ITDn4HqQxvZfXnYWuXpvemPdfghlXEyazU=; b=BYo/oVwXez3qwe2QqnVzIwUzlsln4cIMJY1yPNUVKcjCXSpSXPKfot3sK356EcHvXe v2GDDJMDjKq/o8eY7vznSDAEtEX1kxVS65bfveQCdp0JsREnbayoHVHORrNuM9tQ5CW9 I22xte6ECIhC5BEL+TkECutII3uRLTsE7hGq639ZjpJnGaSjxPXuF/pTxqrXEyytvo1h Qul3SiXMxvBQO5iYYQKxVUwoayIz+tVH4eDgihnKRdp1x4OkjKPr3bJY/YuUbK3p4UcN MkmxJSxbieNDpKiIlfvDFsDqciEwJ9FKW23+R21pz3Bxruxpnh6Y9Q9OsfKoWEWfQHwP vdOw== X-Gm-Message-State: APjAAAUodaUAmo4EkufBSjnzfjPEJrx7VF426G8fblRHSUqCpM5we42X QOr3yEGTmmM7YyBESbQQ8Yc= X-Google-Smtp-Source: APXvYqzNcFy5ilWx3mzo+KyhctxCrbf7SIbTOd01OLd8mmkxsuA3dBHq+4kMjsNAcZRLB7aYDxob6A== X-Received: by 2002:a17:902:20c8:: with SMTP id v8mr6040367plg.284.1561657392653; Thu, 27 Jun 2019 10:43:12 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id k6sm3490852pfi.12.2019.06.27.10.43.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:43:12 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , qla2xxx-upstream@qlogic.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 54/87] scsi: qla2xxx: replace vmalloc and memset with vzalloc Date: Fri, 28 Jun 2019 01:43:04 +0800 Message-Id: <20190627174304.4936-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 vmalloc + memset(0) -> vzalloc Signed-off-by: Fuqian Huang --- drivers/scsi/qla2xxx/qla_attr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 8d560c562e9c..dabd139fdaeb 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -382,7 +382,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, ha->optrom_region_size = size; ha->optrom_state = QLA_SREADING; - ha->optrom_buffer = vmalloc(ha->optrom_region_size); + ha->optrom_buffer = vzalloc(ha->optrom_region_size); if (ha->optrom_buffer == NULL) { ql_log(ql_log_warn, vha, 0x7062, "Unable to allocate memory for optrom retrieval " @@ -404,7 +404,6 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, "Reading flash region -- 0x%x/0x%x.\n", ha->optrom_region_start, ha->optrom_region_size); - memset(ha->optrom_buffer, 0, ha->optrom_region_size); ha->isp_ops->read_optrom(vha, ha->optrom_buffer, ha->optrom_region_start, ha->optrom_region_size); break; @@ -457,7 +456,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, ha->optrom_region_size = size; ha->optrom_state = QLA_SWRITING; - ha->optrom_buffer = vmalloc(ha->optrom_region_size); + ha->optrom_buffer = vzalloc(ha->optrom_region_size); if (ha->optrom_buffer == NULL) { ql_log(ql_log_warn, vha, 0x7066, "Unable to allocate memory for optrom update " @@ -471,8 +470,6 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, ql_dbg(ql_dbg_user, vha, 0x7067, "Staging flash region write -- 0x%x/0x%x.\n", ha->optrom_region_start, ha->optrom_region_size); - - memset(ha->optrom_buffer, 0, ha->optrom_region_size); break; case 3: if (ha->optrom_state != QLA_SWRITING) { From patchwork Thu Jun 27 17:43:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020197 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 DDEDE17D2 for ; Thu, 27 Jun 2019 17:43:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D17F7284C3 for ; Thu, 27 Jun 2019 17:43:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3DBF28565; Thu, 27 Jun 2019 17:43:31 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 6DE16284C3 for ; Thu, 27 Jun 2019 17:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbfF0Rn1 (ORCPT ); Thu, 27 Jun 2019 13:43:27 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34104 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfF0Rn0 (ORCPT ); Thu, 27 Jun 2019 13:43:26 -0400 Received: by mail-pg1-f194.google.com with SMTP id p10so1355614pgn.1; Thu, 27 Jun 2019 10:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5yXtCY8+SUxwVe8KOeKy/jAD6fDiQgSV/PqCOT/7qso=; b=f+UKG+O4/Rxj5mwHBxO2vSuKFB5Jbwqy+gAXw/tRLQ24V4c+1nRp1pK3GVV8/kunBr XBbE5+y+3ugm94S4HF3cyhnfzYHwKHn63wAThdv/cn/wTWK4fcWFCnjXLSWBFP76S7AQ v5gpeCj2430jpnMH7ycFJOgnQJUFpmGhIF2T/TP2M7YecU28G7McurxHyyqflnaBzlSP D4RBfB5FRfJ6+RLAbK49cbdE3kFhh+Xjrq0SUQbUMONGJBb6BlPpdoAsyfMyw3UUzbmh tZRzbjrHm5IUwz31ebloD3Jkmge6him6jrNznLJSskqmCM5Dm3CwYDqkN2N8kqPK+5+J uhMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5yXtCY8+SUxwVe8KOeKy/jAD6fDiQgSV/PqCOT/7qso=; b=lOVO4LhXKBcjefWlNapLdV/H6J0Uug/mvyw8UmyiKrIFtW8yuQUNabkpbpWJfki+HB 9N9V/7sLY374bVFFzsxEOGVCv/NHQy+RUoKAxiMolUsmYI3dBUQKE6+ww2g02uopG41s 7tKXishjSzCdSsq99EF10sTnMKg+9HCC4jRklE7Ah3ZHhbfaD6q2Q3FHiMT+Bu+oeqj6 1khMPuu1DuNAv50hvm4tuCL4nrxYtd4bMPzbrWV9m+xXnAT5VGSR5ly74B9hZV8+7C3j rHkn2XIJE7RkMXWft7oSlycHVQPRVin3UVyz1WU12gTrAUpJ6alMYM+fJD2SRtqTpiq8 06Bw== X-Gm-Message-State: APjAAAXgEMm+XUrolSUXynNpIoHR6aRSGYqywtHyD8BAZEF60cBQOrff Rv79TPJNzyxhLH30d8eRslY= X-Google-Smtp-Source: APXvYqwXKxyNpqDNq5O1I8zhK3VRQ+kC4YusxJsOH6nHnsvGEoCXhd8/wGlKIzp3uyjhYIZxoAqZ+w== X-Received: by 2002:a63:4518:: with SMTP id s24mr4953313pga.123.1561657405805; Thu, 27 Jun 2019 10:43:25 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id y17sm3056052pfe.148.2019.06.27.10.43.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:43:25 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , QLogic-Storage-Upstream@cavium.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 55/87] scsi: qedf: replace vmalloc and memset with vzalloc Date: Fri, 28 Jun 2019 01:43:15 +0800 Message-Id: <20190627174315.5042-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 vmalloc + memset(0) -> vzalloc Signed-off-by: Fuqian Huang --- drivers/scsi/qedf/qedf_dbg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c index e0387e495261..0d2aed82882a 100644 --- a/drivers/scsi/qedf/qedf_dbg.c +++ b/drivers/scsi/qedf/qedf_dbg.c @@ -106,11 +106,10 @@ qedf_dbg_info(struct qedf_dbg_ctx *qedf, const char *func, u32 line, int qedf_alloc_grc_dump_buf(u8 **buf, uint32_t len) { - *buf = vmalloc(len); + *buf = vzalloc(len); if (!(*buf)) return -ENOMEM; - memset(*buf, 0, len); return 0; } From patchwork Thu Jun 27 17:43:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020199 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 0B09D13B4 for ; Thu, 27 Jun 2019 17:43:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F22F7284C3 for ; Thu, 27 Jun 2019 17:43:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E694328565; Thu, 27 Jun 2019 17:43:38 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 94C84284C3 for ; Thu, 27 Jun 2019 17:43:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727179AbfF0Rne (ORCPT ); Thu, 27 Jun 2019 13:43:34 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46788 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfF0Rne (ORCPT ); Thu, 27 Jun 2019 13:43:34 -0400 Received: by mail-pl1-f195.google.com with SMTP id e5so1658529pls.13; Thu, 27 Jun 2019 10:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fAB+02+QvXObdBU3H9Vv8v02eYyU6/qD4FmI+pFgbpQ=; b=NdJ9L/4MA8r0TUvSTrbAA/E6cr3Lz5zz4ZYuv3WZI69WHcxRMUqowmrsmipFUwMipj ZlGcxUeaDsJFfZCq8zp668yOF1nOzIjDFxAD7AnEvUPS+bcE7abtdOr610pkdWslj55P r8vmlCOlt3Hy2SklLat7JxFOYXbNkxO829b1H8dJ34qMRusZcXQ2oa+i9H0SDNoAz777 K819OgkMyTMlixqsC4bL9n+ETMSOASRDi54b9UMJ4PkwMSi4tIrMnmOo4XsWQlB1gG/7 +COP57H3QixVc9jctvFM97Kh45IewOuSKgkhiornN3ADcbnIXC411S2Jk6SBOiAWw1K+ tgnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fAB+02+QvXObdBU3H9Vv8v02eYyU6/qD4FmI+pFgbpQ=; b=aF+f8hmE1+0zKEZrF3DxSFSBsNdG18SgBf1O0wFRUm4mUyehd4DQF62PRTnGd/Bixb vKsdr8S+2iViwqE7wTJzR4QMJz/97gsoab4hMkUy+NND5mj1gL8ESWEGpn8dN3xTDUIc IAhiA0vISgNzwyeYtWDyoqH82egGSyGIuN4cysblgbaAP+HbNb5CvYrcnmdwpNqsSXyB PlxFn/wJBSg2wQ5ffxU2GMjrAcJrYDzRgOO6L2pvDfThIIsfKTTkScEgeqnLTf5m03NN DKU5nwqAdSVqlTjXDpjk2ANwT94/gmHDMdgjg2TvkDBeUChL1UqMqQTsJwTw1+svHGJ9 HZhg== X-Gm-Message-State: APjAAAUPEOxYoVYOXWvKDLH9/b35xKKeyTbArvGsB8TMIALtcPCqpCpc pu6X6rvEqwRV0jh8cxeFmxU= X-Google-Smtp-Source: APXvYqwwzRSUIJQt4d88OFuNzY9HqOtIGplMC0nIbgKlnpgPmZP0Duj85iYCOzPXEF2GyHOuEkmoGg== X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr6014598plb.103.1561657413046; Thu, 27 Jun 2019 10:43:33 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id p67sm7855370pfg.124.2019.06.27.10.43.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:43:32 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 56/87] scsi: pmcraid: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:43:27 +0800 Message-Id: <20190627174327.5147-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/pmcraid.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index ca22526aff7f..9e11e20d9e0d 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -4720,7 +4720,6 @@ static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance) return -ENOMEM; } - memset(pinstance->hrrq_start[i], 0, buffer_size); pinstance->hrrq_curr[i] = pinstance->hrrq_start[i]; pinstance->hrrq_end[i] = pinstance->hrrq_start[i] + PMCRAID_MAX_CMD - 1; From patchwork Thu Jun 27 17:43:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020201 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 C7C3F13B4 for ; Thu, 27 Jun 2019 17:44:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA418284C3 for ; Thu, 27 Jun 2019 17:44:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEA7228565; Thu, 27 Jun 2019 17:44:09 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 595FC284C3 for ; Thu, 27 Jun 2019 17:44:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbfF0RoF (ORCPT ); Thu, 27 Jun 2019 13:44:05 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33788 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbfF0RoF (ORCPT ); Thu, 27 Jun 2019 13:44:05 -0400 Received: by mail-pf1-f193.google.com with SMTP id x15so1601120pfq.0; Thu, 27 Jun 2019 10:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=yLwq/FK/dOd0WnikC6tG24I8Sc4D1+91vUmD4gEKD0I=; b=YlWxbbm2+Hf2SJ6wfKGxju7Sl69GcIZyHXX/omiPZeGOTCaRp0LGug6hg1YYHcs1x1 3Jt4UD5bvVsNkAiG4hluYI00HvlrgQvuJD5Adtr7aC/xq87aEyG2m4AuPzACJl2eKCwG KVTuS9ZRsyO0wT66jisniTtXGjzFHs26Un7Gxa4332+CKq+mf3OvETSkCX3bIoSLacyj Pb5jrOfA9J+cKHbG+r+YbE/wzEm2GcsCAh2T2RLBSxYBbpELUghvVh48G5FW/6MMwQyP 6xcDtYmUOnKt6tYbroop6IuQLGqvv/HyQPNP0/AiM3t57wtqMKgD8A0MJQLWuXzoaqFR whYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yLwq/FK/dOd0WnikC6tG24I8Sc4D1+91vUmD4gEKD0I=; b=MR9ajAAvIT/F7Yh+nv3aV4BeSszXLfAtBULUFCKgRosatNMIa/0L/D6zUbClE5qKna 9LLDnRprkeFonFvc36ZivctXJxvqcdNFs0+pjrF/Sdh9Vo0+VbMIaizkUERRrxjv17Lt JhNXvLnO9KByZ9pf7BX6OV9lihzq08sbmpyNUnBk74v4XUwbGYcG5XjK9IGkTFJBVHd/ gyXSSN4IHIREdmPBzm/JnOrAP8jTT2gpJGMQnInfGNkBj5ZrUGZqy9TsxECnZhX5mwQN bNZkjlkXudKban6Hk/sekMJ+HyaLGSrbFgRpXYbfRCYQi70ITqRg/9QmxP7luHw29ppH +uiA== X-Gm-Message-State: APjAAAWpHtR96/Z1MN2sDkJMay9FcEhwQWGWHxzWcTD3g4hkCkOc2PDR TbYRiIhpp6F+txTtHo8cem0= X-Google-Smtp-Source: APXvYqykh/LdSMFIuQuvdctT4jSIPqOETT8c8vW6CFsLlZvpN88og23JZYQRJHfYEspMZKCYsKCJrw== X-Received: by 2002:a17:90a:a00d:: with SMTP id q13mr7387601pjp.80.1561657444815; Thu, 27 Jun 2019 10:44:04 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id 1sm3516603pfe.102.2019.06.27.10.44.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:44:04 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , "James E.J. Bottomley" , "Martin K. Petersen" , Greg Kroah-Hartman , Allison Randal , Johannes Thumshirn , Thomas Gleixner , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 58/87] scsi: mvsas: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:43:53 +0800 Message-Id: <20190627174355.5252-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/mvsas/mv_init.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index da719b0694dc..f2fae160691d 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -241,19 +241,16 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) &mvi->tx_dma, GFP_KERNEL); if (!mvi->tx) goto err_out; - memset(mvi->tx, 0, sizeof(*mvi->tx) * MVS_CHIP_SLOT_SZ); mvi->rx_fis = dma_alloc_coherent(mvi->dev, MVS_RX_FISL_SZ, &mvi->rx_fis_dma, GFP_KERNEL); if (!mvi->rx_fis) goto err_out; - memset(mvi->rx_fis, 0, MVS_RX_FISL_SZ); mvi->rx = dma_alloc_coherent(mvi->dev, sizeof(*mvi->rx) * (MVS_RX_RING_SZ + 1), &mvi->rx_dma, GFP_KERNEL); if (!mvi->rx) goto err_out; - memset(mvi->rx, 0, sizeof(*mvi->rx) * (MVS_RX_RING_SZ + 1)); mvi->rx[0] = cpu_to_le32(0xfff); mvi->rx_cons = 0xfff; @@ -262,7 +259,6 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) &mvi->slot_dma, GFP_KERNEL); if (!mvi->slot) goto err_out; - memset(mvi->slot, 0, sizeof(*mvi->slot) * slot_nr); mvi->bulk_buffer = dma_alloc_coherent(mvi->dev, TRASH_BUCKET_SIZE, From patchwork Thu Jun 27 17:44:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020205 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 F26B613B4 for ; Thu, 27 Jun 2019 17:44:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E667A284C3 for ; Thu, 27 Jun 2019 17:44:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA4EC28565; Thu, 27 Jun 2019 17:44:35 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 8B341284C3 for ; Thu, 27 Jun 2019 17:44:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbfF0RoT (ORCPT ); Thu, 27 Jun 2019 13:44:19 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33532 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726796AbfF0RoT (ORCPT ); Thu, 27 Jun 2019 13:44:19 -0400 Received: by mail-pl1-f195.google.com with SMTP id c14so1693723plo.0; Thu, 27 Jun 2019 10:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fMSiZev5TC+RJzc16L/mj1DXSyzROvrHBBpdoAkI4pA=; b=j1qZqxDCY1SE+3POtAF4fIPpydkT991PUh1oofQZPKaJWSjB2/xoYZzpkrowByRCze bdbOdV661xZNJCqkUSmqEBvRG99kwldxO16Vu17L69JFTnln0hOPns87XE3PmRH1lUva PCAzjXFm28A+9bZ6VQrDsbIL5B0Rww50JQesQh2osh4oDE6/JWHriV1v0dC96U68cn+/ ILiYp93BJOPXr5LQ0U/YUII3kSgiYrADhhUrBmehJ3a/+4snMWRacFWUGJvwFgwOxmjB POdvKmQUsXwCyOhtlU4Q1osXDT6dfbNJJjsRFmNIwudAqH1yEyDf+QptNmHDsOtGHFrC ZxHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fMSiZev5TC+RJzc16L/mj1DXSyzROvrHBBpdoAkI4pA=; b=c50tc2YLiS+zp6uZWJF6TTuP7vJWtAj0ppRgRqBPA2IoBsQiX4ef2gbkkJO/hmsu/U KtWoHZVgwzjEN1a4GAEk4YpmtirWfizPtJCv0sBEKvJWw2obBjU6e/OLaKDFlrLjcJxk fsK1HaXclaW65zkQoozVaBU2Sdx0udnUyMvHp0Bh/ax3bRpfIOZD+XxAltMAe/6xe0hj N75IEzQE4CBJ6whM0Ugdk6jBmlwRFYRMK4iB1AT8Ol1Cqhqq4eFSeRTllm0T+/iqhzn5 rka82LVSvs1iJ+76FHgfmPd7RJN/G6VfaWzGdZ9ASJxf8bxM2uGNglQkYr4xrFTBUsCS Tvwg== X-Gm-Message-State: APjAAAWTUpJvey1Q90z+D0r7ljkbB5ElFni7Kve7rry/dU3f7IaP9hP8 tP2kg7lD2+euFCczpr5v5ps= X-Google-Smtp-Source: APXvYqz6DciFrJAZR8kflqpCUghCNuNS4CyzELd9ZB59oZi5uUdIFGgT4WxsfhD/mnIoQXiwQqYt5Q== X-Received: by 2002:a17:902:f087:: with SMTP id go7mr6033850plb.330.1561657458740; Thu, 27 Jun 2019 10:44:18 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id w7sm3978503pfb.117.2019.06.27.10.44.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:44:18 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , "James E.J. Bottomley" , "Martin K. Petersen" , MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 59/87] scsi: mpt3sas: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:44:05 +0800 Message-Id: <20190627174406.5360-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/mpt3sas/mpt3sas_transport.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c index 60ae2d0feb2b..b09af57840d8 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_transport.c +++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c @@ -1111,7 +1111,6 @@ _transport_get_expander_phy_error_log(struct MPT3SAS_ADAPTER *ioc, } rc = -EINVAL; - memset(data_out, 0, sz); phy_error_log_request = data_out; phy_error_log_request->smp_frame_type = 0x40; phy_error_log_request->function = 0x11; @@ -1401,7 +1400,6 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc, } rc = -EINVAL; - memset(data_out, 0, sz); phy_control_request = data_out; phy_control_request->smp_frame_type = 0x40; phy_control_request->function = 0x91; From patchwork Thu Jun 27 17:44:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020203 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 B07A51398 for ; Thu, 27 Jun 2019 17:44:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2E0C284C3 for ; Thu, 27 Jun 2019 17:44:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95BBE28565; Thu, 27 Jun 2019 17:44:34 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 4F44C284C3 for ; Thu, 27 Jun 2019 17:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727237AbfF0Ro3 (ORCPT ); Thu, 27 Jun 2019 13:44:29 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:42913 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727213AbfF0Ro2 (ORCPT ); Thu, 27 Jun 2019 13:44:28 -0400 Received: by mail-pf1-f195.google.com with SMTP id q10so1583459pff.9; Thu, 27 Jun 2019 10:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SBYZqfoyt3K/CiQ07Hd+w3JcvKRR1GsSR4h2B9nj7xg=; b=T6LC9hZenINjqqDXUyOQ8cpWIotOtfsGNBmVYBfyibVD1fEoRavsY5Vge//7qZVKcK bwx1l6dnQfLhaSrdxzw3QhFwp6OJhXkkNRBneMosZ4CYyOv6TMV6jgXkONMSH8FYJTC/ p2rVBMrjgLv/DwQiDJVLLK/UpGZUyhAD0RR330lwN49Lm+TzWNoANXeLciBUG3D+ujCs 8wNVTOeN3kLutE6dvBbWfgO6Bj7/4RREgmzhuK5E9SWz9+stX9DSR4YZ+wF5PUFHSIZ2 QPG9iihcOOV7Tz81M1OrN2g8mnvTsesUffKMvkDCUgPvFRp80EwnQWdLIrp+X2mvDkly q4dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SBYZqfoyt3K/CiQ07Hd+w3JcvKRR1GsSR4h2B9nj7xg=; b=RxybbMHo3+rx1YmB6dvUVBIK9Q844owmRxBGQ1pLad2e0fE6E9eftdGqXebXewgoGD AplGKlnPV1DjdhMsCjHESew5nbfj3OphslCnI2dpsrgWSnNzJBqcyL6JciOAfIYIgc7w SWxN+XLrbeDYXeCFnQv8KXj/bXlB1EpLdn+RVKu77qR7OtfSbi9Lzb3+SrigfEBycrYA 54Rzhf2mtYIoxYGKWmDZzZIygrRljNKS0Ktxli1Ap4jwC5X3mV13FhC4hEzwHtVpgkaG YCmwU/vnW4WLytmuSfHZmTyc1KMBuNoJvH87tndETntnQY/CzcpjEIGqmHbK6sutXW2p XtIg== X-Gm-Message-State: APjAAAU6JQr134+ZbZm42AVinxCneSgMSCcO11Kyy1H3HM1UND6+eKjh Bz4Ez8NJQsGVC0bGwibqNfc= X-Google-Smtp-Source: APXvYqwE7v/Y/QRUQ3xwREW6I4PY0Fav0OD7fG5EREhwO0AnfYmtHTMxD60KAXBzvjSzya4y8RtTOQ== X-Received: by 2002:a63:e53:: with SMTP id 19mr4815445pgo.137.1561657467705; Thu, 27 Jun 2019 10:44:27 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id q1sm3962760pfg.84.2019.06.27.10.44.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:44:27 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Kashyap Desai , Sumit Saxena , Shivasharan S , "James E.J. Bottomley" , "Martin K. Petersen" , megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 60/87] scsi: megaraid: remove memset after kcalloc Date: Fri, 28 Jun 2019 01:44:20 +0800 Message-Id: <20190627174420.5466-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 kcalloc already zeros the memory. memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 3dd1df472dc6..342b39bc9210 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -4141,8 +4141,6 @@ int megasas_alloc_cmds(struct megasas_instance *instance) return -ENOMEM; } - memset(instance->cmd_list, 0, sizeof(struct megasas_cmd *) *max_cmd); - for (i = 0; i < max_cmd; i++) { instance->cmd_list[i] = kmalloc(sizeof(struct megasas_cmd), GFP_KERNEL); From patchwork Thu Jun 27 17:44:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020207 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 4FDE313B4 for ; Thu, 27 Jun 2019 17:44:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4275B284C3 for ; Thu, 27 Jun 2019 17:44:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3697028565; Thu, 27 Jun 2019 17:44:45 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 D49D8284C3 for ; Thu, 27 Jun 2019 17:44:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727258AbfF0Rok (ORCPT ); Thu, 27 Jun 2019 13:44:40 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33562 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727255AbfF0Rok (ORCPT ); Thu, 27 Jun 2019 13:44:40 -0400 Received: by mail-pl1-f194.google.com with SMTP id c14so1694185plo.0; Thu, 27 Jun 2019 10:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AUabHIc5uhlhXs6EIFtS8u7UQYxi/NfpXx9PPBVysGY=; b=YDVzn75PSL7/pKHj70BQAhgbt+LsPMtbs14ky50ASWnyNIcoa2NXULwxK9CPzC0cTW Atcfxd8DYX+gVqvxza00e7ElBKIdQ2G4Gfra+AZ36muiPkXaURMVJSmv/2oafqayRHan 6B30oo2lrtFtOybzhN2ZOd8O8eAhtdDxTi+LiLKDTRCaB51q6+VRXvFQJ4j+Am3xNmFv DWkPEFj8U0ZQXNIu5HF0WSNNQq79AsNxw2tG7ZzfVFmzCK3/BGaG8FIpmkyrG8d7z+l2 YrFRSeebaFXeayUy53fjtjv5qGlOX8n9VLrvLtuPkDydyuWadaizn5dKWQTsuB37jRGc JSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AUabHIc5uhlhXs6EIFtS8u7UQYxi/NfpXx9PPBVysGY=; b=KgAGomelp4FMgnH9XNbvS5hkGQA/LcJeEJAktziJzURb/8DL2TvSKlnPoVWWO4dues otCch8qqAJbtzH9Xtl3mCsExR607SvrIS3gbFIDebmy+k3t7FKPuaKnlOPDkyKbGYjvR LY2HWlV/jgkFz8xOsZKRogsHVgwg3XJZi2+Lv38cpITt3Wopdzu8N2iAxtpc73OHe8ou xRx1W7K7jgIwkiJc9xGyPDiTGjmGof02TAVeVmGmyK/BP1gVhSAfQ/+cDi29A4O82nQD moTZ8dCXwwDMTJH8pozTTmKsEATRwgiF5u/dc1jsDlnrgF9mUxbpgyP5Fi+WwdbA7Ybd 4AOg== X-Gm-Message-State: APjAAAWajEZQeE7sUNvy3KklQbKd0lhvqxh87mnN5NFQORKogTJxmeb7 +KND1IFsvgWY32d23F/nKP8= X-Google-Smtp-Source: APXvYqyCoAbU3KLSo+ihwoNkibMGs1lBrly+tXA2E1W/eJQaRIqrSo8n3en0Lqpimt4tWTev93E6iA== X-Received: by 2002:a17:902:d916:: with SMTP id c22mr6110817plz.195.1561657479365; Thu, 27 Jun 2019 10:44:39 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id a20sm2657092pgb.72.2019.06.27.10.44.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:44:38 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 61/87] scsi: lpfc: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:44:31 +0800 Message-Id: <20190627174431.5520-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/lpfc/lpfc_init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index eaaef682de25..c3cca3be87f1 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -7770,8 +7770,6 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba *phba) phba->hbqs[LPFC_ELS_HBQ].hbq_alloc_buffer = lpfc_els_hbq_alloc; phba->hbqs[LPFC_ELS_HBQ].hbq_free_buffer = lpfc_els_hbq_free; - memset(phba->hbqslimp.virt, 0, lpfc_sli_hbq_size()); - phba->MBslimaddr = phba->slim_memmap_p; phba->HAregaddr = phba->ctrl_regs_memmap_p + HA_REG_OFFSET; phba->CAregaddr = phba->ctrl_regs_memmap_p + CA_REG_OFFSET; From patchwork Thu Jun 27 17:44:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020209 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 1846413B4 for ; Thu, 27 Jun 2019 17:45:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05A0C284C3 for ; Thu, 27 Jun 2019 17:45:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E81B328565; Thu, 27 Jun 2019 17:45:06 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 9BC71284C3 for ; Thu, 27 Jun 2019 17:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbfF0Ro5 (ORCPT ); Thu, 27 Jun 2019 13:44:57 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38777 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfF0Ro5 (ORCPT ); Thu, 27 Jun 2019 13:44:57 -0400 Received: by mail-pl1-f193.google.com with SMTP id 9so906161ple.5; Thu, 27 Jun 2019 10:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=x8TyTjEHF7IwBr8kCYr6z238B3fU5nGIx1RXJcSqctI=; b=mVKxBsAK81UGpOP20Tg7BotB05AsNej6XOM8e4+R5YHXhy5BMe/GufwKR0XmT+UZhY Nhjnsx4YLlX6OVtrHlU4W/Cg8y6qc/m3YpxfRpzzUSk/8kWjoqSlPJNeaKIn4j1Lk09h BXPrqOK98+/4nxRvGEK9jkZ0fN2ADIz29KCw/1jlwOH8DIkaLOFlRKT+evBnScwen98T Jv+LW29S0abCCKiW5keg6hLLM0zVf/Im5+xV3qL3DKdFlt4ifhJPLK2q30FtKzLagWIT Dj6b0oRbDuVNv1XTCh9nNSieUedacbkT29OGl84wR/2u+Dkn/NhwyJ3B0FzUh5dgsh0+ GgfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=x8TyTjEHF7IwBr8kCYr6z238B3fU5nGIx1RXJcSqctI=; b=BuU0JTMTAOZHnlTsMupK6+wFv5TaiCt2zdi/eYD6NgAdsfO8oxUf48mpPB08t61PAH 5CfZ47V8qHCQp+UXn4ndrvM8fmLkXAgKgFx0yr5/SYRJOONh7wUKY82IuzHwbD4xqxpw bqVtDq8NuwxCfg7+j41PATLGOgkX1FxhkrLEsnQkNFUv9OErbnkoMm0FSTTNXoMNakm2 V6k0tsPL6isVfdasfEu5PwarBMDltspkecRkKoDOtNxKna/s4BeoVLXQQ2Fc8LN3nMgx hDryyLqLCfaD03oYvBt+Otknt2mrnyuODGQxKOnptduLXGX3CHsiSR4mxrPWfpH/mqmm cc0Q== X-Gm-Message-State: APjAAAV7XUTMLwUrzOdXUEr0zysKJKmGmuZ4JL7X7/4k52N3s5EpKV9Q tNMXmkYjD1hy0t4nv0TY468= X-Google-Smtp-Source: APXvYqyRPIWHrjwyO4yHVshkBFd0RczLrw0/B9zuDdE3IsvrbmPMBEZx4lbwjciXd0tTSWuL5ktEqg== X-Received: by 2002:a17:902:8f87:: with SMTP id z7mr5908735plo.65.1561657496736; Thu, 27 Jun 2019 10:44:56 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id f72sm12642298pjg.10.2019.06.27.10.44.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:44:56 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 62/87] scsi: lpfc: replace kmalloc and memset with kzalloc Date: Fri, 28 Jun 2019 01:44:46 +0800 Message-Id: <20190627174446.5624-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 kmalloc + memset(0) -> kzalloc Signed-off-by: Fuqian Huang --- drivers/scsi/lpfc/lpfc_debugfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 1ee857d9d165..0dfac41f2fa8 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -6017,7 +6017,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) phba->hba_debugfs_root, phba, &lpfc_debugfs_op_slow_ring_trc); if (!phba->slow_ring_trc) { - phba->slow_ring_trc = kmalloc( + phba->slow_ring_trc = kzalloc( (sizeof(struct lpfc_debugfs_trc) * lpfc_debugfs_max_slow_ring_trc), GFP_KERNEL); @@ -6028,9 +6028,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) goto debug_failed; } atomic_set(&phba->slow_ring_trc_cnt, 0); - memset(phba->slow_ring_trc, 0, - (sizeof(struct lpfc_debugfs_trc) * - lpfc_debugfs_max_slow_ring_trc)); } snprintf(name, sizeof(name), "nvmeio_trc"); From patchwork Thu Jun 27 17:44:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020211 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 387BF13B4 for ; Thu, 27 Jun 2019 17:45:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BECF284C3 for ; Thu, 27 Jun 2019 17:45:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2003828565; Thu, 27 Jun 2019 17:45:11 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 C9D8D284C3 for ; Thu, 27 Jun 2019 17:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbfF0RpG (ORCPT ); Thu, 27 Jun 2019 13:45:06 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39100 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfF0RpG (ORCPT ); Thu, 27 Jun 2019 13:45:06 -0400 Received: by mail-pf1-f196.google.com with SMTP id j2so1590227pfe.6; Thu, 27 Jun 2019 10:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=E5PSrIdH38k8HkYvx/lRZBmcEXNwInSCli6rz8zupUE=; b=HbEbfsVy0dhIgQtumWKMqbE4ZugwZflXn90XqBlldJgqsvF2KVfAernoa0tkvrKL96 ijj4XcJQ52DVmnp/dVJ9eCA+lpNxmoKpvHf393j0bZamonbt3nEl5vXbRTkRj9PjWslu ua2S6MvqpmZNsiEG6oCkT3mpN+6lfsc/rkeFFFXbAD1SI67/ExA7DH/xkufio7p0E1N/ 7AAIYX4B6qkfa+u0jJ2/HnXqy5Rhy92o7qRdw5bF6aNZGPQTgmkAvTwmLDuyK+rlal20 kLI+TalyoZppV+dXA4t7K8NgN+dQe+NJ2nfMQYTxZIXBUBlHKowJzTylvREPtDUCJqLM EddQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E5PSrIdH38k8HkYvx/lRZBmcEXNwInSCli6rz8zupUE=; b=qZmPqGHD3btlSzIvco4fXpYxw90BfLigBLpUrIeD8nwuu2aasOOZGlJx4UlVc19a4k +Bd8aCTiHMpyuSecGX/nPROeRgob84qmdix7P4AWiJ01o/4ArRr9YfvHqn/lFI3nLiDJ aVEDyFovlxa9TbtG5kqiRJxVEf0dCzCcCP9TBz2kqADN8WhYWA5gCpL3QR0AlbHtgJ3j ikScnMLxUUaFXESeu0nzzCXlGxGdL5RiKqTsnb+vTur7OsJVGjWsFdJn3tN7MsccDV5n 4+19Fi9Klv9hMXVf6gGQkR6BRFd5BUksAQ5Wa3hUNhU/wjWnbf8r56xa/dsmG3tTKRKF ZUHg== X-Gm-Message-State: APjAAAXZgUFnY9Gkzl7QJ2M0tAX4+56ISwfffa7p5AmFnF5C1StqhvFM /8S1/IB4kNLik7ixVAkKf88= X-Google-Smtp-Source: APXvYqzN2H+1WkLNaaA/8AhAzVTwkUlYuHGOSlbQmer3dOb4yxYQnynt/Vx6eU5ezCfzwfZyRdVoXQ== X-Received: by 2002:a65:498f:: with SMTP id r15mr5023618pgs.37.1561657505388; Thu, 27 Jun 2019 10:45:05 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id h6sm6879656pjs.2.2019.06.27.10.45.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:45:05 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 63/87] scsi: ips.c: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:44:57 +0800 Message-Id: <20190627174458.5730-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/ips.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index e8bc8d328bab..ad941bb28060 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -4322,8 +4322,6 @@ ips_allocatescbs(ips_ha_t * ha) return 0; } - memset(ha->scbs, 0, ha->max_cmds * sizeof (ips_scb_t)); - for (i = 0; i < ha->max_cmds; i++) { scb_p = &ha->scbs[i]; scb_p->scb_busaddr = command_dma + sizeof (ips_scb_t) * i; From patchwork Thu Jun 27 17:45:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020213 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 BE24913B4 for ; Thu, 27 Jun 2019 17:45:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1AFC284C3 for ; Thu, 27 Jun 2019 17:45:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5DF028565; Thu, 27 Jun 2019 17:45:16 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 51250284C3 for ; Thu, 27 Jun 2019 17:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbfF0RpQ (ORCPT ); Thu, 27 Jun 2019 13:45:16 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43377 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbfF0RpP (ORCPT ); Thu, 27 Jun 2019 13:45:15 -0400 Received: by mail-pf1-f195.google.com with SMTP id i189so1579412pfg.10; Thu, 27 Jun 2019 10:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Az20ntNgOiNfE75TLIeOz+3xo6iXHd7mcZEjc88o7WM=; b=rgJp0l9R/1IGDTNpD1iIEL3CbrCaoRTb5rAvLPTABF1tfUO/2GDz5E+UafnsvI/64I KAw1+4bIzVJLUG9HzSdxC1/9OEE3cJQQGduZy/FkQFHgO1V+SzaUDbO6Z5Yv823aLVEl Lp929nbuyGf5RWJai+luwBoS+OUF4aoMRPfLy6VlgeiffPD9xwWWZaLZZd0if5GHFKx/ linRSeB7LgKWAqacJ8nGoqCsU4nwAUwL33qansQaNSqcABJr9m88/fsMbtgvb+09lPms BT0wicM3hM+DUspfjFs2SWn1UiaLUuaIaFQTp43tQtjr/fFwNzKf9HHQJznDIClSz6Ik QLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Az20ntNgOiNfE75TLIeOz+3xo6iXHd7mcZEjc88o7WM=; b=qGQGm4GZ3mTZXkF5+ywoDtm1+kpsMILQ5It1A20Q55Kgyxn2V/UqhavIox1n0HdfbL EdTsrHSlyIpaUhex/44NovUhM1VKG6kM/I5uWO9Ebm5PgxcdSqF0hBACkTp9DbyiCu1c CwKQEVcUT5/XIGbtKPPw0zl5gFR6XHXVZfp5POY1KkrUbWEvQbQJX9yTife0bH5dcriy /vtYE9RWGS9p8MOqvUoK4eAH+VHFzoi/ImijrV1IMnAYQudha/rHAQbS0hqGEKXenZlJ liFYKqYjvBzC8xv44Qtlez1SEuv3krln10De23dzTNuIupIq2dUEIU9WjUzNtW5HnysZ t2SA== X-Gm-Message-State: APjAAAUCG279hk5UGrfzwSsCI4aKMJLsSg42XWof7Sl7Gts42Luq1QMK w4ESEwgU+TbxOTIl/9OwM3w= X-Google-Smtp-Source: APXvYqwWBHozb7Z4b0OqpDej8q3pFQfqKIYxsvHl5L16ci4Aot2GeuALHwIW1AiLxcKCMZ7ThIiMXw== X-Received: by 2002:a17:90a:8c18:: with SMTP id a24mr7231560pjo.111.1561657515034; Thu, 27 Jun 2019 10:45:15 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id z20sm7877761pfk.72.2019.06.27.10.45.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:45:14 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Bradley Grove , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 64/87] scsi: esas2r: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:45:08 +0800 Message-Id: <20190627174508.5782-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/esas2r/esas2r_init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c index 950cd92df2ff..67e7a78f408b 100644 --- a/drivers/scsi/esas2r/esas2r_init.c +++ b/drivers/scsi/esas2r/esas2r_init.c @@ -390,7 +390,6 @@ int esas2r_init_adapter(struct Scsi_Host *host, struct pci_dev *pcid, a->uncached, upper_32_bits(bus_addr), lower_32_bits(bus_addr)); - memset(a->uncached, 0, a->uncached_size); next_uncached = a->uncached; if (!esas2r_init_adapter_struct(a, From patchwork Thu Jun 27 17:45:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020215 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 DCCCC13B4 for ; Thu, 27 Jun 2019 17:45:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEFF728565 for ; Thu, 27 Jun 2019 17:45:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1366285E8; Thu, 27 Jun 2019 17:45:28 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 6957628565 for ; Thu, 27 Jun 2019 17:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727316AbfF0RpY (ORCPT ); Thu, 27 Jun 2019 13:45:24 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35033 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbfF0RpY (ORCPT ); Thu, 27 Jun 2019 13:45:24 -0400 Received: by mail-pl1-f196.google.com with SMTP id w24so1688437plp.2; Thu, 27 Jun 2019 10:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GtqDoYZdjCNPoyFmT2TD7ZE9qSjsm0IUOGarsCI7T+Q=; b=h+wmBwyV8Tixj2O+sWy8l31nObjipAg+TO8ZOD1FawXtjAPkmUaD1rJ18RJONQeIOD pfKB0gFEQ9tYFUYqjn2EvtOTaL10phExcykXStz5XxAXfI57rU9ZeIod6+Eybt8YGC41 bJ1guGRouk6jAxB2/EHYOK9Zhais/X/2DcRJ0VFX4HHHzbCNAzr/U+OsX5BeoVaq2rQl b5jbb8tiqKy3DvgdZFmB65qMbSApc5w814fjs2VjBsaGQT87bArQMrGAuRgBw1fQVQAd VNIqorUNK9nIc07J7fwmqeH5COzyTkSTypsLXMPFd3Mf4wWK1aufvaqUXV2q0CEz9YPn bdVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GtqDoYZdjCNPoyFmT2TD7ZE9qSjsm0IUOGarsCI7T+Q=; b=kB/SGahY1Us18bxlzEAPrMqrhIQwtVruZq9VRbtuB7EzYkcTtDYntS1ARaREGlrnK4 tNZUHJYwKapIoFPLuYlFJ8YoODXoJgOe0PGEdVVNxGU1mZmOW58JowJkFzRRzQ4xLUjA Rp9dKdH0FwKigtISOnDKtWcUi2tSuT4kzHaYNh9znlMSEggPyVceHQ7GzvMGJh6CcPBr sVOERKWrQI6lbZqA4H/XQHU0sVuhvZSFa4X8pvRdxJcuM73RizMh+pKrz7BZTgH8pkFw VNAez1hqqQ89mqGC0KPPLSlA8fntAAGTQqOwT9EeSMDfmnyED+ONohXpRL6I5B0BINaT qoTg== X-Gm-Message-State: APjAAAW8ZO1BoESgDxCjdlXUakP7KcXok0UF8VNGkl3PNszL/KwW/6T0 Lc+p5hSzYZqPxIRcRwNXzJQFqGRZSu3WMw== X-Google-Smtp-Source: APXvYqwM6dae6iKAfPHJ3eheK6YtHjxg70ppxMQxQqoHnqMXMjfFFtxiwm8YI33gWEdjNbMiHgyPzQ== X-Received: by 2002:a17:902:8ec3:: with SMTP id x3mr5910189plo.313.1561657523756; Thu, 27 Jun 2019 10:45:23 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id w65sm4027932pfw.168.2019.06.27.10.45.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:45:23 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 65/87] scsi: dpt_i2o.c: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:45:16 +0800 Message-Id: <20190627174516.5888-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/dpt_i2o.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index abc74fd474dc..b1b879beebfb 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -1331,7 +1331,6 @@ static s32 adpt_i2o_reset_hba(adpt_hba* pHba) printk(KERN_ERR"IOP reset failed - no free memory.\n"); return -ENOMEM; } - memset(status,0,4); msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; msg[1]=I2O_CMD_ADAPTER_RESET<<24|HOST_TID<<12|ADAPTER_TID; @@ -2803,7 +2802,6 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba) pHba->name); return -ENOMEM; } - memset(status, 0, 4); writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]); writel(I2O_CMD_OUTBOUND_INIT<<24 | HOST_TID<<12 | ADAPTER_TID, &msg[1]); @@ -2857,7 +2855,6 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba) printk(KERN_ERR "%s: Could not allocate reply pool\n", pHba->name); return -ENOMEM; } - memset(pHba->reply_pool, 0 , pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4); for(i = 0; i < pHba->reply_fifo_size; i++) { writel(pHba->reply_pool_pa + (i * REPLY_FRAME_SIZE * 4), @@ -3092,7 +3089,6 @@ static int adpt_i2o_build_sys_table(void) printk(KERN_WARNING "SysTab Set failed. Out of memory.\n"); return -ENOMEM; } - memset(sys_tbl, 0, sys_tbl_len); sys_tbl->num_entries = hba_count; sys_tbl->version = I2OVERSION; From patchwork Thu Jun 27 17:45:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020223 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 BE6E714C0 for ; Thu, 27 Jun 2019 17:45:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2F312012F for ; Thu, 27 Jun 2019 17:45:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A71602857D; Thu, 27 Jun 2019 17:45:48 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 4DB122012F for ; Thu, 27 Jun 2019 17:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbfF0Rpd (ORCPT ); Thu, 27 Jun 2019 13:45:33 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44130 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbfF0Rpd (ORCPT ); Thu, 27 Jun 2019 13:45:33 -0400 Received: by mail-pf1-f193.google.com with SMTP id t16so1579519pfe.11; Thu, 27 Jun 2019 10:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KsHBBlQbrCLiejasWVdLGkq8oWdlc6LBhKtDSdN6QwI=; b=KY7Zmbkl7qw6LDvC3ZwNK5HTCeKRuj9VSWuC8yGWbfgWyys4s5tnioNfTLidt0Yw4H okf+F/crK+d6udKSUXt0keoA1Kh5n5zMs5hgq5sxPZAfvujOdfEqjVJzQzjP/m1tunIL C+14CfjUqB+HOIdCQPBwrlQ/XdUiedpd0p4gbQ6FGsLMXhOUuxDboWts0OJ8RX9RiAOe Q++wZSoGCR0PAmuWxm1Rc+BSqDaD3MfwO+4Ht62bxl/J/dX0A/em5dF44Mxx7b9N4Epf knu+dlnACDd2mTX8R5D+qGajwfX0uqZOjtBIBM4PsERdRZBGDCCZIMv3RlxiYBE6Lz+c aEZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KsHBBlQbrCLiejasWVdLGkq8oWdlc6LBhKtDSdN6QwI=; b=fq3ggpMATTlrjt6yfu2J7iYEm374CCk1Z4SzWNC4J/V+rNKqwj6KbWsoutgv8+twMC ScKXFt3CVd1WWeD4Xak62QgKk9MXbVQuwWTW/anv8NtHemsWq0tenM91e2+XKn3CgPam 1ZujlD7qa1NhS5yEfDyTOh6+L0gO5XehqX3T8F/pDfanH6SPUO+jHrso4bGMhY+2uUXl 6ANwccCTgOyFPk2EM/Hw7AGKHAnl/754XekZR4bvKkuC0pv/dPdK081kf8AA04zSyQ6g YfxBAjXrbH7mCeUbazGVj8uHBd2YWzeyqCxWKWCX3URE8wCmqT1rD1AjrCAYcMvXzCsh sctQ== X-Gm-Message-State: APjAAAWMUhHhxFyI61KODtMQZbnlj9MNXOX0694zFsASls7fVq0lhx5E YSs1dUBE0gl5JX1rhP+v198= X-Google-Smtp-Source: APXvYqyZtS7FMaw4a4j8BfcYCwdI54uw7GmeSz+cjw4tU6m37ZYKtM3INsA421+ZjDSnCsDBZrmlLQ== X-Received: by 2002:a17:90a:30e4:: with SMTP id h91mr7166684pjb.37.1561657532831; Thu, 27 Jun 2019 10:45:32 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id d9sm2591082pgj.34.2019.06.27.10.45.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:45:32 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , QLogic-Storage-Upstream@qlogic.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 66/87] scsi: bnx2fc: remove memset after dma_alloc_coherent in bnx2fc_io.c Date: Fri, 28 Jun 2019 01:45:26 +0800 Message-Id: <20190627174526.5940-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 8def63c0755f..92b289466797 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -614,8 +614,6 @@ int bnx2fc_init_mp_req(struct bnx2fc_cmd *io_req) bnx2fc_free_mp_resc(io_req); return FAILED; } - memset(mp_req->req_buf, 0, CNIC_PAGE_SIZE); - memset(mp_req->resp_buf, 0, CNIC_PAGE_SIZE); /* Allocate and map mp_req_bd and mp_resp_bd */ sz = sizeof(struct fcoe_bd_ctx); From patchwork Thu Jun 27 17:45:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020221 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 893AB14C0 for ; Thu, 27 Jun 2019 17:45:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CC382012F for ; Thu, 27 Jun 2019 17:45:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 700382857D; Thu, 27 Jun 2019 17:45:47 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 1B8392012F for ; Thu, 27 Jun 2019 17:45:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbfF0Rpn (ORCPT ); Thu, 27 Jun 2019 13:45:43 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40862 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfF0Rpm (ORCPT ); Thu, 27 Jun 2019 13:45:42 -0400 Received: by mail-pf1-f195.google.com with SMTP id p184so1588643pfp.7; Thu, 27 Jun 2019 10:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=to+YLLcx4mRm6uwEhLu6r0Vfyic5/ofLdSpuyp1FJnI=; b=cNBX7HN05gnqavPhgH/nQb9BTWUfUbvZrDv9s7UznkMNx869UM8UNVDequVAvHM9xe PwtXHgxC0CRIuRrqpC0ozPFpgs38dejeZvfRVv2bdRu7NW86sD7LOcp62cfCdnDwFrjd GPsd3wwa9AHS8zms0+MKxYNnEQeMYJ+DD+SpBFpUkrC3UJbAuiAmNH5z4G1EO4sZh5Gf MyDvVix6v386omcOlmxfHwSHS/cvNOEXLrsNbe68Zc9juZRrNK07bzf2GFTYOG4UZs6s PQ1kfv1LvXkLPqZgdeyJDrdsiDcXNPcHuFP/mAuwkhhuSQMjWgfRxBd2WseFFZS8h6Nv FoTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=to+YLLcx4mRm6uwEhLu6r0Vfyic5/ofLdSpuyp1FJnI=; b=LGfVCDc8QAvWj9/ml5XAfZlPNj3m8lH6UCKSI0fJcN7p9V79Gq7cwXKJrvVZnXCwh1 z8d0CqX5FaY5/mytKK3j1Y9wdjJfW3qBg1aMcl50W06YviRA8MTJC4fhKO9Otlih8v24 F1JbSuB8VstUtPZmdG/R9EYXLjOJ9tqi/S8RmMwt8SZeIPTlReMpzJkOgh5mRDgIUuXY p3qBM70U/9MR3HR4EgS3ReyH/gUPoXpmQGGtC8itK7/Nx+9TN/g6mYjm5tfO78mKFDlT QP4I7pALlHIqo75+Y76PAgdljT2DTi9RhqGWNodJrlg1DORt75Rn/NKMSQ95omyDmaZf cBDA== X-Gm-Message-State: APjAAAV+IWW7y17BXXNSH6KljevjwGp/N2++AbuXPsAbEqrfKzTNWNJk nxi37IqYOVu6f+a4CWpY3RuXTEZUobv77w== X-Google-Smtp-Source: APXvYqyyOYVCgav2HAI39gcd/3DCfCItKxManmXr01iOJGAwkrWnmAODqZqwsrdQOIVq1ZpgXUeFjw== X-Received: by 2002:a17:90a:26a1:: with SMTP id m30mr7583928pje.59.1561657541911; Thu, 27 Jun 2019 10:45:41 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id g9sm2394525pgs.78.2019.06.27.10.45.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:45:41 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Anil Gurumurthy , Sudarsana Kalluru , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 67/87] scsi: bfa: remove memset after dma_alloc_coherent in bfad.c Date: Fri, 28 Jun 2019 01:45:34 +0800 Message-Id: <20190627174534.6045-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/bfa/bfad.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 2f9213b257a4..39ac58337290 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c @@ -622,7 +622,6 @@ bfad_hal_mem_alloc(struct bfad_s *bfad) goto ext; } dma_elem->dma = phys_addr; - memset(dma_elem->kva, 0, dma_elem->mem_len); } ext: return rc; From patchwork Thu Jun 27 17:45:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020225 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 9F1E613B4 for ; Thu, 27 Jun 2019 17:45:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 904142012F for ; Thu, 27 Jun 2019 17:45:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81B3F2000A; Thu, 27 Jun 2019 17:45:57 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 262802000A for ; Thu, 27 Jun 2019 17:45:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727128AbfF0Rpx (ORCPT ); Thu, 27 Jun 2019 13:45:53 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45975 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfF0Rpw (ORCPT ); Thu, 27 Jun 2019 13:45:52 -0400 Received: by mail-pf1-f196.google.com with SMTP id r1so1575050pfq.12; Thu, 27 Jun 2019 10:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YPi4AE8LxuYHFBBgFOmJZOFeT/d8VNiM/d5F7Gh71kU=; b=qc257Vlq5v3rz8tkmg54SqUeROUxhOFmh2IPr9SxiwUKQHob3vswRZggYISuxnQkUE xPypkdOYiyDI4FWKxNqg22SUW7z9e+xA5b8GxpnKTmEQzvaCLUqVJb0wDaTo5o551TDj /z99YLG+gpEM/N14Tumu+/j/UpAlWLyO19PmDoku8BnXwmGoeSUr42Xh4+blMAHOqKqI lF+Z6F12SD2xOYA+RFNh6jQyOBhodeDwcbrlCzNMzlZ1JxS3Frnp2kOdLwYxc9NkOZIK tiNWx4gqsR7hzXw04EYraUWRlQ9XE3GI8mKpW0SY1cJm9dmupubQFL7A3Cm83grnfyBD M9tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YPi4AE8LxuYHFBBgFOmJZOFeT/d8VNiM/d5F7Gh71kU=; b=Iwtdq1zzjp42oDfc1BitdVG2u9IStBiwP8Q9Imcuffoe/A3mV66u9KojXwX9ZST1W4 S1/acBx5So5L+wEpfYdbvIhuq3TD9jzvKl88wbon/RdlB2wjH5+hx8FS6sOFj7eAFd0P l9oy8C5/y4imFcQqm07+zpZawXrrqWCE8K8yGs8gmSP4OZuzEELP49/3jV3xDnLxEo8A CHgnJIlrM6/mW1j1FzAul8lt3kFZv0FW8S2Urc/cP7WioyhRuXeLnoUEyNKA3lctWKBU Ez330f81DsGfy490ZE03IpFMilK1FouAt2oAXlr8hNaBvOulmr4RoJ5ALH9yVAHKAWlQ yaBA== X-Gm-Message-State: APjAAAVNoh6UM9NtO6ZhjztzhIahH9n7QdCDNjLYM+KCLCZjdDLTBniB MYpQq54Ve1ysoectsZhNxdM= X-Google-Smtp-Source: APXvYqzvyYWWf3xC0vIBqtCIreSYFokq6bqpYgaYx6wEZKhRVl/Gzon5TUvkit6x5VXJcWrBkvrQ4Q== X-Received: by 2002:a17:90a:2343:: with SMTP id f61mr7535840pje.130.1561657551910; Thu, 27 Jun 2019 10:45:51 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id s17sm2378226pgi.9.2019.06.27.10.45.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:45:51 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Subbu Seetharaman , Ketan Mukadam , Jitendra Bhivare , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 68/87] scsi: be2iscsi: remove memset after dma_alloc_coherent in be_iscsi.c Date: Fri, 28 Jun 2019 01:45:44 +0800 Message-Id: <20190627174545.6098-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/be2iscsi/be_iscsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 2058d50d62e1..09d63bac6d80 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -1081,7 +1081,6 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, return -ENOMEM; } nonemb_cmd.size = req_memsize; - memset(nonemb_cmd.va, 0, nonemb_cmd.size); tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep, &nonemb_cmd); if (!tag) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, From patchwork Thu Jun 27 17:45:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020229 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 16AE214C0 for ; Thu, 27 Jun 2019 17:46:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A7E42859F for ; Thu, 27 Jun 2019 17:46:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8C69285A6; Thu, 27 Jun 2019 17:46:07 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 8C02E2859F for ; Thu, 27 Jun 2019 17:46:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbfF0RqD (ORCPT ); Thu, 27 Jun 2019 13:46:03 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40898 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfF0RqC (ORCPT ); Thu, 27 Jun 2019 13:46:02 -0400 Received: by mail-pf1-f196.google.com with SMTP id p184so1589109pfp.7; Thu, 27 Jun 2019 10:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=o+36uH8gml1ZGrQYdSI5lxoYpgHdYwkkvcnlEpAcvxc=; b=VLc3SIuFHR72K59KZtvjOHJR/Pb65re/R0PSiTa7GgEJCKa4LwkgAGkv6XffTvPnDf 1yTzNqpIX8etis+JYRNEEpn0giOtH+huaUymEw8KXFLfhhLQli1fNGNIVLxNQew4NGya O1hpQd+hHdTsNy7wBMXxRnK+CXdZRODKyD+MP/oULWok3L2ZACH2gxxKUW4OLolSBmDj X7jJ4/9ZbJDbA9Kj8BVHXQdKUPHKnQs1CUITfwxEmpWeWLPTazDx+Hf9v3G2I0ZZ0M5C VDCtYrOmtFEn1WIKY+rtog90+Jas3FkIcB/2qNadRIW7WiD/dRYDtqpMehWVjAqDuezq Stxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=o+36uH8gml1ZGrQYdSI5lxoYpgHdYwkkvcnlEpAcvxc=; b=qcbLcdhFrpMsN/+qhYLs6k89unRZGIyAPyRt+ZINbXy4+GqUAvvJp0IeQQ9XK9Hm/j dm3A6UjHEEvzTUMsBDupny91k5zwL9tQiD4WqyCuv3MCEPxyOpqBIC30kIEpzw4hS/1p RcNC9w1Tlaidv4xtynpM5/kPQx1TW+9qevFqDP6SVOMwzZ5+zlPpmEHQi43K1n6MMcE6 OXHO019AAyAEjcma4JkNU2x0bVcTPCkhk5RLtdkPv15IkA4KITPWBw43JPs9mK3IMcJ9 OIMLcH8ktEvjar0dro+sUD3VPiiT6kZgMexDsygTdHpLae40xMutM2yRybAKVGjRlDcf tTTg== X-Gm-Message-State: APjAAAXQ8YOSrv9Js8TjTWuSs4HhHjQjuzXknFe6wk9RoAnqSiWazS64 YDZPKaTD+O5D3Q6HxIqDtkxUxbKTLU4mVg== X-Google-Smtp-Source: APXvYqy92XNMInm4ZAyBxfWWY7IUZN67sKW9UCkJ/NmXuwjrYc7ozMB0cXMD2ituSSV+LXP3GbuBfQ== X-Received: by 2002:a63:4d63:: with SMTP id n35mr4891540pgl.43.1561657561653; Thu, 27 Jun 2019 10:46:01 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id h1sm3452403pfo.152.2019.06.27.10.45.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:46:01 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , "James E.J. Bottomley" , "Martin K. Petersen" , Ching Huang , Geert Uytterhoeven , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 69/87] scsi: arcmsr: remove memset after dma_coherent in arcmsr_hba.c Date: Fri, 28 Jun 2019 01:45:53 +0800 Message-Id: <20190627174554.6206-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/arcmsr/arcmsr_hba.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 88053b15c363..a0d0dc83184f 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -727,7 +727,6 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb) } acb->dma_coherent = dma_coherent; acb->dma_coherent_handle = dma_coherent_handle; - memset(dma_coherent, 0, acb->uncache_size); acb->ccbsize = roundup_ccbsize; ccb_tmp = dma_coherent; curr_phy_upper32 = upper_32_bits(dma_coherent_handle); From patchwork Thu Jun 27 17:46:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020231 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 A789914C0 for ; Thu, 27 Jun 2019 17:46:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A5432859F for ; Thu, 27 Jun 2019 17:46:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EC16285A6; Thu, 27 Jun 2019 17:46:17 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 36D472859F for ; Thu, 27 Jun 2019 17:46:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727401AbfF0RqM (ORCPT ); Thu, 27 Jun 2019 13:46:12 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39776 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbfF0RqL (ORCPT ); Thu, 27 Jun 2019 13:46:11 -0400 Received: by mail-pl1-f193.google.com with SMTP id b7so1680248pls.6; Thu, 27 Jun 2019 10:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=7g1HWYlZ9UColNnnK/hHjFh9Cp1pGHshvxgfYaG8qpE=; b=TAn9BeEBKkVQ/C2A+9fyNmSVI+kx7ZQTFKBiBGFa3jK9TegCwmJRrE3jXDCDYumqXs gedeYJTtUtjZU9RSuKAWZrfhXFqp9UewwLJOEVsoYriiGL7u+HlhYNJwhnz4Oe4M+R6u tkX1vylyK0epoPY+fUCbVlF0x51C8wO2BYmo1kIAow95Gdh9LQwM7qGudNLQE6k9o/gO lRXBPdfnpA88ZGYiaRipzGY8OIt0ZHTwcgfN0OR9/NsIAY2C3CMXagQK7ZV6Y6+itPlb W2alwl51ARR+dvvnzkunF+QdIlkSUiF9D8PrGt63q/D+MDff380OalPUwkZhdaUWmHso s1dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7g1HWYlZ9UColNnnK/hHjFh9Cp1pGHshvxgfYaG8qpE=; b=Y0MmHLFOZeodqTpPQpaxFyyD6Xuobm7qrcwUi+spVBccdasEFzOndeGLbkrFF2qQC9 8zNbmZjliNmyc2YWq6CiMwvtEDQglTQrg4bdKK0z0C7vZAXlFmd8hHSJitXjUiq1QiIy 23qnbwArOjJmC6jrLyEh/iV5UtIZb1JW/GBVs+aAZJF625Q23Xdc0/FXDM/8wsDQP14K P671azlhNF3q4P3s9u3B9gA7fm6IqW17mI4TmGKPaGeQE4Wxa94Y91tmdvxB8jHNC4Ca UBwKMn8SU1L8a2pnMzTOwGwTDHwEVKTBCGqV3B074Vzv7cpLF40CzM0sJTumQFScrdBS wIpg== X-Gm-Message-State: APjAAAWFbc3n9mMgersAx/87h0nHGam8ggD1J42I72oxq2zihNYhwbAN DIkxJjxOGWhP1gr7zpQ+78E= X-Google-Smtp-Source: APXvYqw60Qomuysypn5jg3MoT4g+odVyVsYA8hzALKg4lqorUTTWcAW8ZSybIQa9SXqt2kske6H7xQ== X-Received: by 2002:a17:902:903:: with SMTP id 3mr6116213plm.281.1561657570934; Thu, 27 Jun 2019 10:46:10 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id a21sm5015976pgd.45.2019.06.27.10.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:46:10 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 70/87] scsi: aacraid: remove memset after dma_alloc_coherent in rx.c Date: Fri, 28 Jun 2019 01:46:05 +0800 Message-Id: <20190627174605.6260-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/aacraid/rx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 3dea348bd25d..4d3484cbca26 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -353,7 +353,6 @@ static int aac_rx_check_health(struct aac_dev *dev) dma_free_coherent(&dev->pdev->dev, 512, buffer, baddr); return ret; } - memset(buffer, 0, 512); post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); post->Post_Address = cpu_to_le32(baddr); rx_writel(dev, MUnit.IMRx[0], paddr); From patchwork Thu Jun 27 17:46:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020233 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 5F01714C0 for ; Thu, 27 Jun 2019 17:46:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 514E82859F for ; Thu, 27 Jun 2019 17:46:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43A71285A6; Thu, 27 Jun 2019 17:46:30 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 E6B2D2859F for ; Thu, 27 Jun 2019 17:46:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbfF0RqZ (ORCPT ); Thu, 27 Jun 2019 13:46:25 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40151 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbfF0RqZ (ORCPT ); Thu, 27 Jun 2019 13:46:25 -0400 Received: by mail-pl1-f196.google.com with SMTP id a93so1688390pla.7; Thu, 27 Jun 2019 10:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PIRPhI/UMnvi08tcprrRrj6ERaBMz8yibtguFMM+LZU=; b=BCtDioW4dEpvPLoJf3TTXi+A7STbvxDOR+CivoGxs1TOGswespN6j0/TugrsFlHGML yfWDjKKtGlTm5vC2WEKtg+6T7dtga+O7PkZhxEirr7PdSsjCnCDCqdsbVZQoJgtSYBGK fetg679xQIQM/WnstgMP50wgO8UmyXH95YcKQp+SFqil2yrzIFlNGrtqa0zEkqglF7I4 rmR+oqNPfUzO4ZqX+neyoPGQObCyHrLE4jL832/5Eh53vvmua2uixAOA6H9fQXRnvNQr 0fofAiO3i1JEC7GBqX0RpeHT9S8XHWSyhntKLc6Wo824Y0VpaUfSMyL7S5O6iZI2RkIz thgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PIRPhI/UMnvi08tcprrRrj6ERaBMz8yibtguFMM+LZU=; b=Cnjq8weZoVU9VdQEPzhT2CyY9S4ffXuoA4dlmPDycugPsun15TssqfHOBDtHDAgTmc fitqOUTIpx6S/U0fNa4xAXxJ3zuUIhs4inBIjmC5JWDABeWeR1xICHPoqki4RNOHrLAY 9wAA8YKKDhalk8m9+Ca31Mhst9x+EEqQslO/UHVGRXKcMjJ88z4Or1xTqXddS4aCF0oB JlzNwtVes79cO97fuv0moLXR9DgDUhQwWhcqbvjxoH3Ixtgp7/qfkCTQBhNUMR9s9ewG PMh/0b2ST0mJE0okO2Oisj/lTbBnpFcj4N9DYsZZrsbBIxYAd3gn0wFaPNeWEWdiKwir 1zNA== X-Gm-Message-State: APjAAAXxu7j+7uInNv6fNjN0NYoRzuwkxkOxeZjQXfbgFf4rmdZZrUON HShEDQUcJmt6Pov8uKQqoSE= X-Google-Smtp-Source: APXvYqw17O07SCOj8UceZp3DgyEdO56/1F6KUbC0eBBxKuzwbpMiaPsKtg/aeYIyTf41ZnxkCutoFQ== X-Received: by 2002:a17:902:8207:: with SMTP id x7mr6046456pln.63.1561657584494; Thu, 27 Jun 2019 10:46:24 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id e188sm4453637pfh.99.2019.06.27.10.46.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:46:24 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Adam Radford , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 71/87] scsi: 3w-xxxx: remove memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:46:12 +0800 Message-Id: <20190627174612.6366-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/3w-9xxx.c | 2 -- drivers/scsi/3w-xxxx.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 3337b1e80412..da17d9104e6b 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -534,8 +534,6 @@ static int twa_allocate_memory(TW_Device_Extension *tw_dev, int size, int which) goto out; } - memset(cpu_addr, 0, size*TW_Q_LENGTH); - for (i = 0; i < TW_Q_LENGTH; i++) { switch(which) { case 0: diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 2b1e0d503020..26703ef52a2e 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -848,8 +848,6 @@ static int tw_allocate_memory(TW_Device_Extension *tw_dev, int size, int which) return 1; } - memset(cpu_addr, 0, size*TW_Q_LENGTH); - for (i=0;i