lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 6 Jan 2023 09:54:05 +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: ia64-allyesconfig
compiler: ia64-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=ia64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/gpu/drm/

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 >>):

   In file included from drivers/gpu/drm/drm_atomic.c:43:
   drivers/gpu/drm/drm_atomic.c: In function 'drm_crtc_commit_wait':
   include/drm/drm_print.h:482:25: error: implicit declaration of function '__drm_get_dev_ptr'; did you mean '___drm_get_dev_ptr'? [-Werror=implicit-function-declaration]
     482 |                         __drm_get_dev_ptr((drm), true),                 \
         |                         ^~~~~~~~~~~~~~~~~
   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/drm_atomic.c:79:17: note: in expansion of macro 'drm_err'
      79 |                 drm_err(commit->crtc->dev, "hw_done timed out\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/drm_atomic.c:79:17: note: in expansion of macro 'drm_err'
      79 |                 drm_err(commit->crtc->dev, "hw_done timed out\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/drm_atomic.c:89:17: note: in expansion of macro 'drm_err'
      89 |                 drm_err(commit->crtc->dev, "flip_done timed out\n");
         |                 ^~~~~~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_state_init':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:145:9: note: in expansion of macro 'drm_dbg_atomic'
     145 |         drm_dbg_atomic(dev, "Allocated atomic state %p\n", state);
         |         ^~~~~~~~~~~~~~
   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/drm_atomic.c: In function 'drm_atomic_state_default_clear':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:196:9: note: in expansion of macro 'drm_dbg_atomic'
     196 |         drm_dbg_atomic(dev, "Clearing atomic state %p\n", state);
         |         ^~~~~~~~~~~~~~
   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/drm_atomic.c: In function '__drm_atomic_state_free':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:306:9: note: in expansion of macro 'drm_dbg_atomic'
     306 |         drm_dbg_atomic(state->dev, "Freeing atomic state %p\n", state);
         |         ^~~~~~~~~~~~~~
   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/drm_atomic.c: In function 'drm_atomic_get_crtc_state':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:363:9: note: in expansion of macro 'drm_dbg_atomic'
     363 |         drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_crtc_check':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:384:17: note: in expansion of macro 'drm_dbg_atomic'
     384 |                 drm_dbg_atomic(crtc->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:396:17: note: in expansion of macro 'drm_dbg_atomic'
     396 |                 drm_dbg_atomic(crtc->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:404:17: note: in expansion of macro 'drm_dbg_atomic'
     404 |                 drm_dbg_atomic(crtc->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:422:17: note: in expansion of macro 'drm_dbg_atomic'
     422 |                 drm_dbg_atomic(crtc->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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_connector_check':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:469:17: note: in expansion of macro 'drm_dbg_atomic'
     469 |                 drm_dbg_atomic(connector->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:480:17: note: in expansion of macro 'drm_dbg_atomic'
     480 |                 drm_dbg_atomic(connector->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:489:25: note: in expansion of macro 'drm_dbg_atomic'
     489 |                         drm_dbg_atomic(connector->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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_get_plane_state':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:549:9: note: in expansion of macro 'drm_dbg_atomic'
     549 |         drm_dbg_atomic(plane->dev, "Added [PLANE:%d:%s] %p state to %p\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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_plane_check':
>> 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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:606:17: note: in expansion of macro 'drm_dbg_atomic'
     606 |                 drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] CRTC set but no FB\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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:610:17: note: in expansion of macro 'drm_dbg_atomic'
     610 |                 drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] FB set but no CRTC\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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:621:17: note: in expansion of macro 'drm_dbg_atomic'
     621 |                 drm_dbg_atomic(plane->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:632:17: note: in expansion of macro 'drm_dbg_atomic'
     632 |                 drm_dbg_atomic(plane->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:644:17: note: in expansion of macro 'drm_dbg_atomic'
     644 |                 drm_dbg_atomic(plane->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:660:17: note: in expansion of macro 'drm_dbg_atomic'
     660 |                 drm_dbg_atomic(plane->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:687:25: note: in expansion of macro 'drm_dbg_atomic'
     687 |                         drm_dbg_atomic(plane->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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:698:17: note: in expansion of macro 'drm_dbg_atomic'
     698 |                 drm_dbg_atomic(plane->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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_get_private_obj_state':
   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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:866:9: note: in expansion of macro 'drm_dbg_atomic'
     866 |         drm_dbg_atomic(state->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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_get_connector_state':
   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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:1048:9: note: in expansion of macro 'drm_dbg_atomic'
    1048 |         drm_dbg_atomic(connector->dev, "Added [CONNECTOR:%d:%s] %p state to %p\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,
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_add_encoder_bridges':
   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:542:21: note: in expansion of macro '__drm_get_dev_ptr'
     542 |         drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
         |                     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:1181:9: note: in expansion of macro 'drm_dbg_atomic'
    1181 |         drm_dbg_atomic(encoder->dev,
..


vim +480 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	
   489	/**
   490	 * Helper for struct drm_device based logging (prefer this over struct device).
   491	 * Also supports struct device ptr as an argument for edge cases.
   492	 */
   493	#define __drm_printk(drm, level, type, fmt, ...)			\
   494	({									\
 > 495		struct device *__dev_ = __drm_get_dev_ptr(drm);			\
   496		if (__dev_)							\
   497			dev_##level##type(__dev_, "[drm] " fmt, ##__VA_ARGS__);	\
   498		else								\
   499			pr_##level##type("[drm] " fmt, ##__VA_ARGS__);		\
   500	})
   501	
   502	
   503	#define drm_info(drm, fmt, ...)					\
   504		__drm_printk((drm), info,, fmt, ##__VA_ARGS__)
   505	
   506	#define drm_notice(drm, fmt, ...)				\
   507		__drm_printk((drm), notice,, fmt, ##__VA_ARGS__)
   508	
   509	#define drm_warn(drm, fmt, ...)					\
   510		__drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
   511	
   512	#define drm_err(drm, fmt, ...)					\
   513		__drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
   514	
   515	
   516	#define drm_info_once(drm, fmt, ...)				\
   517		__drm_printk((drm), info, _once, fmt, ##__VA_ARGS__)
   518	
   519	#define drm_notice_once(drm, fmt, ...)				\
   520		__drm_printk((drm), notice, _once, fmt, ##__VA_ARGS__)
   521	
   522	#define drm_warn_once(drm, fmt, ...)				\
   523		__drm_printk((drm), warn, _once, fmt, ##__VA_ARGS__)
   524	
   525	#define drm_err_once(drm, fmt, ...)				\
   526		__drm_printk((drm), err, _once, "*ERROR* " fmt, ##__VA_ARGS__)
   527	
   528	
   529	#define drm_err_ratelimited(drm, fmt, ...)				\
   530		__drm_printk((drm), err, _ratelimited, "*ERROR* " fmt, ##__VA_ARGS__)
   531	
   532	
   533	#define drm_dbg_core(drm, fmt, ...)					\
   534		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_CORE, fmt, ##__VA_ARGS__)
   535	#define drm_dbg_driver(drm, fmt, ...)					\
 > 536		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
   537	#define drm_dbg_kms(drm, fmt, ...)					\
   538		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_KMS, fmt, ##__VA_ARGS__)
   539	#define drm_dbg_prime(drm, fmt, ...)					\
   540		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_PRIME, fmt, ##__VA_ARGS__)
   541	#define drm_dbg_atomic(drm, fmt, ...)					\
   542		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
   543	#define drm_dbg_vbl(drm, fmt, ...)					\
   544		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_VBL, fmt, ##__VA_ARGS__)
   545	#define drm_dbg_state(drm, fmt, ...)					\
   546		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_STATE, fmt, ##__VA_ARGS__)
   547	#define drm_dbg_lease(drm, fmt, ...)					\
   548		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_LEASE, fmt, ##__VA_ARGS__)
   549	#define drm_dbg_dp(drm, fmt, ...)					\
   550		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_DP, fmt, ##__VA_ARGS__)
   551	#define drm_dbg_drmres(drm, fmt, ...)					\
   552		drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_DRMRES, fmt, ##__VA_ARGS__)
   553	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (322353 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ