From patchwork Tue Dec 6 20:23:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 9463217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 069A66022E for ; Tue, 6 Dec 2016 20:23:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDFCE284CD for ; Tue, 6 Dec 2016 20:23:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E279C284E2; Tue, 6 Dec 2016 20:23:10 +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=-3.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, T_DKIM_INVALID 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 8E709284CD for ; Tue, 6 Dec 2016 20:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753315AbcLFUXJ (ORCPT ); Tue, 6 Dec 2016 15:23:09 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33123 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753200AbcLFUXJ (ORCPT ); Tue, 6 Dec 2016 15:23:09 -0500 Received: by mail-pg0-f68.google.com with SMTP id 3so20873916pgd.0 for ; Tue, 06 Dec 2016 12:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=vsYO8t2lkoXnMUclSDLjw0xsi7w0vi/uzrF13MqEa6Q=; b=noZp11ZafYB05DPTI4AgUCwR8bUPqFAi/Iwp13nJuLDj4KBNHX9YVcCDihkL6wNgt+ nDPwxXrpq5mvqQNZgyO02E28CYXWKHk8EFBm+yJV++BBcwVLnoKfmQBQDimnwtmr8zMq dRjV2VEFc6eUnJw0oVjA+fjtPA1lW9grESbKtkNwA5OSPLMWcZS1QLfQss/I0W0GgVHC 2ggiVv9lDTK4QBJs2iGbfaGEmsT5lrLoShz+nd4L02PVb4xHa9rCArtobRaURlFhefBm mxQw0KMnKxf6QUgwOvgx8Azjohm0Sn9VWuTLc8IudvEz4N0TUw7ryTxI+VnJ2za6d1j/ SM6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=vsYO8t2lkoXnMUclSDLjw0xsi7w0vi/uzrF13MqEa6Q=; b=YidwZkM1BEeYFdMX+APNdzf/iFMNuIpthPNJqm2gu1j+2P0UQFmbAZ1X4NOGLpKQAh tgwt+tW5hV93+OU4sgLegNXLspQC7uF2icPoeRSox9xWarfR4KvZnyDKJPKS7qhVz1y9 rJjXAMN54TQ56rvpOloPY7hJypTrKp6w9Y0mjLaPDO+ohcAWmu4xq6k4OAzzp6v1pf/B 9Riou0Y/2op/fEYgcAvGQHWpHlnlC9SCWvC70hXwGmFWZyMiviqMpaFQlWFWZR5o9Fq5 HfxO7R5Idycko4uclIRTiA/WRqWp2SRBDU1BWhdeqlWFDz7866tkjIbMqSvn6F1vay3v opeA== X-Gm-Message-State: AKaTC01rrlPCbfM95CGc839JaWFHz2QkndjsEKFgvJmT2rutPemIm3oteAGjJsUSjElLvQ== X-Received: by 10.99.128.198 with SMTP id j189mr114368410pgd.151.1481055788649; Tue, 06 Dec 2016 12:23:08 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([106.51.142.218]) by smtp.gmail.com with ESMTPSA id q145sm36824391pfq.22.2016.12.06.12.23.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 12:23:07 -0800 (PST) Date: Wed, 7 Dec 2016 01:53:04 +0530 From: Souptick Joarder To: QLogic-Storage-Upstream@qlogic.com Cc: linux-scsi@vger.kernel.org Subject: [PATCH] scsi: qla4xxx: Use dma_pool_zalloc Message-ID: <20161206202304.GA6884@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 We should use dma_pool_zalloc instead of dma_pool_alloc/memset Signed-off-by: Souptick joarder --- drivers/scsi/qla4xxx/ql4_mbx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index c291fdf..f2edfd7 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c @@ -1587,12 +1587,11 @@ int qla4xxx_get_chap(struct scsi_qla_host *ha, char *username, char *password, struct ql4_chap_table *chap_table; dma_addr_t chap_dma; - chap_table = dma_pool_alloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); + chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); if (chap_table == NULL) return -ENOMEM; chap_size = sizeof(struct ql4_chap_table); - memset(chap_table, 0, chap_size); if (is_qla40XX(ha)) offset = FLASH_CHAP_OFFSET | (idx * chap_size);