From patchwork Tue Nov 29 08:25:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 9451171 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 9A6F360710 for ; Tue, 29 Nov 2016 08:25:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C5D027FE4 for ; Tue, 29 Nov 2016 08:25:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 810D4280DE; Tue, 29 Nov 2016 08:25: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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID, T_TVD_MIME_EPI 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 EE24327FE4 for ; Tue, 29 Nov 2016 08:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755515AbcK2IZz (ORCPT ); Tue, 29 Nov 2016 03:25:55 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:36062 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752320AbcK2IZy (ORCPT ); Tue, 29 Nov 2016 03:25:54 -0500 Received: by mail-io0-f196.google.com with SMTP id k19so27838607iod.3; Tue, 29 Nov 2016 00:25:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=31Z1dx5UFPVa0VlP3SScsyr+gq41MuO2L2umuWVqTT0=; b=EouFT3MEWUIZXKKTmlQxDLXxjF8lZkKdNbjPTOMGHP3AbseVJF9tnbTnIwTr7FuKao aoOViu/vnlrWE1nrioDE6H2vA/UUuHkrMlNfJV+SfQ+BFHch2oLU4HkpAWNyJffkED4A 5S0itAzimOpqgA3tThDov25rrjZST3uR861XzStSn89mfSWK+kI+g+yWF7s25OjYtEp9 643JyRnsa14Z1TObrWiobPvkGjqSUZhNru4Lg7XWR+pTCFTJ0YHd3+OusllyNW4n8BCh iImUi1ttJ+rAoNHKZkwsfz6FPZX9b8woiBNRwOmE9XAsShz4YUDG4hOmy4DFp8MY9eiK 0d5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=31Z1dx5UFPVa0VlP3SScsyr+gq41MuO2L2umuWVqTT0=; b=PPZOG4ZwfJw2I2GZI+ZlImvHaqR4uhoZzqQoRXfwGRgtE2KqjKNMElQ+OIkrwTdmdP SdjRsov2whc8FBTEyjh0N1iO6LZtRj45Qk/1cNje44l+MTEUKeOHmJtK960Dp+roTT4V EEvMR5W+lP2kHMMuU9ubUJqtdACl1irrImD2uSJERep93oPBXuoJ/j60dC9+W9ObgWC4 f974X9uKPIiO54GWuZeCXcnZ4ENihLvyZSwXyYenbtbLlOLHnr35sw2V+N/iju4uTNnU 0GNj+90QJDh4Ecyb8bYT5c0NK53GmQtbXgPCIs2rfeSsiTPpxFyVRJmShb2zF9Pjsv3q WhCA== X-Gm-Message-State: AKaTC03RPQZIlroleYn7Kz3LIyZZF2oZBSMxjDPeF3kH2CHlcnohqwwfk8w+qz/l+tSD6m/GGSuefnzvh6bjow== X-Received: by 10.107.182.70 with SMTP id g67mr23003570iof.120.1480407953529; Tue, 29 Nov 2016 00:25:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.112.35 with HTTP; Tue, 29 Nov 2016 00:25:52 -0800 (PST) In-Reply-To: References: <20161129065931.GA3245@gnr743-HP-ZBook-15> From: Souptick Joarder Date: Tue, 29 Nov 2016 13:55:52 +0530 Message-ID: Subject: Re: [PATCH v2] ethernet :mellanox :mlx4: Replace pci_pool_alloc by pci_pool_zalloc To: Sergei Shtylyov , yishaih@mellanox.com Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Rameshwar Sahu Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While sending the patch using "mutt" , alignment is getting changed. In original patch file alignment is proper and I have tested the patch with "checkpatch.pl". Attach is the original patch file. I am using mutt -H < patch-file> Any suggestion will be helpful? On Tue, Nov 29, 2016 at 12:55 PM, Souptick Joarder wrote: > Please ignore this v2 patch. > > On Tue, Nov 29, 2016 at 12:29 PM, Souptick Joarder wrote: >> In mlx4_alloc_cmd_mailbox(), pci_pool_alloc() followed by memset will be >> replaced by pci_pool_zalloc(). >> >> Signed-off-by: Souptick joarder >> --- >> v2: >> - Address comment from sergei >> Alignment was not proper >> >> drivers/net/ethernet/mellanox/mlx4/cmd.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c >> index e36bebc..96cdf9a 100644 >> --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c >> +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c >> @@ -2679,14 +2679,13 @@ struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev) >> if (!mailbox) >> return ERR_PTR(-ENOMEM); >> >> - mailbox->buf = pci_pool_alloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, >> - &mailbox->dma); >> + mailbox->buf = pci_pool_zalloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, >> + &mailbox->dma); >> if (!mailbox->buf) { >> kfree(mailbox); >> return ERR_PTR(-ENOMEM); >> } >> >> - memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); >> >> return mailbox; >> } >> -- >> 1.9.1 >> Regards Souptick From 3621eac92d271332ecc95b6f09ce25b7c6846137 Mon Sep 17 00:00:00 2001 From: Souptick Joarder Date: Tue, 29 Nov 2016 12:15:39 +0530 Subject: [PATCH v2] ethernet :mellanox :mlx4: Replace pci_pool_alloc by pci_pool_zalloc In mlx4_alloc_cmd_mailbox(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc(). Signed-off-by: Souptick joarder --- v2: - Address comment from sergei Alignment was not proper drivers/net/ethernet/mellanox/mlx4/cmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index e36bebc..96cdf9a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c @@ -2679,14 +2679,13 @@ struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev) if (!mailbox) return ERR_PTR(-ENOMEM); - mailbox->buf = pci_pool_alloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, - &mailbox->dma); + mailbox->buf = pci_pool_zalloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, + &mailbox->dma); if (!mailbox->buf) { kfree(mailbox); return ERR_PTR(-ENOMEM); } - memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); return mailbox; } -- 1.9.1