Re: [2.6 patch] fix a drivers/char/isicom.c compile warning

From: Arnaldo Carvalho de Melo (acme_at_conectiva.com.br)
Date: 01/13/04

  • Next message: Alex Williamson: "[PATCH] 2.4/2.6 use xdsdt to print table header"
    Date:	Mon, 12 Jan 2004 22:38:28 -0200
    To: Adrian Bunk <bunk@fs.tum.de>
    
    

    Em Tue, Jan 13, 2004 at 01:23:18AM +0100, Adrian Bunk escreveu:
    > On Mon, Jan 12, 2004 at 10:17:46PM -0200, Arnaldo Carvalho de Melo wrote:
    > > Em Tue, Jan 13, 2004 at 01:00:56AM +0100, Adrian Bunk escreveu:
    > >...
    > > > The following patch fixes this issue:
    > > >
    > > >
    > > > --- linux-2.6.1-mm2-modular-no-smp/drivers/char/isicom.c.old 2004-01-13 00:40:02.000000000 +0100
    > > > +++ linux-2.6.1-mm2-modular-no-smp/drivers/char/isicom.c 2004-01-13 00:49:00.000000000 +0100
    > > > @@ -1675,7 +1675,7 @@
    > > > static void unregister_drivers(void)
    > > > {
    > > > int error;
    > > > - if (tty_unregister_driver(isicom_normal))
    > > > + if ((error=tty_unregister_driver(isicom_normal)))
    > > > printk(KERN_DEBUG "ISICOM: couldn't unregister normal driver error=%d.\n",error);
    > >
    > > OK, the patch is right, but couldn't we take the opportunity to make this
    > > more readable while at it? Ssomething like:
    > >
    > > static void unregister_drivers(void)
    > > {
    > > int error = tty_unregister_driver(isicom_normal);
    > >
    > > if (error)
    > > printk(KERN_DEBUG "ISICOM: couldn't unregister normal "
    > > "driver error=%d.\n", error);
    > >
    > > ? :-)
    >
    > I thought about it, but I wasn't sure whether changing a driver to be
    > more readable in _one_ place and making the code there different from
    > the coding style used in the rest of the driver is really an
    > improvement (and no, I don't want to clean the whole driver...)?

    Humm, IMHO it is better to get it with mixed style as long as the changes that
    "break" the style are for the correct style, but this, of course, for purely
    unmaintained stuff, like... isicom.c :-) For maintained stuff it becomes a
    pain in the ass for the maintainer, that should try to follow CodingStyle, but
    as we know, not always do.
     
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Alex Williamson: "[PATCH] 2.4/2.6 use xdsdt to print table header"

    Relevant Pages

    • Re: Summarizing the PWC driver questions/answers
      ... GPL-part of driver. ... Even if the former maintainer does not like it. ... > I am just asking for you guys to not DESTROY what is already there without ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH][2.6] MAINTAINERS, CREDITS, ioctl-number.txt updates
      ... - add the LinuxTV.org project as the DVB driver maintainer ... +SAA7146 VIDEO4LINUX-2 DRIVER ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch 143/198] update maintainer for /dev/random
      ... Ted has agreed to let me take over as maintainer of /dev/random and ... Author of loopback device driver ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] sis5513 fix for SiS962 chipset
      ... > better handled by someone with a broader view of IDE chipsets than me. ... This way the subsystem maintainer doesn't have to worry about ... every fscking driver ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: share/private/slave a subtree - define vs enum
      ... > - Bad coding style ... Although it also differs between core and driver code, ... The requirements for core kernel code are higher, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)