lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch]fastboot: remove duplicate unpack_to_rootfs()

* Ingo Molnar <mingo@elte.hu> wrote:

> the dry_run variable is now unused in unpack_to_rootfs() and could be
> eliminated.

also, while we are materially touching init/initramfs.c, that file has
collected a few uglies in the past few years, checkpatch --file says:

total: 7 errors, 7 warnings, 3 checks, 562 lines checked

it has a few other problems as well that can be seen if you look at the
file. Unused macros:

/* Diagnostic functions (stubbed out) */
#define Assert(cond,msg)
#define Trace(x)
#define Tracev(x)
#define Tracevv(x)
#define Tracec(c,x)
#define Tracecv(c,x)

#define STATIC static
#define INIT __init

lots of no-newline-after-variable-definitions instances:

{
int written;
dry_run = check_only;

no-newline-before-return:

kfree(header_buf);
return message;
}

so it would be nice to start off with a cleanup [strictly no code
changed] patch.

then it also has an absolutely crazy turn-error-printouts-off hack:

static __initdata char *message;
static void __init error(char *x)
{
if (!message)
message = x;
}

which is unobvious, 100% unused and should be removed.

those error()s should be pr_debug() perhaps. [this should be a second
cleanup patch as it changes the code]

Hm?

Ingo


\
 
 \ /
  Last update: 2008-08-13 09:55    [W:0.084 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site