tree: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/topic/i2c-core-dma head: 0780b6c3d3e6079635cfbae3386a1e196da78925 commit: 1c1c267db610df292d9f1c6fe1c447bb81f25f49 [17/20] i2c: add helpers to ease DMA handling config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout 1c1c267db610df292d9f1c6fe1c447bb81f25f49 # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:329:0, from include/linux/kernel.h:13, from include/linux/delay.h:21, from drivers/staging/media/atomisp/i2c/imx/dw9718.c:22: include/linux/i2c.h: In function 'i2c_check_msg_for_dma': include/linux/dynamic_debug.h:76:14: error: 'KBUILD_MODNAME' undeclared (first use in this function) .modname = KBUILD_MODNAME, \ ^ include/linux/dynamic_debug.h:98:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY' DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:124:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA' DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug' dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ >> include/linux/i2c.h:797:3: note: in expansion of macro 'pr_debug' pr_debug("msg buffer to 0x%04x is not DMA safe%s\n", msg->addr, ^~~~~~~~ include/linux/dynamic_debug.h:76:14: note: each undeclared identifier is reported only once for each function it appears in .modname = KBUILD_MODNAME, \ ^ include/linux/dynamic_debug.h:98:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY' DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:124:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA' DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug' dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ >> include/linux/i2c.h:797:3: note: in expansion of macro 'pr_debug' pr_debug("msg buffer to 0x%04x is not DMA safe%s\n", msg->addr, ^~~~~~~~ vim +/pr_debug +797 include/linux/i2c.h 781 * -ENOMEM if a bounce buffer could not be created 782 * 0 if message is suitable for DMA 783 * 784 * Note: This function should only be called from process context! It uses 785 * helper functions which work on the 'current' task. 786 */ 787 static inline int i2c_check_msg_for_dma(struct i2c_msg *msg, unsigned int threshold, 788 u8 **ptr_for_bounce_buf) 789 { 790 if (ptr_for_bounce_buf) 791 *ptr_for_bounce_buf = NULL; 792 793 if (msg->len < threshold) 794 return -ERANGE; 795 796 if (!virt_addr_valid(msg->buf) || object_is_on_stack(msg->buf)) { > 797 pr_debug("msg buffer to 0x%04x is not DMA safe%s\n", msg->addr, 798 ptr_for_bounce_buf ? ", trying bounce buffer" : ""); 799 if (ptr_for_bounce_buf) { 800 if (msg->flags & I2C_M_RD) 801 *ptr_for_bounce_buf = kzalloc(msg->len, GFP_KERNEL); 802 else 803 *ptr_for_bounce_buf = kmemdup(msg->buf, msg->len, 804 GFP_KERNEL); 805 if (!*ptr_for_bounce_buf) --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip