From patchwork Fri Mar 23 16:05:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 132354 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp778953ljb; Fri, 23 Mar 2018 09:08:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELtKo3VOiu5iqc1b/YUjynx6GbmySPpauss17zhe0AaDivJZ+GeNC06OVeoMowgCiOF6QNgy X-Received: by 10.99.119.133 with SMTP id s127mr21301817pgc.441.1521821283923; Fri, 23 Mar 2018 09:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521821283; cv=none; d=google.com; s=arc-20160816; b=m9LYUSl644Kll+1UCECETvlBsS3uuwjq/cqjPkFUy6pE0Iw0kgMRyqqs9YmdlQDDPQ PA00Ipxgtng3l5xtEjPUqWZvREDC1xdetsVOg8mIQH1s3ekw6GYL6eE29fd0rWJASbNe mOU4/Lx78ycqJCAVsydjpsUGkJxFLJxR60TpozJ+ckgkjQafBe/ydWwfl/25aiNQ+Ni+ S/tKa68U0+qS9ya/QwSZG1LtCEmABAU8COZT+lNhhq2ji4NRdk0+jB7g8Y83l+qBV6qp yzsekOXLk517p4kKkCOiTEmAso/vex2zpHaIzzMG6GdvJMS1lXVD9A1cO/9J8ycXFEbK mziQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=CYrTBxjq6Rl+/rjiR+riPdLwctDiRKs0iBQQcQhgKlI=; b=SQW+WerOcFhak0JJvZgq7dek/o/0vWpQ+E0pVSeO3VSFBNTkavwtvQ/WAvRmw4Qcl2 uqnRZxBwo1fqSu9knrFMBIIhe4vF+FCITFh4SF/GPgOkoaSO2/ANNcUdu3kGheAo6MP0 tg6Q+12mpTpa8+9AkLPyfBB5eSUW/PouOWMtbF+sWrCuXUBoFJO2h9N16H5LV0+cQ5z/ 6aDQFOH6MRB6oe0/d1nZoYy3LWqLhzjkJ6oYemqgc/AmQfMzOidgDO3zN5HeV1e+5hPs S2FyzCNglLrPJMWNsZadLQ8b7Pttv4RDZtj/Q8tTxVboVGvj37bTtD9DikhiDjPw/SGo EEXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6-v6si1987823plx.263.2018.03.23.09.08.03; Fri, 23 Mar 2018 09:08:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752487AbeCWQHt (ORCPT + 28 others); Fri, 23 Mar 2018 12:07:49 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6686 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751889AbeCWQGH (ORCPT ); Fri, 23 Mar 2018 12:06:07 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B9F2E42499A36; Sat, 24 Mar 2018 00:05:50 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.361.1; Sat, 24 Mar 2018 00:05:45 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 4/8] scsi: hisi_sas: use dma_zalloc_coherent() Date: Sat, 24 Mar 2018 00:05:11 +0800 Message-ID: <1521821115-120040-5-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521821115-120040-1-git-send-email-john.garry@huawei.com> References: <1521821115-120040-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen This is a warning coming from Coccinelle, and need to use new interface dma_zalloc_coherent() instead of dma_alloc_coherent()/memset(). Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index a216795..9563dfa 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1822,13 +1822,11 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost) goto err_out; s = HISI_SAS_MAX_ITCT_ENTRIES * sizeof(struct hisi_sas_itct); - hisi_hba->itct = dma_alloc_coherent(dev, s, &hisi_hba->itct_dma, + hisi_hba->itct = dma_zalloc_coherent(dev, s, &hisi_hba->itct_dma, GFP_KERNEL); if (!hisi_hba->itct) goto err_out; - memset(hisi_hba->itct, 0, s); - hisi_hba->slot_info = devm_kcalloc(dev, max_command_entries, sizeof(struct hisi_sas_slot), GFP_KERNEL);