Re: [PATCH] init: Fix printk format strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 Oct 2007 08:17:02 +0200 Vegard Nossum wrote:

> This makes sure printk format strings are string literals containing no
> more than a single line.

Each patch needs justification (unless it is blatantly obvious).


> Signed-off-by: Vegard Nossum <[email protected]>
> ---
>  init/calibrate.c        |    4 +++-
>  init/do_mounts_initrd.c |    5 ++++-
>  init/main.c             |    2 +-
>  3 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
> index fd4fc12..ad6174c 100644
> --- a/init/do_mounts_initrd.c
> +++ b/init/do_mounts_initrd.c
> @@ -98,7 +98,10 @@ static void __init handle_initrd(void)
>  			error = sys_ioctl(fd, BLKFLSBUF, 0);
>  			sys_close(fd);
>  		}
> -		printk(!error ? "okay\n" : "failed\n");
> +		if(error)
> +			printk("failed\n");
> +		else
> +			printk("okay\n");
>  	}
>  }

Why this one?
and if it must change, use:
		if (error)
but I see little need for the change.

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux