device: Add #define dev_fmt similar to #define pr_fmt
authorJoe Perches <joe@perches.com>
Wed, 9 May 2018 15:15:46 +0000 (08:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2018 15:50:19 +0000 (17:50 +0200)
commit663336ee2628096df0ce2b546b148cb74b5249fe
tree4a41f75c8ba149245c813d12786db6d0a3683f4a
parent0a50f61c4fbd7840cdaf783c312e42b8ccde9ab3
device: Add #define dev_fmt similar to #define pr_fmt

Add a prefixing macro to dev_<level> uses similar to the pr_fmt
prefixing macro used in pr_<level> calls.

This can help avoid some string duplication in dev_<level> uses.

The default, like pr_fmt, is an empty #define dev_fmt(fmt) fmt

Rename the existing dev_<level> functions to _dev_<level> and
introduce #define dev_<level> _dev_<level> macros that use the
new #define dev_fmt

Miscellanea:

o Consistently use #defines with fmt, ... and ##__VA_ARGS__
o Remove unnecessary externs

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c
include/linux/device.h