Re: [PATCH v2] power: new trace event to print device suspend andresume time

From: Shuah Khan
Date: Wed Jul 17 2013 - 13:10:20 EST


On 07/17/2013 10:41 AM, Joe Perches wrote:

> I think the easiest way to "fix" it is to change
> the TP_printk format to:
>
> TP_printk("%s %s parent=%s state=%s ops=%susecs=%lld err=%d",

I will just adjust for the space and add a comment.

>
>> Hence, I chose to leave the extra space in. I also
>> didn't want to propagate that assumption that there is an extra space
>> into this new tracepoint.
>
> It's a big deal, it just seemed untidy.
>
> There are a couple of places in drivers/base/power/main.c
> where info is set to NULL. I didn't look hard to see if
> any of those are propagated through to this point, but
> there are uses of 'info ?: ""' for some of the logging
> messages. That _might_ an issue.
>
> It looks like all the other logging message uses of info
> have "%s%s" so that proper word spacing is done when
> info is "" or NULL.
>

Yeah that would be bad. The safe thing might me to add a info null
check. Working on v3 that includes Steve's review comment as well.

thanks,
-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research
America (Silicon Valley) shuah.kh@xxxxxxxxxxx | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/