[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301060832.V0LzL1Hg-lkp@intel.com>
Date: Fri, 6 Jan 2023 09:13:35 +0800
From: kernel test robot <lkp@...el.com>
To: Siddh Raman Pant <code@...dh.me>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Simon Ser <contact@...rsion.fr>,
Jim Cromie <jim.cromie@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev,
linux-kernel <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH v4 01/10] drm/print: Fix and add support for NULL as
first argument in drm_* macros
Hi Siddh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master v6.2-rc2 next-20230105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Siddh-Raman-Pant/drm-print-Fix-and-add-support-for-NULL-as-first-argument-in-drm_-macros/20230106-062743
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/7acc7401b5ad0aec973948822bfa906a9615c43e.1672957022.git.code%40siddh.me
patch subject: [PATCH v4 01/10] drm/print: Fix and add support for NULL as first argument in drm_* macros
config: m68k-allmodconfig
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/8b796b03036f712417f8a87f85cdf9ac66d736ac
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Siddh-Raman-Pant/drm-print-Fix-and-add-support-for-NULL-as-first-argument-in-drm_-macros/20230106-062743
git checkout 8b796b03036f712417f8a87f85cdf9ac66d736ac
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/gpu/drm/display/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
| ^~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:849:17: note: in expansion of macro 'drm_err'
849 | drm_err(aux->drm_dev, "%s: DPCD failed write at register 0x%x\n",
| ^~~~~~~
include/drm/drm_print.h:480:9: warning: initialization of 'struct device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
480 | _Generic((drm), \
| ^~~~~~~~
include/drm/drm_print.h:495:33: note: in expansion of macro '__drm_get_dev_ptr'
495 | struct device *__dev_ = __drm_get_dev_ptr(drm); \
| ^~~~~~~~~~~~~~~~~
include/drm/drm_print.h:513:9: note: in expansion of macro '__drm_printk'
513 | __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:857:17: note: in expansion of macro 'drm_err'
857 | drm_err(aux->drm_dev, "%s: DPCD failed write at register 0x%x\n",
| ^~~~~~~
include/drm/drm_print.h:480:9: warning: initialization of 'struct device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
480 | _Generic((drm), \
| ^~~~~~~~
include/drm/drm_print.h:495:33: note: in expansion of macro '__drm_get_dev_ptr'
495 | struct device *__dev_ = __drm_get_dev_ptr(drm); \
| ^~~~~~~~~~~~~~~~~
include/drm/drm_print.h:513:9: note: in expansion of macro '__drm_printk'
513 | __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:864:17: note: in expansion of macro 'drm_err'
864 | drm_err(aux->drm_dev, "%s: DPCD failed write at register 0x%x\n",
| ^~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c: In function 'drm_dp_read_extended_dpcd_caps':
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:908:17: note: in expansion of macro 'drm_dbg_kms'
908 | drm_dbg_kms(aux->drm_dev,
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:917:9: note: in expansion of macro 'drm_dbg_kms'
917 | drm_dbg_kms(aux->drm_dev, "%s: Base DPCD: %*ph\n", aux->name, DP_RECEIVER_CAP_SIZE, dpcd);
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/display/drm_dp_helper.c: In function 'drm_dp_read_dpcd_caps':
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:952:9: note: in expansion of macro 'drm_dbg_kms'
952 | drm_dbg_kms(aux->drm_dev, "%s: DPCD: %*ph\n", aux->name, DP_RECEIVER_CAP_SIZE, dpcd);
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/display/drm_dp_helper.c: In function 'drm_dp_read_downstream_info':
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1001:9: note: in expansion of macro 'drm_dbg_kms'
1001 | drm_dbg_kms(aux->drm_dev, "%s: DPCD DFP: %*ph\n", aux->name, len, downstream_ports);
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/display/drm_dp_helper.c: In function 'drm_dp_i2c_do_msg':
>> include/drm/drm_print.h:482:25: warning: passing argument 1 of 'drm_dev_printk' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:646:32: note: in expansion of macro '__drm_get_dev_ptr'
646 | drm_dev_printk(__drm_get_dev_ptr(drm), KERN_DEBUG, \
| ^~~~~~~~~~~~~~~~~
include/drm/drm_print.h:651:9: note: in expansion of macro '__DRM_DEFINE_DBG_RATELIMITED'
651 | __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1718:33: note: in expansion of macro 'drm_dbg_kms_ratelimited'
1718 | drm_dbg_kms_ratelimited(aux->drm_dev, "%s: transaction timed out\n",
| ^~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:356:42: note: expected 'const struct device *' but argument is of type 'int'
356 | void drm_dev_printk(const struct device *dev, const char *level,
| ~~~~~~~~~~~~~~~~~~~~~^~~
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1721:33: note: in expansion of macro 'drm_dbg_kms'
1721 | drm_dbg_kms(aux->drm_dev, "%s: transaction failed: %d\n",
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1736:25: note: in expansion of macro 'drm_dbg_kms'
1736 | drm_dbg_kms(aux->drm_dev, "%s: native nack (result=%d, size=%zu)\n",
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1741:25: note: in expansion of macro 'drm_dbg_kms'
1741 | drm_dbg_kms(aux->drm_dev, "%s: native defer\n", aux->name);
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
include/drm/drm_print.h:480:9: warning: initialization of 'struct device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
480 | _Generic((drm), \
| ^~~~~~~~
include/drm/drm_print.h:495:33: note: in expansion of macro '__drm_get_dev_ptr'
495 | struct device *__dev_ = __drm_get_dev_ptr(drm); \
| ^~~~~~~~~~~~~~~~~
include/drm/drm_print.h:513:9: note: in expansion of macro '__drm_printk'
513 | __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1755:25: note: in expansion of macro 'drm_err'
1755 | drm_err(aux->drm_dev, "%s: invalid native reply %#04x\n",
| ^~~~~~~
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/drm/drm_print.h:411:29: note: in definition of macro 'drm_dev_dbg'
411 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~
include/drm/drm_print.h:538:21: note: in expansion of macro '__drm_get_dev_ptr'
538 | drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/display/drm_dp_helper.c:1771:25: note: in expansion of macro 'drm_dbg_kms'
1771 | drm_dbg_kms(aux->drm_dev, "%s: I2C nack (result=%d, size=%zu)\n",
| ^~~~~~~~~~~
include/drm/drm_print.h:360:63: note: expected 'const struct device *' but argument is of type 'int'
360 | void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
| ~~~~~~~~~~~~~~~~~~~~~^~~
include/drm/drm_print.h:482:25: warning: passing argument 2 of '__drm_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
482 | __drm_get_dev_ptr((drm), true), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
vim +/drm_dev_printk +482 include/drm/drm_print.h
473
474 /**
475 * __drm_get_dev_ptr - Helper to get device pointer even if NULL is passed.
476 * Primarily for use in drm_*() print macros, since they
477 * need to handle NULL as the first argument passed.
478 */
479 #define __drm_get_dev_ptr(drm) \
480 _Generic((drm), \
481 struct drm_device * : \
> 482 __drm_get_dev_ptr((drm), true), \
483 struct device * : \
484 __drm_get_dev_ptr((drm), false), \
485 default : \
486 NULL \
487 )
488
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (276751 bytes)
Powered by blists - more mailing lists