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: 84522 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1498832qgi; Tue, 29 Nov 2016 00:26:01 -0800 (PST) X-Received: by 10.84.210.73 with SMTP id z67mr59350652plh.112.1480407961836; Tue, 29 Nov 2016 00:26:01 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78si48115240pgb.48.2016.11.29.00.25.59; Tue, 29 Nov 2016 00:26:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756007AbcK2IZ6 (ORCPT + 5 others); Tue, 29 Nov 2016 03:25:58 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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