Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbeAAP7w (ORCPT + 1 other); Mon, 1 Jan 2018 10:59:52 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:37905 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbeAAP7u (ORCPT ); Mon, 1 Jan 2018 10:59:50 -0500 X-Google-Smtp-Source: ACJfBotXsDZfWVA0lrvAw63qKrJqevOibJdM5OjYVX+b+uA6HbkUXg/xGthlgmFdKxmCAXyKwwYQXw== Date: Mon, 1 Jan 2018 21:29:42 +0530 From: Himanshu Jha To: Alan Stern Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, mcgrof@kernel.org Subject: Re: [PATCH v2] USB: host: Use zeroing memory allocator rather than allocator/memset Message-ID: <20180101155942.GA10108@himanshu-Vostro-3559> References: <20180101135151.GA6113@himanshu-Vostro-3559> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 01, 2018 at 10:53:07AM -0500, Alan Stern wrote: > On Mon, 1 Jan 2018, Himanshu Jha wrote: > > > On Sun, Dec 31, 2017 at 04:20:45PM -0500, Alan Stern wrote: > > > On Sun, 31 Dec 2017, Himanshu Jha wrote: > > > > > > > Use dma_zalloc_coherent for allocating zeroed > > > > memory and remove unnecessary memset function. > > > > > > > > Done using Coccinelle. > > > > Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci > > > > 0-day tested with no failures. > > > > > > > > Suggested-by: Luis R. Rodriguez > > > > Signed-off-by: Himanshu Jha > > > > --- > > > > v2: > > > > -align argumenst as they were before applying the SmPL rule. > > > > > > For the UHCI portion: > > > > > > Acked-by: Alan Stern > > > > > > But there is something pecular about the patch... > > > > > > > drivers/usb/host/uhci-hcd.c | 7 +++---- > > > > drivers/usb/host/xhci-mem.c | 7 ++----- > > > > 2 files changed, 5 insertions(+), 9 deletions(-) > > > > > > > > diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c > > > > index f5c9021..ac53398 100644 > > > > --- a/drivers/usb/host/uhci-hcd.c > > > > +++ b/drivers/usb/host/uhci-hcd.c > > > > @@ -600,15 +600,14 @@ static int uhci_start(struct usb_hcd *hcd) > > > > uhci->dentry = dentry; > > > > #endif > > > > > > > > - uhci->frame = dma_alloc_coherent(uhci_dev(uhci), > > > > - UHCI_NUMFRAMES * sizeof(*uhci->frame), > > > > - &uhci->frame_dma_handle, GFP_KERNEL); > > > > + uhci->frame = dma_zalloc_coherent(uhci_dev(uhci), > > > > + UHCI_NUMFRAMES * sizeof(*uhci->frame), > > > > + &uhci->frame_dma_handle, GFP_KERNEL); > > > > > > The second and third "changed" lines here actually are identical. What > > > program would produce a diff file showing that they were changed? > > > > I'm sorry, I can't understand the problem. > > There is no problem. I merely asked a question. > > > The patch was generated by cocci script specified above and then you > > told me to change the whitespace scheme as it was before. > > Yes, I know. But did you change the cocci script to make it produce > this new patch, or did you make the patch by manually editing the old > version? In other words, how was this patch generated? I did that manually, no change in cocci script. Thanks Himanshu Jha