* [PATCH 0/2] fujitsu-laptop: Debugging cleanup
[not found] <20160616234630.GB4764@marvin.atrad.com.au>
@ 2016-06-23 10:02 ` Michał Kępień
2016-06-23 10:02 ` [PATCH 1/2] fujitsu-laptop: Use module name in debug messages Michał Kępień
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Michał Kępień @ 2016-06-23 10:02 UTC (permalink / raw)
To: Jonathan Woithe, Darren Hart
Cc: Jan-Marek Glogowski, platform-driver-x86, linux-kernel
Jonathan,
> > BTW: the debug message is a little misleading, as all of them are prefixed
> > 'FUJ02B1', even if the ACPI event is handled by the FUJ02E3 device.
>
> Yes, good point. The use of "FUJ02B1" (via ACPI_FUJITSU_HID) would have
> been for convenience and possibly dates from before FUJ02E3 support was
> included in the driver. A case can certainly be made for a more generic
> descriptor.
vdbg_printk() was introduced by 20b9373, which is the same commit that
adds FUJ02E3 support, so it has been the way it is now from the start.
This patch series attempts to tidy things up a bit.
drivers/platform/x86/fujitsu-laptop.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] fujitsu-laptop: Use module name in debug messages
2016-06-23 10:02 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Michał Kępień
@ 2016-06-23 10:02 ` Michał Kępień
2016-06-23 10:02 ` [PATCH 2/2] fujitsu-laptop: Remove unused macros Michał Kępień
2016-06-23 10:35 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Jonathan Woithe
2 siblings, 0 replies; 5+ messages in thread
From: Michał Kępień @ 2016-06-23 10:02 UTC (permalink / raw)
To: Jonathan Woithe, Darren Hart
Cc: Jan-Marek Glogowski, platform-driver-x86, linux-kernel
vdbg_printk() always prefixes the log messages it generates with
"FUJ02B1", which can be misleading, because it might have been called
while handling a notify for ACPI device FUJ02E3 or during module
initialization etc. Employ pr_fmt() to prefix debug messages with the
module name instead and thus avoid confusion.
Reported-by: Jan-Marek Glogowski <glogow@fbihome.de>
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
---
drivers/platform/x86/fujitsu-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index ce41bc3..04e633d 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -136,7 +136,7 @@
#ifdef CONFIG_FUJITSU_LAPTOP_DEBUG
#define vdbg_printk(a_dbg_level, format, arg...) \
do { if (dbg_level & a_dbg_level) \
- printk(FUJLAPTOP_DEBUG "%s: " format, __func__ , ## arg); \
+ printk(KERN_DEBUG pr_fmt("%s: " format), __func__, ## arg); \
} while (0)
#else
#define vdbg_printk(a_dbg_level, format, arg...) \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] fujitsu-laptop: Remove unused macros
2016-06-23 10:02 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Michał Kępień
2016-06-23 10:02 ` [PATCH 1/2] fujitsu-laptop: Use module name in debug messages Michał Kępień
@ 2016-06-23 10:02 ` Michał Kępień
2016-06-23 10:35 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Jonathan Woithe
2 siblings, 0 replies; 5+ messages in thread
From: Michał Kępień @ 2016-06-23 10:02 UTC (permalink / raw)
To: Jonathan Woithe, Darren Hart
Cc: Jan-Marek Glogowski, platform-driver-x86, linux-kernel
FUJLAPTOP_* macros were introduced by 20b9373, but have never been used
except FUJLAPTOP_DEBUG, which was made redundant by the previous patch.
ACPI_VIDEO_NOTIFY_* macros were also introduced by 20b9373, but they
have not been needed since 1696d9d.
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
---
drivers/platform/x86/fujitsu-laptop.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 04e633d..7a345f9 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -88,9 +88,6 @@
#define ACPI_FUJITSU_NOTIFY_CODE1 0x80
-#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x86
-#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x87
-
/* FUNC interface - command values */
#define FUNC_RFKILL 0x1000
#define FUNC_LEDS 0x1001
@@ -121,13 +118,6 @@
#define RINGBUFFERSIZE 40
/* Debugging */
-#define FUJLAPTOP_LOG ACPI_FUJITSU_HID ": "
-#define FUJLAPTOP_ERR KERN_ERR FUJLAPTOP_LOG
-#define FUJLAPTOP_NOTICE KERN_NOTICE FUJLAPTOP_LOG
-#define FUJLAPTOP_INFO KERN_INFO FUJLAPTOP_LOG
-#define FUJLAPTOP_DEBUG KERN_DEBUG FUJLAPTOP_LOG
-
-#define FUJLAPTOP_DBG_ALL 0xffff
#define FUJLAPTOP_DBG_ERROR 0x0001
#define FUJLAPTOP_DBG_WARN 0x0002
#define FUJLAPTOP_DBG_INFO 0x0004
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] fujitsu-laptop: Debugging cleanup
2016-06-23 10:02 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Michał Kępień
2016-06-23 10:02 ` [PATCH 1/2] fujitsu-laptop: Use module name in debug messages Michał Kępień
2016-06-23 10:02 ` [PATCH 2/2] fujitsu-laptop: Remove unused macros Michał Kępień
@ 2016-06-23 10:35 ` Jonathan Woithe
2016-06-28 17:49 ` Darren Hart
2 siblings, 1 reply; 5+ messages in thread
From: Jonathan Woithe @ 2016-06-23 10:35 UTC (permalink / raw)
To: Micha?? K??pie??
Cc: Darren Hart, Jan-Marek Glogowski, platform-driver-x86, linux-kernel
On Thu, Jun 23, 2016 at 12:02:46PM +0200, Micha?? K??pie?? wrote:
> vdbg_printk() was introduced by 20b9373, which is the same commit that
> adds FUJ02E3 support, so it has been the way it is now from the start.
> This patch series attempts to tidy things up a bit.
>
> drivers/platform/x86/fujitsu-laptop.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
Yes, good idea. Both patches look good to me. I would like to note in
passing that the removal of the unused defines in the second patch was in
fact suggested as part of a broader cleanup series by Alan Jenkins an
embarassingly long time ago. For various reasons I didn't get a chance to
review and apply his patch series at the time. It is my aim to rectify this
soon, but in the meantime this two patch series is good to go in. Thanks
for the submission.
Acked-by: Jonathan Woithe <jwoithe@just42.net>
Regards
jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] fujitsu-laptop: Debugging cleanup
2016-06-23 10:35 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Jonathan Woithe
@ 2016-06-28 17:49 ` Darren Hart
0 siblings, 0 replies; 5+ messages in thread
From: Darren Hart @ 2016-06-28 17:49 UTC (permalink / raw)
To: Jonathan Woithe
Cc: Micha?? K??pie??, Jan-Marek Glogowski, platform-driver-x86, linux-kernel
On Thu, Jun 23, 2016 at 08:05:35PM +0930, Jonathan Woithe wrote:
> On Thu, Jun 23, 2016 at 12:02:46PM +0200, Micha?? K??pie?? wrote:
> > vdbg_printk() was introduced by 20b9373, which is the same commit that
> > adds FUJ02E3 support, so it has been the way it is now from the start.
> > This patch series attempts to tidy things up a bit.
> >
> > drivers/platform/x86/fujitsu-laptop.c | 12 +-----------
> > 1 file changed, 1 insertion(+), 11 deletions(-)
>
> Yes, good idea. Both patches look good to me. I would like to note in
> passing that the removal of the unused defines in the second patch was in
> fact suggested as part of a broader cleanup series by Alan Jenkins an
> embarassingly long time ago. For various reasons I didn't get a chance to
> review and apply his patch series at the time. It is my aim to rectify this
> soon, but in the meantime this two patch series is good to go in. Thanks
> for the submission.
>
> Acked-by: Jonathan Woithe <jwoithe@just42.net>
Queued to testing for 4.8.
>
> Regards
> jonathan
>
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-28 17:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20160616234630.GB4764@marvin.atrad.com.au>
2016-06-23 10:02 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Michał Kępień
2016-06-23 10:02 ` [PATCH 1/2] fujitsu-laptop: Use module name in debug messages Michał Kępień
2016-06-23 10:02 ` [PATCH 2/2] fujitsu-laptop: Remove unused macros Michał Kępień
2016-06-23 10:35 ` [PATCH 0/2] fujitsu-laptop: Debugging cleanup Jonathan Woithe
2016-06-28 17:49 ` Darren Hart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).