public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com,
	andi@firstfloor.org, arjan@infradead.org, ebiederm@xmission.com,
	greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: usb debug port early console
Date: Wed, 23 Jul 2008 13:36:01 -0700	[thread overview]
Message-ID: <20080723133601.5a7bc494.akpm@linux-foundation.org> (raw)
In-Reply-To: <86802c440807231318h76ec9465td0c179668cfe4473@mail.gmail.com>

On Wed, 23 Jul 2008 13:18:12 -0700
"Yinghai Lu" <yhlu.kernel@gmail.com> wrote:

> > Please always pass all patches through scripts/checkpatch.pl.

What I meant was to use checkpatch and then to actually read its
output ;)

> yhlu@linux-zpir:~/xx/xx/kernel/tip/linux-2.6> ./scripts/checkpatch.pl
> patches/9xxx.patch
> WARNING: line over 80 characters
> #319: FILE: arch/x86/kernel/early_printk.c:420:
> +       if (!(read_pci_config_16(num, slot, func, PCI_STATUS) &
> PCI_STATUS_CAP_LIST))
> 
> WARNING: line over 80 characters
> #330: FILE: arch/x86/kernel/early_printk.c:431:
> +               pos = read_pci_config_byte(num, slot, func,
> pos+PCI_CAP_LIST_NEXT);
> 
> WARNING: line over 80 characters
> #335: FILE: arch/x86/kernel/early_printk.c:436:
> +static __u32 __init find_dbgp(int ehci_num, unsigned *rbus, unsigned
> *rslot, unsigned *rfunc)
> 
> WARNING: line over 80 characters
> #344: FILE: arch/x86/kernel/early_printk.c:445:
> +                               class = read_pci_config(bus, slot,
> func, PCI_CLASS_REVISION);
> 
> WARNING: line over 80 characters
> #347: FILE: arch/x86/kernel/early_printk.c:448:
> +                               cap = find_cap(bus, slot, func,
> PCI_CAP_ID_EHCI_DEBUG);
> 
> WARNING: line over 80 characters
> #386: FILE: arch/x86/kernel/early_printk.c:487:
> +                               portsc =
> readl(&ehci_regs->port_status[port - 1]);

I don't think the 80-col warnigns should necessarily all be fixed.  But
one should take a look at the code and ask "did I really need to do it
that way?".

> WARNING: externs should be avoided in .c files
> #425: FILE: arch/x86/kernel/early_printk.c:526:
> +void early_printk(const char *fmt, ...);

This one is a must-fix.

> WARNING: consider using strict_strtoul in preference to simple_strtoul
> #518: FILE: arch/x86/kernel/early_printk.c:619:
> +               dbgp_num = simple_strtoul(s, &e, 10);

simple_strtoul() is sometimes OK for kernel parameters, sometimes
strict_strtoul() is better.

> WARNING: externs should be avoided in .c files
> #722: FILE: arch/x86/kernel/head64.c:75:
> +extern void __init enable_debug_console(char *buf);

This one also should be fixed.


  reply	other threads:[~2008-07-23 20:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 19:52 [PATCH] x86: usb debug port early console Yinghai Lu
2008-07-23 20:12 ` Andrew Morton
2008-07-23 20:18   ` Yinghai Lu
2008-07-23 20:36     ` Andrew Morton [this message]
2008-07-24  2:56   ` Eric W. Biederman
2008-07-24  3:13     ` H. Peter Anvin
2008-07-23 21:00 ` [PATCH] x86: usb debug port early console v2 Yinghai Lu
2008-07-23 22:45   ` Greg KH
2008-07-23 22:54     ` Yinghai Lu
2008-07-23 23:21       ` Greg KH
2008-07-23 23:46         ` Yinghai Lu
2008-07-24  0:06           ` Greg KH
2008-07-24  0:39   ` [PATCH] x86: usb debug port early console v3 Yinghai Lu
2008-07-24 11:14     ` Ingo Molnar
2008-07-25  0:27     ` [PATCH] usb: move ehci reg def Yinghai Lu
2008-07-25  0:57       ` David Brownell
2008-07-25  2:14         ` Yinghai Lu
2008-07-26 14:18           ` Ingo Molnar
2008-07-28 15:40             ` Greg KH
2008-07-28 16:11               ` Ingo Molnar
2008-07-28 16:47                 ` Greg KH
2008-07-28 18:47                   ` David Brownell
2008-07-25  0:29     ` [PATCH] x86: usb debug port early console v4 Yinghai Lu
2008-07-26 13:48       ` Ingo Molnar
2008-07-26 15:38         ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080723133601.5a7bc494.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox