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]
Message-ID: <202301061000.E1SiDV9Y-lkp@intel.com>
Date:   Fri, 6 Jan 2023 10:54:55 +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:     llvm@...ts.linux.dev, 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! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR 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: i386-randconfig-a002
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 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 error/warnings (new ones prefixed by >>):

>> drivers/gpu/drm/udl/udl_modeset.c:446:4: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                           drm_err(dev, "Read EDID byte %zu failed err %x\n", i, ret);
                           ^
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/udl/udl_modeset.c:446:4: note: did you mean '___drm_get_dev_ptr'?
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   include/drm/drm_print.h:463:30: note: '___drm_get_dev_ptr' declared here
   static inline struct device *___drm_get_dev_ptr(const void *ptr, bool is_drm)
                                ^
>> drivers/gpu/drm/udl/udl_modeset.c:446:4: warning: incompatible integer to pointer conversion initializing 'struct device *' with an expression of type 'int' [-Wint-conversion]
                           drm_err(dev, "Read EDID byte %zu failed err %x\n", i, ret);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:495:17: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                          ^        ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/udl/udl_modeset.c:450:4: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                           drm_err(dev, "Read EDID byte %zu failed\n", i);
                           ^
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/udl/udl_modeset.c:450:4: warning: incompatible integer to pointer conversion initializing 'struct device *' with an expression of type 'int' [-Wint-conversion]
                           drm_err(dev, "Read EDID byte %zu failed\n", i);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:495:17: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                          ^        ~~~~~~~~~~~~~~~~~~~~~~
   2 warnings and 2 errors generated.
--
>> drivers/gpu/drm/udl/udl_main.c:303:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_err(dev, "Timeout for syncing pending URBs\n");
                   ^
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/udl/udl_main.c:303:3: note: did you mean '___drm_get_dev_ptr'?
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   include/drm/drm_print.h:463:30: note: '___drm_get_dev_ptr' declared here
   static inline struct device *___drm_get_dev_ptr(const void *ptr, bool is_drm)
                                ^
>> drivers/gpu/drm/udl/udl_main.c:303:3: warning: incompatible integer to pointer conversion initializing 'struct device *' with an expression of type 'int' [-Wint-conversion]
                   drm_err(dev, "Timeout for syncing pending URBs\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:495:17: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                          ^        ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/udl/udl_main.c:316:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_warn(dev, "buffer sharing not supported"); /* not an error */
                   ^
   include/drm/drm_print.h:510:2: note: expanded from macro 'drm_warn'
           __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/udl/udl_main.c:316:3: warning: incompatible integer to pointer conversion initializing 'struct device *' with an expression of type 'int' [-Wint-conversion]
                   drm_warn(dev, "buffer sharing not supported"); /* not an error */
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:510:2: note: expanded from macro 'drm_warn'
           __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:495:17: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                          ^        ~~~~~~~~~~~~~~~~~~~~~~
   2 warnings and 2 errors generated.
--
>> drivers/gpu/drm/drm_atomic.c:79:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_err(commit->crtc->dev, "hw_done timed out\n");
                   ^
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic.c:79:3: note: did you mean '___drm_get_dev_ptr'?
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   include/drm/drm_print.h:463:30: note: '___drm_get_dev_ptr' declared here
   static inline struct device *___drm_get_dev_ptr(const void *ptr, bool is_drm)
                                ^
>> drivers/gpu/drm/drm_atomic.c:79:3: warning: incompatible integer to pointer conversion initializing 'struct device *' with an expression of type 'int' [-Wint-conversion]
                   drm_err(commit->crtc->dev, "hw_done timed out\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:495:17: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                          ^        ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:89:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_err(commit->crtc->dev, "flip_done timed out\n");
                   ^
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^
   include/drm/drm_print.h:495:26: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                                   ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic.c:89:3: warning: incompatible integer to pointer conversion initializing 'struct device *' with an expression of type 'int' [-Wint-conversion]
                   drm_err(commit->crtc->dev, "flip_done timed out\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:513:2: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:495:17: note: expanded from macro '__drm_printk'
           struct device *__dev_ = __drm_get_dev_ptr(drm);                 \
                          ^        ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic.c:145:2: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           drm_dbg_atomic(dev, "Allocated atomic state %p\n", state);
           ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
>> drivers/gpu/drm/drm_atomic.c:145:2: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
           drm_dbg_atomic(dev, "Allocated atomic state %p\n", state);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic.c:196:2: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           drm_dbg_atomic(dev, "Clearing atomic state %p\n", state);
           ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic.c:196:2: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
           drm_dbg_atomic(dev, "Clearing atomic state %p\n", state);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic.c:306:2: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           drm_dbg_atomic(state->dev, "Freeing atomic state %p\n", state);
           ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic.c:306:2: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
           drm_dbg_atomic(state->dev, "Freeing atomic state %p\n", state);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic.c:363:2: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\n",
           ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic.c:363:2: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
           drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\n",
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic.c:384:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_dbg_atomic(crtc->dev,
                   ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic.c:384:3: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
                   drm_dbg_atomic(crtc->dev,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
--
>> drivers/gpu/drm/drm_atomic_uapi.c:92:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_dbg_atomic(crtc->dev,
                   ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic_uapi.c:92:3: note: did you mean '___drm_get_dev_ptr'?
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   include/drm/drm_print.h:463:30: note: '___drm_get_dev_ptr' declared here
   static inline struct device *___drm_get_dev_ptr(const void *ptr, bool is_drm)
                                ^
>> drivers/gpu/drm/drm_atomic_uapi.c:92:3: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
                   drm_dbg_atomic(crtc->dev,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic_uapi.c:98:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_dbg_atomic(crtc->dev,
                   ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic_uapi.c:98:3: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
                   drm_dbg_atomic(crtc->dev,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic_uapi.c:137:4: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                           drm_dbg_atomic(crtc->dev,
                           ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic_uapi.c:137:4: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
                           drm_dbg_atomic(crtc->dev,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic_uapi.c:147:4: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                           drm_dbg_atomic(crtc->dev,
                           ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic_uapi.c:147:4: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
                           drm_dbg_atomic(crtc->dev,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:480:2: note: expanded from macro '__drm_get_dev_ptr'
           _Generic((drm),                                                 \
           ^
   include/drm/drm_print.h:411:22: note: expanded from macro 'drm_dev_dbg'
           __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
                               ^~~
   include/drm/drm_print.h:360:63: note: passing argument to parameter 'dev' here
   void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
                                                                 ^
   drivers/gpu/drm/drm_atomic_uapi.c:157:3: error: implicit declaration of function '__drm_get_dev_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   drm_dbg_atomic(crtc->dev,
                   ^
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
                       ^
   include/drm/drm_print.h:482:4: note: expanded from macro '__drm_get_dev_ptr'
                           __drm_get_dev_ptr((drm), true),                 \
                           ^
   drivers/gpu/drm/drm_atomic_uapi.c:157:3: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct device *' [-Wint-conversion]
                   drm_dbg_atomic(crtc->dev,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:542:14: note: expanded from macro 'drm_dbg_atomic'
           drm_dev_dbg(__drm_get_dev_ptr(drm), DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
..


vim +/__drm_get_dev_ptr +446 drivers/gpu/drm/udl/udl_modeset.c

0862cfd3e22f3f Thomas Zimmermann 2022-10-06  425  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  426  static int udl_get_edid_block(void *data, u8 *buf, unsigned int block, size_t len)
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  427  {
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  428  	struct udl_device *udl = data;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  429  	struct drm_device *dev = &udl->drm;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  430  	struct usb_device *udev = udl_to_usb_device(udl);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  431  	u8 *read_buff;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  432  	int ret;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  433  	size_t i;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  434  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  435  	read_buff = kmalloc(2, GFP_KERNEL);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  436  	if (!read_buff)
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  437  		return -ENOMEM;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  438  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  439  	for (i = 0; i < len; i++) {
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  440  		int bval = (i + block * EDID_LENGTH) << 8;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  441  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  442  		ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  443  				      0x02, (0x80 | (0x02 << 5)), bval,
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  444  				      0xA1, read_buff, 2, USB_CTRL_GET_TIMEOUT);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  445  		if (ret < 0) {
0862cfd3e22f3f Thomas Zimmermann 2022-10-06 @446  			drm_err(dev, "Read EDID byte %zu failed err %x\n", i, ret);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  447  			goto err_kfree;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  448  		} else if (ret < 1) {
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  449  			ret = -EIO;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  450  			drm_err(dev, "Read EDID byte %zu failed\n", i);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  451  			goto err_kfree;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  452  		}
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  453  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  454  		buf[i] = read_buff[1];
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  455  	}
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  456  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  457  	kfree(read_buff);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  458  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  459  	return 0;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  460  
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  461  err_kfree:
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  462  	kfree(read_buff);
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  463  	return ret;
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  464  }
0862cfd3e22f3f Thomas Zimmermann 2022-10-06  465  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ