Hi Jocelyn,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tegra-drm/drm/tegra/for-next]
[also build test WARNING on v5.18-rc6]
[cannot apply to drm/drm-next drm-tip/drm-tip airlied/drm-next next-20220511]
[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]

url:    
https://github.com/intel-lab-lkp/linux/commits/Jocelyn-Falempe/mgag200-Enable-atomic-gamma-lut-update/20220511-233134
base:   git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
config: i386-randconfig-a003-20220509 
(https://download.01.org/0day-ci/archive/20220512/202205120649.u2ym0pxz-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
18dd123c56754edf62c7042dcf23185c3727610f)
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/0831f1db9ae8814796efea603749709e80d2808c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review 
Jocelyn-Falempe/mgag200-Enable-atomic-gamma-lut-update/20220511-233134
        git checkout 0831f1db9ae8814796efea603749709e80d2808c
        # 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 SHELL=/bin/bash drivers/gpu/drm/mgag200/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/mgag200/mgag200_mode.c:972:5: warning: format specifies type 
>> 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
                                   crtc_state->gamma_lut->length);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:438:46: note: expanded from macro 'drm_err'
           __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
                                                ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:425:48: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
                                                  ~~~    ^~~~~~~~~~~
   include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
           dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), 
##__VA_ARGS__)
                                                                  ~~~     
^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 
'dev_printk_index_wrap'
                   _p_func(dev, fmt, ##__VA_ARGS__);                       \
                                ~~~    ^~~~~~~~~~~
   1 warning generated.


vim +972 drivers/gpu/drm/mgag200/mgag200_mode.c

   937  
   938  static int
   939  mgag200_simple_display_pipe_check(struct drm_simple_display_pipe *pipe,
   940                                    struct drm_plane_state *plane_state,
   941                                    struct drm_crtc_state *crtc_state)
   942  {
   943          struct drm_plane *plane = plane_state->plane;
   944          struct drm_device *dev = plane->dev;
   945          struct mga_device *mdev = to_mga_device(dev);
   946          struct mgag200_pll *pixpll = &mdev->pixpll;
   947          struct mgag200_crtc_state *mgag200_crtc_state = 
to_mgag200_crtc_state(crtc_state);
   948          struct drm_framebuffer *new_fb = plane_state->fb;
   949          struct drm_framebuffer *fb = NULL;
   950          int ret;
   951  
   952          if (!new_fb)
   953                  return 0;
   954  
   955          if (plane->state)
   956                  fb = plane->state->fb;
   957  
   958          if (!fb || (fb->format != new_fb->format))
   959                  crtc_state->mode_changed = true; /* update PLL settings 
*/
   960  
   961          if (crtc_state->mode_changed) {
   962                  ret = pixpll->funcs->compute(pixpll, 
crtc_state->mode.clock,
   963                                               
&mgag200_crtc_state->pixpllc);
   964                  if (ret)
   965                          return ret;
   966          }
   967  
   968          if (crtc_state->color_mgmt_changed && crtc_state->gamma_lut) {
   969                  if (crtc_state->gamma_lut->length !=
   970                      MGAG200_LUT_SIZE * sizeof(struct drm_color_lut)) {
   971                          drm_err(dev, "Wrong size for gamma_lut %ld\n",
 > 972                                  crtc_state->gamma_lut->length);
   973                          return -EINVAL;
   974                  }
   975          }
   976          return 0;
   977  }
   978  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Reply via email to