osdir.com
mailing list archive

Subject: Re: [Kernel-janitors] Coding style in the floppy driver. - msg#00191

List: linux.kernel.janitors

Date: Prev Next Index Thread: Prev Next Index
Em Sex, 2004-02-20 às 13:20, Randy.Dunlap escreveu:
> On Fri, 20 Feb 2004 09:15:57 -0300 Luiz Fernando Capitulino
> <lcapitulino@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> |
> | Hi all,
> |
> | I'm making some janitor work in the floppy driver, but the coding style
> | in it is not so good.
> |
> | So, I would like to know, if is good to make the first patch to fix
> | that.
>
> Probably so, but Al Viro is doing some work in that area also
> (de-uglification).
>
> I'm expecting to see that soon.

Well, I will do.

In the worst case I can compare my work with him and see what I
did wrong (or what could be better).

thanks,

--
Luiz Fernando N. Capitulino
<lcapitulino@xxxxxxxxxxxxxxxxxxxx>
<http://www.telecentros.sp.gov.br>


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: [Kernel-janitors] Coding style in the floppy driver.

On Fri, 20 Feb 2004 09:15:57 -0300 Luiz Fernando Capitulino <lcapitulino@xxxxxxxxxxxxxxxxxxxx> wrote: | | Hi all, | | I'm making some janitor work in the floppy driver, but the coding style | in it is not so good. | | So, I would like to know, if is good to make the first patch to fix | that. Probably so, but Al Viro is doing some work in that area also (de-uglification). I'm expecting to see that soon. -- ~Randy

Next Message by Date: click to view message preview

Re: [Kernel-janitors] [PATCH][RFC] - proc cleanup for drivers/char/genrtc.c.

Em Qui, 2004-02-19 às 19:26, Francois Romieu escreveu: > Luiz Fernando Capitulino <lcapitulino@xxxxxxxxxxxxxxxxxxxx> : > [...] > > @@ -501,12 +514,9 @@ > > if(retval < 0) > > return retval; > > > > -#ifdef CONFIG_PROC_FS > > - if((create_proc_read_entry ("driver/rtc", 0, 0, gen_rtc_read_proc, > > NULL)) == NULL){ > > - misc_deregister(&rtc_gen_dev); > > - return -ENOMEM; > > - } > > -#endif > > + retval = gen_rtc_proc_init(&rtc_gen_dev); > > + if(retval < 0) > > + return retval; > > You do not need to test retval: simply return it. A question, should I do: retval = gen_rtc_proc_init(); return retval Or return gen_rtc_proc_init(); ? I like the first one. -- Luiz Fernando N. Capitulino <lcapitulino@xxxxxxxxxxxxxxxxxxxx> <http://www.telecentros.sp.gov.br>

Previous Message by Thread: click to view message preview

Re: [Kernel-janitors] Coding style in the floppy driver.

On Fri, 20 Feb 2004 09:15:57 -0300 Luiz Fernando Capitulino <lcapitulino@xxxxxxxxxxxxxxxxxxxx> wrote: | | Hi all, | | I'm making some janitor work in the floppy driver, but the coding style | in it is not so good. | | So, I would like to know, if is good to make the first patch to fix | that. Probably so, but Al Viro is doing some work in that area also (de-uglification). I'm expecting to see that soon. -- ~Randy

Next Message by Thread: click to view message preview

[Kernel-janitors] [PATCH][REDIFF] - proc cleanup for drivers/char/genrtc.c.

Hi, This version have the Francois tip: diff -Nru linux-2.6.3/drivers/char/genrtc.c linux-2.6.3~/drivers/char/genrtc.c --- linux-2.6.3/drivers/char/genrtc.c 2004-02-05 08:42:27.000000000 -0200 +++ linux-2.6.3~/drivers/char/genrtc.c 2004-02-20 17:07:17.000000000 -0300 @@ -466,6 +466,19 @@ return len; } +static int __init gen_rtc_proc_init(struct miscdevice *dev) +{ + struct proc_dir_entry *r; + + r = create_proc_read_entry("driver/rtc", 0, 0, gen_rtc_read_proc, NULL); + if (!r) { + misc_deregister(dev); + return -ENOMEM; + } + return 0; +} +#else +static inline int gen_rtc_proc_init(struct miscdevice *dev) { return 0; } #endif /* CONFIG_PROC_FS */ @@ -501,14 +514,8 @@ if(retval < 0) return retval; -#ifdef CONFIG_PROC_FS - if((create_proc_read_entry ("driver/rtc", 0, 0, gen_rtc_read_proc, NULL)) == NULL){ - misc_deregister(&rtc_gen_dev); - return -ENOMEM; - } -#endif - - return 0; + retval = gen_rtc_proc_init(&rtc_gen_dev); + return retval; } static void __exit rtc_generic_exit(void) -- Luiz Fernando N. Capitulino <lcapitulino@xxxxxxxxxxxxxxxxxxxx> <http://www.telecentros.sp.gov.br>
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by