Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1132590pxb; Wed, 4 Nov 2020 00:25:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzD6vXC7zbkGTHEqrms75ro4w9r5WM3MP24zw+z5g+aEPeEU3qnpa9Eg+QYswzqawK3q2dH X-Received: by 2002:a17:906:640d:: with SMTP id d13mr23214793ejm.223.1604478323636; Wed, 04 Nov 2020 00:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604478323; cv=none; d=google.com; s=arc-20160816; b=FK+f6sNHNNvJMLix2jaH/Jrww3x0pdKuKGIFlXtw0SNufB2A/N7mBE8W5CUbprL8bh UYEv5AZa965jsu03mDG52peYvyQk3rZ/5IVpM/Li2Wlele2Wd1oeLiPU5iVVX7pMYzYX ztz/aQBxlpSJ+BnbF5bvV+X4Dyl1FYHL6Q1xbxBNYWUKCG1opGSmwmBrfk2D7ntyGhi0 p1LjJPBM/L1c7qRZYY49HhZ+27tRRKKWorK7Dzkf6gMgDk4EKli7GBK/cXXDL0O7r+QT Kfc/EkrhZeCR0ruCuUV2MjxrSEyTx3L+UfCNaKe76sdjfKxa2hrUdFgKEw5sLcrEuhWy TXXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=LIxDvdCNMHF1Sj6aH4WOZgFzcxoEZKzeDUYKQv5iNjE=; b=Nbu6PFyvIFgeRU/wFj46Ip4b50a62Lm0Mk2LZHGMHKACZs3vx5TqeVW2b6ZQ5LVZ7+ slhoBiYoDPr7RpEGfnodj+x8g0htYjCrk27RWrXy8zpVilpc38zQw59DQBBBVOUZd0eL eFXCiWP3S7UnuVXDXGA4jktVnDHbLeNavHGBX4yEie3FhdQO1A7YH9R4NP5Etyd7yUk1 cutM8Zx/2bk9K4UWZHr6/pmYOt8Wl2q0PpsOMy+IwDsETAwbfmKVHC/aPz9hw296KGe4 apnHXHZI5Broar6qrgM1tkqk6oN68AKbdIDn/txyD442UEg2UiSNFQDHAJrkU7y9tbs6 q4TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pQtkZjQr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn19si53846ejc.336.2020.11.04.00.25.00; Wed, 04 Nov 2020 00:25:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pQtkZjQr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727754AbgKDIXh (ORCPT + 99 others); Wed, 4 Nov 2020 03:23:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbgKDIXg (ORCPT ); Wed, 4 Nov 2020 03:23:36 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4034C0613D3; Wed, 4 Nov 2020 00:23:36 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id v12so648073pfm.13; Wed, 04 Nov 2020 00:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=LIxDvdCNMHF1Sj6aH4WOZgFzcxoEZKzeDUYKQv5iNjE=; b=pQtkZjQrwE4VES6/btFNDa47w+ukqIxhvZdItdR3d8ee5SypOyaFV/l526mjA0B7V9 ujiwxpslpTG2r9A2iXqWZuspfTrmmjOAZPLwxHletWlRxIEr3fyu82hegcv+SQa1ztt/ Vdb+gnQz7G4KPEdxM/rGwvycGnQOTGxOSSlVuQj6ra9HTEjRd1eejB+kOY5M9iiYab6S jZTVstt6J9RA9cbOybCg8XcF1JpVZGuhQt9aOP1f/yq1jp745+eey2yxNkt2tPLxcthH JcvtddHgZP9poeHHc1qQRvo+ELncsuFB2y6PIiuDE1/iMy0t4q2SVOhHB4B+MDkqQ6TM dj6Q== 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=LIxDvdCNMHF1Sj6aH4WOZgFzcxoEZKzeDUYKQv5iNjE=; b=KNydf1IUGzm7tRsbhmI7mhG5vLpdtQ/NinUMX8PSChc8dHUYjZPKx3t45+OoTKBR3M HmDzJPnj7271IiOVZ3zTaCdlsVkgFp7oQ849+VjIjfkGSwT85hFbh+GzcGAHmIps886J qpxcsruoOGLuETZqaUW7Vg5byPYBPon+zRx1ZZJC6vFwYBP8E4Wgb2NnT3gSxMNB5mrL P/RgQXEZrESC8PF9S5e89VH1o7l1FwbIs1pTI1QF83KVdxa7mUCEAXfNrGlkKOpmuRmb Za81ix5nNmoFHT2f0Dg4mYZmAzH4dDJV52REFFEYW+nS6aU16PN/8n+uvsFR7bs5pC0n dgag== X-Gm-Message-State: AOAM530Mm8pyb/njkJyhgU+uaxfu7aFtJKiDEpXPP8dNlcMpQskjmzmh PoeBh/Rgp6UfhQqz9WUxiiSA1HtdJezB X-Received: by 2002:a17:90a:134b:: with SMTP id y11mr3149894pjf.182.1604478216419; Wed, 04 Nov 2020 00:23:36 -0800 (PST) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id z3sm1546854pfk.159.2020.11.04.00.23.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Nov 2020 00:23:35 -0800 (PST) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: njavali@marvell.com, GR-QLogic-Storage-Upstream@marvell.com, aeasi@marvell.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Kaixu Xia Subject: [PATCH] scsi: qla2xxx: use the dma_pool_zalloc() instead of dma_pool_alloc/memset Date: Wed, 4 Nov 2020 16:23:22 +0800 Message-Id: <1604478202-23750-1-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaixu Xia Here we could use the dma_pool_zalloc() function instead of dma_pool_alloc/memset. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia --- drivers/scsi/qla2xxx/qla_os.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index f9c8ae9d669e..cea78d762731 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4226,11 +4226,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, /* Get consistent memory allocated for Special Features-CB. */ if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { - ha->sf_init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, + ha->sf_init_cb = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &ha->sf_init_cb_dma); if (!ha->sf_init_cb) goto fail_sf_init_cb; - memset(ha->sf_init_cb, 0, sizeof(struct init_sf_cb)); ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0199, "sf_init_cb=%p.\n", ha->sf_init_cb); } -- 2.20.0