Re: [PATCH] drm/client: Convert to VISIBLE_IF_KUNIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Maxime,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.2-rc6 next-20230202]
[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/Maxime-Ripard/drm-client-Convert-to-VISIBLE_IF_KUNIT/20230202-190453
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20230202110312.808607-1-maxime%40cerno.tech
patch subject: [PATCH] drm/client: Convert to VISIBLE_IF_KUNIT
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230202/202302022027.LWmJQ4lL-lkp@xxxxxxxxx/config)
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/dd1e4c34178f4049f33e639350a6ef66ae9b5fd3
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Maxime-Ripard/drm-client-Convert-to-VISIBLE_IF_KUNIT/20230202-190453
        git checkout dd1e4c34178f4049f33e639350a6ef66ae9b5fd3
        # 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/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_client_modeset.c:166:1: warning: no previous prototype for 'drm_connector_pick_cmdline_mode' [-Wmissing-prototypes]
     166 | drm_connector_pick_cmdline_mode(struct drm_connector *connector)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/drm_connector_pick_cmdline_mode +166 drivers/gpu/drm/drm_client_modeset.c

   164	
   165	VISIBLE_IF_KUNIT struct drm_display_mode *
 > 166	drm_connector_pick_cmdline_mode(struct drm_connector *connector)
   167	{
   168		struct drm_cmdline_mode *cmdline_mode;
   169		struct drm_display_mode *mode;
   170		bool prefer_non_interlace;
   171	
   172		/*
   173		 * Find a user-defined mode. If the user gave us a valid
   174		 * mode on the kernel command line, it will show up in this
   175		 * list.
   176		 */
   177	
   178		list_for_each_entry(mode, &connector->modes, head) {
   179			if (mode->type & DRM_MODE_TYPE_USERDEF)
   180				return mode;
   181		}
   182	
   183		cmdline_mode = &connector->cmdline_mode;
   184		if (cmdline_mode->specified == false)
   185			return NULL;
   186	
   187		/*
   188		 * Attempt to find a matching mode in the list of modes we
   189		 * have gotten so far.
   190		 */
   191	
   192		prefer_non_interlace = !cmdline_mode->interlace;
   193	again:
   194		list_for_each_entry(mode, &connector->modes, head) {
   195			/* check width/height */
   196			if (mode->hdisplay != cmdline_mode->xres ||
   197			    mode->vdisplay != cmdline_mode->yres)
   198				continue;
   199	
   200			if (cmdline_mode->refresh_specified) {
   201				if (drm_mode_vrefresh(mode) != cmdline_mode->refresh)
   202					continue;
   203			}
   204	
   205			if (cmdline_mode->interlace) {
   206				if (!(mode->flags & DRM_MODE_FLAG_INTERLACE))
   207					continue;
   208			} else if (prefer_non_interlace) {
   209				if (mode->flags & DRM_MODE_FLAG_INTERLACE)
   210					continue;
   211			}
   212			return mode;
   213		}
   214	
   215		if (prefer_non_interlace) {
   216			prefer_non_interlace = false;
   217			goto again;
   218		}
   219	
   220		return NULL;
   221	}
   222	EXPORT_SYMBOL_IF_KUNIT(drm_connector_pick_cmdline_mode);
   223	

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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux