Re: [patch 3/2] drivers/char/vt.c: remove unnecessary code

From: Adrian Bunk (bunk_at_stusta.de)
Date: 02/28/05

  • Next message: Chris Wright: "Re: [PATCH] allow vma merging with mlock et. al."
    Date:	Mon, 28 Feb 2005 21:30:02 +0100
    To: "emmanuel.colbus@ensimag.imag.fr" <colbuse@ensisun.imag.fr>
    
    

    On Mon, Feb 28, 2005 at 06:29:39PM +0100, emmanuel.colbus@ensimag.imag.fr wrote:
    >
    >
    > On Mon, 28 Feb 2005, Stelian Pop wrote:
    >
    > > On Mon, Feb 28, 2005 at 04:06:14PM +0100, colbuse@ensisun.imag.fr wrote:
    > >
    > > > + /* Setting par[]'s elems at 0. */
    > > > + memset(par, 0, NPAR*sizeof(unsigned int));
    > >
    > > No need for the comment here, everybody understands C.
    >
    >
    > I knew this code would be understood, but I like comments :-) .
    >
    > Well, without it, it gives :
    >
    >
    >
    > --- old/drivers/char/vt.c 2004-12-24 22:35:25.000000000 +0100
    > +++ new/drivers/char/vt.c 2005-02-28 18:19:11.782717810 +0100
    > @@ -1655,8 +1655,8 @@
    > vc_state = ESnormal;
    > return;
    > case ESsquare:
    > - for(npar = 0 ; npar < NPAR ; npar++)
    > - par[npar] = 0;
    > + memset(par, 0, NPAR*sizeof(unsigned int));
    >...
    > Any other comments/remarks, or is _this_ patch version acceptable?

    - whitespace damage
    - your sizeof is extremely fragile
      why don't you run sizeof on the array?
    - please do any development against -mm
      you'll note that the code you are working against has significantely
      changed in -mm

    > Emmanuel Colbus

    cu
    Adrian

    -- 
           "Is there not promise of rain?" Ling Tan asked suddenly out
            of the darkness. There had been need of rain for many days.
           "Only a promise," Lao Er said.
                                           Pearl S. Buck - Dragon Seed
    -
    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: Chris Wright: "Re: [PATCH] allow vma merging with mlock et. al."

    Relevant Pages

    • Re: [2.6 patch] drivers/pnp/: possible cleanups
      ... modular code will use any of them, ... Modular ISAPnP might be interesting in some cases, ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: A users thoughts on the new dev. model
      ... >> when the stable tree wasn't. ... Andrew said explicitely in a mail to linux-kernel that he'd consider ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] let W1 select NET
      ... > selecting the required dependencies. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] drivers/acpi: remove unused exported functions
      ... > future patches, but sometimes Real Life gets in the way and the ... > programmer stalls development for some time, no problem, just ifdef it. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.12 Performance problems
      ... Linux has long had a philisophical ... debug your problem. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)