Thread (8 messages) 8 messages, 3 authors, 2017-03-16
  • pr_debug · Tobin C. Harding <hidden> · 2017-03-15
  • pr_debug · Alexander Kapshuk <hidden> · 2017-03-15
  • pr_debug · Tobin C. Harding <hidden> · 2017-03-15
  • pr_debug · Alexander Kapshuk <hidden> · 2017-03-15
  • pr_debug · bjorn@mork.no (Bjørn Mork) · 2017-03-15
  • pr_debug · Tobin C. Harding <hidden> · 2017-03-15
  • pr_debug · Alexander Kapshuk <hidden> · 2017-03-16
  • pr_debug · Tobin C. Harding <hidden> · 2017-03-16

pr_debug

From: bjorn@mork.no (Bjørn Mork)
Date: 2017-03-15 11:12:48

Alexander Kapshuk [off-list ref] writes:
quoted
quoted
On Wed, Mar 15, 2017 at 10:31 AM, Tobin C. Harding [off-list ref] wrote:
quoted
why does calling pr_debug() with more than one argument cause a sparse
warning?

drivers/mmc/core/sdio_io.c:70:9: error: unknown field name in initializer

sdio_io.c:70:
pr_debug("SDIO: Enabling device %s...\n", sdio_func_id(func));
..
'sdio_func_id()' is a macro defined here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/linux/mmc/sdio_func.h?id=refs/tags/v4.11-rc2
#define sdio_func_id(f) (dev_name(&(f)->dev))

So the "func" in that debug call contains a 'struct device'.  Any
reason why the pr_debug() shouldn't be converted to something like

 dev_dbg(&func->dev, "SDIO: Enabling device...\n");

?



Bj?rn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help