aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorBrendan Higgins <[email protected]>2019-09-23 02:02:49 -0700
committerShuah Khan <[email protected]>2019-09-30 17:35:01 -0600
commit741a98d022362c90609ac9dcd8ad56314d8e68b3 (patch)
tree0d61b6e486c6871a8945c148e9624a6caf742bae /scripts/gdb/linux/utils.py
parent88aecb096c4142d18ec3929fa56dd0ac886e3b4c (diff)
kunit: fix failure to build without printk
Previously KUnit assumed that printk would always be present, which is not a valid assumption to make. Fix that by removing call to vprintk_emit, and calling printk directly. This fixes a build error[1] reported by Randy. For context this change comes after much discussion. My first stab[2] at this was just to make the KUnit logging code compile out; however, it was agreed that if we were going to use vprintk_emit, then vprintk_emit should provide a no-op stub, which lead to my second attempt[3]. In response to me trying to stub out vprintk_emit, Sergey Senozhatsky suggested a way for me to remove our usage of vprintk_emit, which led to my third attempt at solving this[4]. In my third version of this patch[4], I completely removed vprintk_emit, as suggested by Sergey; however, there was a bit of debate over whether Sergey's solution was the best. The debate arose due to Sergey's version resulting in a checkpatch warning, which resulted in a debate over correct printk usage. Joe Perches offered an alternative fix which was somewhat less far reaching than what Sergey had suggested and importantly relied on continuing to use %pV. Much of the debated centered around whether %pV should be widely used, and whether Sergey's version would result in object size bloat. Ultimately, we decided to go with Sergey's version. Reported-by: Randy Dunlap <[email protected]> Link[1]: https://lore.kernel.org/linux-kselftest/[email protected]/ Link[2]: https://lore.kernel.org/linux-kselftest/[email protected]/ Link[3]: https://lore.kernel.org/linux-kselftest/[email protected]/ Link[4]: https://lore.kernel.org/linux-kselftest/[email protected]/ Cc: Stephen Rothwell <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Joe Perches <[email protected]> Cc: [email protected] Signed-off-by: Brendan Higgins <[email protected]> Acked-by: Randy Dunlap <[email protected]> # build-tested Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions