pr_debug
From: Alexander Kapshuk <hidden>
Date: 2017-03-15 10:55:17
On Wed, Mar 15, 2017 at 12:40 PM, Tobin C. Harding [off-list ref] wrote:
On Wed, Mar 15, 2017 at 12:01:39PM +0200, Alexander Kapshuk wrote: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)); What can we do about this? thanks, Tobin. _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbiesWhat is the version of the sources you are using?I'm usually working of gregKH's staging tree using branch staging-next and/or staging-testing thanks, Tobin.
'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)) The 'func' parameter passed into 'sdio_func_id()' is a pointer to 'struct device dev', which is a member of 'struct sdio_func' 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 Based on my understanding of the error message you got, the error must lie in code that initialises 'func' to a field name of a struct that isn't known at compile time. At this stage, I'm not sure how to identify the code where the faulty initialisation takes place.