From patchwork Mon Nov 28 11:26:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 9449375 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 3AA1160756 for ; Mon, 28 Nov 2016 11:26:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2ADD62756B for ; Mon, 28 Nov 2016 11:26:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FB6C27B2F; Mon, 28 Nov 2016 11:26: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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 02081275A2 for ; Mon, 28 Nov 2016 11:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754606AbcK1L0l (ORCPT ); Mon, 28 Nov 2016 06:26:41 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33310 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754475AbcK1L0a (ORCPT ); Mon, 28 Nov 2016 06:26:30 -0500 Received: by mail-pf0-f193.google.com with SMTP id 144so6368843pfv.0 for ; Mon, 28 Nov 2016 03:26:30 -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=yMz0FK5v4zhRfOHLc3IhHqQy33Y9qB2LSY4XkD5PQnY=; b=Rhe5NPrtRpZIA4iZ9wvVAfCbeew2aJT2SJHTIASKts10y4SaF04WAyBAkmms/sq6Kb Sz3r5yfAcQ3iG4g9a9FzGX2pdOsbwTnp//wDXoPLyydNwYaF1fAK6LGqpoKL0y58I7jI EaRsQktjwPFuvBRkHNUZkzPyaXThCnI7MfKX4QB+eM7yHreArXd+sMnDq2kkQwy1D9o2 o6ueg1v2yr6UAlRdL1fBfmaxvzUD55bd4RfUs5VsDYkDzlPAiv8XfreNWG85MKXNTERA Gc4OKDKiydItnvw9H1l3C0VCFpUN/1F2HT6AfATvaFevCYl5W9siY156q8QMSpO7tcm5 A1qg== 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=yMz0FK5v4zhRfOHLc3IhHqQy33Y9qB2LSY4XkD5PQnY=; b=bAArIgGQ+Ir2xEbDdkTQ2pzQelkYw2LD4FCLziNBzgkLvneoQhIKwT/AIayZtsKj81 p+FugnZ7UuCCe/VOGvdses+5or4XhXMMle3+T/zL86GpgJtK9B4M7Z4gVWFzrAAK/AMF BEqcvlZw4s0Pb0zP1RNY4FRkznJVlLDiSInuugOhQT+bluyIf1OLhnQtTaCNJPEIiy/5 YaFRmL7Be7vNdi8xR81XgUxFoBY07G+vps00R6l0b0QsPxsu7IEReM0YjMOWE+ptkEZG h7w7jC80orIdyODFb7CWK1i/Wz2Nilf16s1H/j9FuTKD7SyUuWeCxeMuULixIKTX0Ldk prOw== X-Gm-Message-State: AKaTC00P+rJ6gYgbWo5Sxcv0r6euWentf1cD4mTbXN6/lYujLbFDJJmCZH875mM0aEl+uA== X-Received: by 10.98.207.195 with SMTP id b186mr20867343pfg.40.1480332389448; Mon, 28 Nov 2016 03:26:29 -0800 (PST) Received: from gnr743-HP-ZBook-15 ([223.31.70.102]) by smtp.gmail.com with ESMTPSA id r124sm68756252pgr.6.2016.11.28.03.26.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Nov 2016 03:26:28 -0800 (PST) Date: Mon, 28 Nov 2016 16:56:26 +0530 From: Souptick Joarder To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: sahu.rameshwar73@gmail.com, linux-scsi@vger.kernel.org Subject: [PATCH] scsi: mvsas: Replace pci_pool_alloc by pci_pool_zalloc Message-ID: <20161128112626.GA31859@gnr743-HP-ZBook-15> 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 Inside mvs_task_prep(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder Reviewed-by: Johannes Thumshirn --- drivers/scsi/mvsas/mv_sas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index 86eb199..681e5f7 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -790,10 +790,9 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf slot->n_elem = n_elem; slot->slot_tag = tag; - slot->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); + slot->buf = pci_pool_zalloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); if (!slot->buf) goto err_out_tag; - memset(slot->buf, 0, MVS_SLOT_BUF_SZ); tei.task = task; tei.hdr = &mvi->slot[tag];