lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Mar 2011 08:12:10 +0930 (CST)
From:	Jonathan Woithe <jwoithe@...sics.adelaide.edu.au>
To:	joe@...ches.com (Joe Perches)
Cc:	mjg@...hat.com (Matthew Garrett),
	jwoithe@...sics.adelaide.edu.au (Jonathan Woithe),
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/23] fujitsu-laptop: Convert printks to pr_<level>

> Added pr_fmt, converted printks and removed hard coded prefixes.
> 
> Signed-off-by: Joe Perches <joe@...ches.com>

Acked-by: Jonathan Woithe <jwoithe@...sics.adelaide.edu.au>

But see comment below.

OOI, what does pr_*() give us over printk()?  I presume it makes it easier
to selectively remove certain printk levels from the kernel image in the
name of size reduction.

> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index 493054c..6b26666 100644
> --- a/drivers/platform/x86/fujitsu-laptop.c
> +++ b/drivers/platform/x86/fujitsu-laptop.c
> :
> @@ -907,8 +907,8 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
>  		if (result == 0) {
>  			fujitsu_hotkey->logolamp_registered = 1;
>  		} else {
> -			printk(KERN_ERR "fujitsu-laptop: Could not register "
> -			"LED handler for logo lamp, error %i\n", result);
> +			pr_err("Could not register LED handler for logo lamp, error %i\n",
> +			       result);
>  		}
>  	}
>  
> @@ -919,8 +919,8 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
>  		if (result == 0) {
>  			fujitsu_hotkey->kblamps_registered = 1;
>  		} else {
> -			printk(KERN_ERR "fujitsu-laptop: Could not register "
> -			"LED handler for keyboard lamps, error %i\n", result);
> +			pr_err("Could not register LED handler for keyboard lamps, error %i\n",
> +			       result);
>  		}
>  	}
>  #endif

Some people *may* insist that these long (>80 character) pr_err() lines be
split so they remain <80 in length.  This was the reason why the original
printk() call was split like it was.

Regards
  jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ