From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876AbcLKHK6 (ORCPT ); Sun, 11 Dec 2016 02:10:58 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:49820 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbcLKHK5 (ORCPT ); Sun, 11 Dec 2016 02:10:57 -0500 Date: Sun, 11 Dec 2016 08:11:03 +0100 From: Greg Kroah-Hartman To: csmanjuvijay@gmail.com Cc: Alan Stern , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] USB: OHCI: pxa27x:fix code warnig and errors Message-ID: <20161211071103.GA32092@kroah.com> References: <1481332408-452-1-git-send-email-csmanjuvijay@gmail.com> <1481411325-22458-1-git-send-email-csmanjuvijay@gmail.com> <1481411325-22458-3-git-send-email-csmanjuvijay@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481411325-22458-3-git-send-email-csmanjuvijay@gmail.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 10, 2016 at 11:08:45PM +0000, csmanjuvijay@gmail.com wrote: > From: Manjunath Goudar > > This patch will fix the checkpatch.pl following errors: > WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... > then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... > ERROR: space prohibited after that open parenthesis '(' > ERROR: space prohibited before that close parenthesis ')' > > Signed-off-by: Manjunath Goudar > Cc: Alan Stern > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > > --- > changelog V1->V2: > Have fixed the printk warning. > drivers/usb/host/ohci-pxa27x.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c > index c73e1ae..350e384 100644 > --- a/drivers/usb/host/ohci-pxa27x.c > +++ b/drivers/usb/host/ohci-pxa27x.c > @@ -138,12 +138,15 @@ struct pxa27x_ohci { > * PMM_PERPORT_MODE -- PMM per port switching mode > * Ports are powered individually. > */ > -static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode) > +static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, > + struct device *dev) Eeek, no! Stop and look at what you did here. Why would you want to include 2 struct device pointers in a function, when they really point to the same thing? That makes no sense at all. I appreciate general code cleanups, but please, get some experience in C and how the kernel handles the driver model before trying to make changes like this. You can't just blindly make coding style changes and expect them to be correct without that knowledge. If you want to make coding style fixes, please practice on the drivers/staging/ area. The maintainer of that code is much more forgiving and not grumpy when stuff like this happens... thanks, greg k-h