exfat: Expand exfat_err() and co directly to pr_*() macro
authorTakashi Iwai <tiwai@suse.de>
Tue, 26 Jul 2022 08:39:27 +0000 (10:39 +0200)
committerNamjae Jeon <linkinjeon@kernel.org>
Mon, 1 Aug 2022 01:14:07 +0000 (10:14 +0900)
commit6425baabda21748daacc2141169e07e4c2644497
treeddb90b5b4220464af622fe252742f799a69ac19f
parent1b1a9195ae962fefd8d0785e0af434de1a3447fd
exfat: Expand exfat_err() and co directly to pr_*() macro

Currently the error and info messages handled by exfat_err() and co
are tossed to exfat_msg() function that does nothing but passes the
strings with printk() invocation.  Not only that this is more overhead
by the indirect calls, but also this makes harder to extend for the
debug print usage; because of the direct printk() call, you cannot
make it for dynamic debug or without debug like the standard helpers
such as pr_debug() or dev_dbg().

For addressing the problem, this patch replaces exfat_*() macro to
expand to pr_*() directly.  Along with it, add the new exfat_debug()
macro that is expanded to pr_debug() (which output can be gracefully
suppressed via dyndbg).

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/exfat_fs.h
fs/exfat/misc.c