Re: [PATCH] Signed-off-by: Richa Jha <richa.jha2@xxxxxxxxx>

From: Arnd Bergmann
Date: Wed May 17 2017 - 08:02:36 EST


On Wed, May 17, 2017 at 12:12 PM, Richa Jha <richa.jha2@xxxxxxxxx> wrote:
> From short to string conversion
> ---

Hi Richa,

Sorry, but we can't take that patch:

- The patch description doesn't explain what the patch is good for,
only what it does.

> @@ -326,7 +327,9 @@ static int efi_rtc_proc_show(struct seq_file *m, void *v)
> seq_puts(m, "Timezone : unspecified\n");
> else
> /* XXX fixme: convert to string? */
> - seq_printf(m, "Timezone : %u\n", eft.timezone);
> + for(i= eft.timezone,c=0; i>0 ;c++,i=i/10)
> + str_timezone[c] = i%10 - 48
> + seq_puts(m, str_timezone);

- It won't compile.

- It seems to change an established ABI in an incompatible way

- My guess is that you are trying to address the 'fixme' comment, but this
doesn't seem to do what the comment is about, and you leave the
fixme in place. 'fixme' comments tend to be for things that the original
author could not figure out initially because they are hard, so they
are not a good place to start.

- the coding style is wrong

- you appear to re-implement parts of what sprintf does in a less
portable way.

- You are probably trying to just learn about kernel hacking. This
is good, but drivers/char/efirtc.c is a particularly bad place to start.
The driver is completely obsolete (replaced by drivers/rtc/rtc-efi.c)
and there is no maintainer for it.

https://kernelnewbies.org/Outreachyfirstpatch has a good overview
of how to start.

Arnd