)]}' { "commit": "51c6f44d725df3973490dd11c6433289507853b0", "tree": "fd457e5980c54990c217bb5a2fd693cd1047a640", "parents": [ "7b880124eb36327fb95ca2847ce661f494b7e006" ], "author": { "name": "Brendan Higgins", "email": "brendanhiggins@google.com", "time": "Tue Sep 03 17:00:56 2019 -0700" }, "committer": { "name": "Brendan Higgins", "email": "brendanhiggins@google.com", "time": "Fri Sep 20 17:05:56 2019 -0700" }, "message": "kunit: fix failure to build without printk\n\nPreviously KUnit assumed that printk would always be present, which is\nnot a valid assumption to make. Fix that by removing call to\nvprintk_emit, and calling printk directly.\n\nThis fixes a build error[1] reported by Randy.\n\nFor context this change comes after much discussion. My first stab[2] at\nthis was just to make the KUnit logging code compile out; however, it\nwas agreed that if we were going to use vprintk_emit, then vprintk_emit\nshould provide a no-op stub, which lead to my second attempt[3]. In\nresponse to me trying to stub out vprintk_emit, Sergey Senozhatsky\nsuggested a way for me to remove our usage of vprintk_emit, which led to\nmy third attempt at solving this[4].\n\nIn my third version of this patch[4], I completely removed vprintk_emit,\nas suggested by Sergey; however, there was a bit of debate over whether\nSergey\u0027s solution was the best. The debate arose due to Sergey\u0027s version\nresulting in a checkpatch warning, which resulted in a debate over\ncorrect printk usage. Joe Perches offered an alternative fix which was\nsomewhat less far reaching than what Sergey had suggested and\nimportantly relied on continuing to use %pV. Much of the debated\ncentered around whether %pV should be widely used, and whether Sergey\u0027s\nversion would result in object size bloat. Ultimately, we decided to go\nwith Sergey\u0027s version.\n\nReported-by: Randy Dunlap \u003crdunlap@infradead.org\u003e\nLink[1]: https://lore.kernel.org/linux-kselftest/c7229254-0d90-d90e-f3df-5b6d6fc0b51f@infradead.org/\nLink[2]: https://lore.kernel.org/linux-kselftest/20190827174932.44177-1-brendanhiggins@google.com/\nLink[3]: https://lore.kernel.org/linux-kselftest/20190827234835.234473-1-brendanhiggins@google.com/\nLink[4]: https://lore.kernel.org/linux-kselftest/20190828093143.163302-1-brendanhiggins@google.com/\nCc: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nCc: Sergey Senozhatsky \u003csergey.senozhatsky.work@gmail.com\u003e\nCc: Joe Perches \u003cjoe@perches.com\u003e\nCc: Tim.Bird@sony.com\nSigned-off-by: Brendan Higgins \u003cbrendanhiggins@google.com\u003e\nAcked-by: Randy Dunlap \u003crdunlap@infradead.org\u003e # build-tested\nReviewed-by: Petr Mladek \u003cpmladek@suse.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "8b7eb03d4971b892f572463cf7c1aa963770cbd6", "old_mode": 33188, "old_path": "include/kunit/test.h", "new_id": "dba48304b3bd3489984d0a2b4263d830ed9dfb6f", "new_mode": 33188, "new_path": "include/kunit/test.h" }, { "type": "modify", "old_id": "b2ca9b94c35304e2cadb5a4b04bc03b06c912286", "old_mode": 33188, "old_path": "lib/kunit/test.c", "new_id": "c83c0fa59cbd7fdb351aeb167523060eea9e988e", "new_mode": 33188, "new_path": "lib/kunit/test.c" } ] }