[U-Boot] [PATCH v2 8/8] dm: define dev_*() log functions in DM header

Masahiro Yamada yamada.masahiro at socionext.com
Tue Sep 26 03:00:28 UTC 2017


Hi Simon,


2017-09-25 11:15 GMT+09:00 Simon Glass <sjg at chromium.org>:
> On 15 September 2017 at 23:10, Masahiro Yamada
> <yamada.masahiro at socionext.com> wrote:
>> Many drivers use dev_err, dev_info, etc. for logging.  Currently,
>> we are relying on <linux/compat.h>, but I guess the best home is
>> <dm/device.h>, taking into account that Linux defines them in
>> <linux/device.h>.
>>
>> For now, I am keeping the ones in <linux/compat.h> because lots of
>> Linux-originated code uses dev_*() just for the purpose of syncing,
>> but the first argument is not struct udevice, so we need to ignore
>> it.  Once this issue is ironed out, it would be possible to prefix
>> log messages with a device name that emitted it, like Linux.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
>> ---
>>
>> Changes in v2:
>>   - newly added
>>
>>  include/dm/device.h    | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/compat.h | 17 ++++++++++++
>>  2 files changed, 89 insertions(+)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> But shouldn't it be emerg rather than emerge?
>

Good catch!

I just moved the macros from include/linux/compat.h
but it should be dev_emerg()

Currently, there is no user of this macro,
so it is better to rename it.


-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list