Re: [PATCH] printk: fix pr_debug and pr_devel to elide function calls
From: Joe Perches
Date: Thu Dec 03 2015 - 18:13:50 EST
On Thu, 2015-12-03 at 17:45 -0500, Aaron Conole wrote:
> Currently, pr_debug and pr_devel will not elide function call arguments
> appearing in calls to no_printk for these macros. This is because all
> side effects must be honored before proceeding to the 0-value assignment
> in no_printk.
>
> The behavior is contrary to documentation found in the CodingStyle and
> header file where these functions are declared.
>
> This patch corrects that behavior by shunting out the call to no_printk
> completely. The format string is still checked by gcc for correctness, but
> no code seems to be emitted in common cases.
>
> fixes commit 5264f2f75d86 ("include/linux/printk.h: use and neaten
> no_printk")
>
The same should/could probably be done for dev_dbg/dev_vdbg
and the netdev and netif variants.
--
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/