lkml.org 
[lkml]   [2016]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 49/54] md/raid10: Replace printk() calls by the usage of higher level interfaces
From
Date
>> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
>> index 5119846..0f2cb20 100644
>> --- a/drivers/md/raid10.c
>> +++ b/drivers/md/raid10.c
>> @@ -18,6 +18,8 @@
>> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>> */
>>
>> +#define MY_LOG_PREFIX KBUILD_MODNAME ": "
>> +#define pr_fmt(fmt) MY_LOG_PREFIX fmt
>
> Please just use
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> like the more than thousand other uses in the kernel.

Thanks for your suggestion.

I got the impression that the omission of a macro like "MY_LOG_PREFIX"
would not really work for the suggested source code transformation so far.

How should a multiline log message be achieved as it was constructed
in the function "raid10_error" (for example)?
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/md/raid10.c?id=c802e87fbe2d4dd58982d01b3c39bc5a781223aa#n1589

Regards,
Markus

\
 
 \ /
  Last update: 2016-10-06 19:22    [W:0.786 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site