From sudipm.mukherjee at gmail.com Mon Aug 7 13:42:37 2017 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Tue, 8 Aug 2017 02:12:37 +0530 Subject: [Linux-parport] [PATCH 1/5] parport: add newline to trailing statements In-Reply-To: <20170717163702.17427-2-palminha@synopsys.com> References: <20170717163702.17427-1-palminha@synopsys.com> <20170717163702.17427-2-palminha@synopsys.com> Message-ID: <20170807204237.GA2880@mukherjee.sudip> Hi, On Mon, Jul 17, 2017 at 05:36:58PM +0100, Carlos Palminha wrote: > based on checkpatch, add newline to trailing statements > > Signed-off-by: Carlos Palminha > --- > drivers/parport/daisy.c | 7 +++++-- > drivers/parport/ieee1284.c | 17 +++++++++-------- > drivers/parport/ieee1284_ops.c | 8 ++++++-- > drivers/parport/parport_cs.c | 4 +++- > drivers/parport/parport_gsc.c | 6 ++++-- > drivers/parport/probe.c | 4 +++- > 6 files changed, 30 insertions(+), 16 deletions(-) > goto try_again; > success: > parport_frob_control (port, PARPORT_CONTROL_STROBE, 0); > diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c > index e9b52e4a4648..993565fef73b 100644 > --- a/drivers/parport/parport_cs.c > +++ b/drivers/parport/parport_cs.c > @@ -88,7 +88,9 @@ static int parport_probe(struct pcmcia_device *link) > > /* Create new parport device */ > info = kzalloc(sizeof(*info), GFP_KERNEL); > - if (!info) return -ENOMEM; > + if (!info) > + return -ENOMEM; Please use tab to indent the code. I know some part of this file uses 4 spaces to indent, so if you use one tab before 'return -ENOMEM', it will look perfect. -- Regards Sudip From sudipm.mukherjee at gmail.com Mon Aug 7 13:49:48 2017 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Tue, 8 Aug 2017 02:19:48 +0530 Subject: [Linux-parport] [PATCH 2/5] parport: cleanup prohibited space after functions name In-Reply-To: <20170717163702.17427-3-palminha@synopsys.com> References: <20170717163702.17427-1-palminha@synopsys.com> <20170717163702.17427-3-palminha@synopsys.com> Message-ID: <20170807204948.GB2880@mukherjee.sudip> On Mon, Jul 17, 2017 at 05:36:59PM +0100, Carlos Palminha wrote: > based on checkpatch, remove prohibited space between function name and > open parenthesis '('. > > Signed-off-by: Carlos Palminha > --- > drivers/parport/ieee1284.c | 212 ++++++++++++------------ > drivers/parport/ieee1284_ops.c | 338 +++++++++++++++++++-------------------- > drivers/parport/parport_atari.c | 4 +- > drivers/parport/parport_gsc.c | 62 +++---- > drivers/parport/parport_mfc3.c | 2 +- > drivers/parport/parport_serial.c | 52 +++--- > drivers/parport/parport_sunbpp.c | 6 +- > drivers/parport/probe.c | 42 ++--- > drivers/parport/procfs.c | 22 +-- > 9 files changed, 370 insertions(+), 370 deletions(-) > > diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c > index b40ee76d519d..27673b838e74 100644 > --- a/drivers/parport/ieee1284.c > +++ b/drivers/parport/ieee1284.c > @@ -32,22 +32,22 @@ > #endif > > #ifdef DEBUG > -#define DPRINTK(stuff...) printk (stuff) > +#define DPRINTK(stuff...) printk(stuff) > #else > #define DPRINTK(stuff...) > #endif > > /* Make parport_wait_peripheral wake up. > * It will be useful to call this from an interrupt handler. */ > -static void parport_ieee1284_wakeup (struct parport *port) > +static void parport_ieee1284_wakeup(struct parport *port) > { > - up (&port->physport->ieee1284.irq); > + up(&port->physport->ieee1284.irq); > } > > static struct parport *port_from_cookie[PARPORT_MAX]; > -static void timeout_waiting_on_port (unsigned long cookie) > +static void timeout_waiting_on_port(unsigned long cookie) > { > - parport_ieee1284_wakeup (port_from_cookie[cookie % PARPORT_MAX]); > + parport_ieee1284_wakeup(port_from_cookie[cookie % PARPORT_MAX]); > } > > /** > @@ -66,7 +66,7 @@ static void timeout_waiting_on_port (unsigned long cookie) > * what it's doing as soon as it can. > */ > > -int parport_wait_event (struct parport *port, signed long timeout) > +int parport_wait_event(struct parport *port, signed long timeout) > { > int ret; > struct timer_list timer; > @@ -82,8 +82,8 @@ int parport_wait_event (struct parport *port, signed long timeout) > port_from_cookie[port->number % PARPORT_MAX] = port; > timer.data = port->number; > > - add_timer (&timer); > - ret = down_interruptible (&port->physport->ieee1284.irq); > + add_timer(&timer); > + ret = down_interruptible(&port->physport->ieee1284.irq); > if (!del_timer_sync(&timer) && !ret) > /* Timed out. */ > ret = 1; > @@ -127,15 +127,15 @@ int parport_poll_peripheral(struct parport *port, > int i; > unsigned char status; > for (i = 0; i < count; i++) { > - status = parport_read_status (port); > + status = parport_read_status(port); > if ((status & mask) == result) > return 0; > - if (signal_pending (current)) > + if (signal_pending(current)) > return -EINTR; > if (need_resched()) > break; > if (i >= 2) > - udelay (5); > + udelay(5); > } > > return 1; > @@ -187,7 +187,7 @@ int parport_wait_peripheral(struct parport *port, > * How about making a note (in the device structure) of how long > * it takes, so we know for next time? > */ > - ret = parport_poll_peripheral (port, mask, result, usec); > + ret = parport_poll_peripheral(port, mask, result, usec); > if (ret != 1) > return ret; > > @@ -198,16 +198,16 @@ int parport_wait_peripheral(struct parport *port, > > /* 40ms of slow polling. */ > deadline = jiffies + msecs_to_jiffies(40); > - while (time_before (jiffies, deadline)) { > - if (signal_pending (current)) > + while (time_before(jiffies, deadline)) { > + if (signal_pending(current)) > return -EINTR; > > /* Wait for 10ms (or until an interrupt occurs if > * the handler is set) */ > - if ((ret = parport_wait_event (port, msecs_to_jiffies(10))) < 0) > + if ((ret = parport_wait_event(port, msecs_to_jiffies(10))) < 0) > return ret; > > - status = parport_read_status (port); > + status = parport_read_status(port); > if ((status & mask) == result) > return 0; > > @@ -224,7 +224,7 @@ int parport_wait_peripheral(struct parport *port, > > #ifdef CONFIG_PARPORT_1284 > /* Terminate a negotiated mode. */ > -static void parport_ieee1284_terminate (struct parport *port) > +static void parport_ieee1284_terminate(struct parport *port) > { > int r; > port = port->physport; > @@ -237,11 +237,11 @@ static void parport_ieee1284_terminate (struct parport *port) > /* Terminate from EPP mode. */ > > /* Event 68: Set nInit low */ > - parport_frob_control (port, PARPORT_CONTROL_INIT, 0); > - udelay (50); > + parport_frob_control(port, PARPORT_CONTROL_INIT, 0); > + udelay(50); > > /* Event 69: Set nInit high, nSelectIn low */ > - parport_frob_control (port, > + parport_frob_control(port, > PARPORT_CONTROL_SELECT > | PARPORT_CONTROL_INIT, > PARPORT_CONTROL_SELECT Now, the alignment is lost and a new checkpatch error is introduced. -- Regards Sudip