[PATCH 2/2] drm/cmdline-parser: Use assert when needed

kernel test robot lkp at intel.com
Thu Aug 4 19:26:00 UTC 2022


Hi "Michał,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm-tip/drm-tip]
[cannot apply to drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.19 next-20220804]
[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/Micha-Winiarski/drm-cmdline-parser-Merge-negative-tests/20220804-212019
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
config: csky-buildonly-randconfig-r001-20220804 (https://download.01.org/0day-ci/archive/20220805/202208050307.u6Yo3hhR-lkp@intel.com/config)
compiler: csky-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/8a21a5872b4bbe7bcfec5bc990d182a5c32416a2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Micha-Winiarski/drm-cmdline-parser-Merge-negative-tests/20220804-212019
        git checkout 8a21a5872b4bbe7bcfec5bc990d182a5c32416a2
        # 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=csky SHELL=/bin/bash drivers/gpu/drm/tests/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/tests/drm_cmdline_parser_test.c: In function 'drm_cmdline_test_res_bpp_refresh_force_on_digital':
>> drivers/gpu/drm/tests/drm_cmdline_parser_test.c:414:1: warning: the frame size of 1120 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     414 | }
         | ^
   drivers/gpu/drm/tests/drm_cmdline_parser_test.c: In function 'drm_cmdline_test_force_D_only_hdmi':
   drivers/gpu/drm/tests/drm_cmdline_parser_test.c:70:1: warning: the frame size of 1120 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      70 | }
         | ^
   drivers/gpu/drm/tests/drm_cmdline_parser_test.c: In function 'drm_cmdline_test_force_D_only_dvi':
   drivers/gpu/drm/tests/drm_cmdline_parser_test.c:91:1: warning: the frame size of 1124 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      91 | }
         | ^


vim +414 drivers/gpu/drm/tests/drm_cmdline_parser_test.c

9f0527d22a52ff Maíra Canal      2022-07-08  388  
9f0527d22a52ff Maíra Canal      2022-07-08  389  static void drm_cmdline_test_res_bpp_refresh_force_on_digital(struct kunit *test)
9f0527d22a52ff Maíra Canal      2022-07-08  390  {
9f0527d22a52ff Maíra Canal      2022-07-08  391  	struct drm_cmdline_mode mode = { };
8a21a5872b4bbe Michał Winiarski 2022-08-04  392  	const struct drm_connector connector = {
9f0527d22a52ff Maíra Canal      2022-07-08  393  		.connector_type = DRM_MODE_CONNECTOR_DVII,
9f0527d22a52ff Maíra Canal      2022-07-08  394  	};
9f0527d22a52ff Maíra Canal      2022-07-08  395  	const char *cmdline = "720x480-24 at 60D";
9f0527d22a52ff Maíra Canal      2022-07-08  396  
8a21a5872b4bbe Michał Winiarski 2022-08-04  397  	KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline,
9f0527d22a52ff Maíra Canal      2022-07-08  398  									  &connector, &mode));
9f0527d22a52ff Maíra Canal      2022-07-08  399  	KUNIT_EXPECT_TRUE(test, mode.specified);
9f0527d22a52ff Maíra Canal      2022-07-08  400  	KUNIT_EXPECT_EQ(test, mode.xres, 720);
9f0527d22a52ff Maíra Canal      2022-07-08  401  	KUNIT_EXPECT_EQ(test, mode.yres, 480);
9f0527d22a52ff Maíra Canal      2022-07-08  402  
9f0527d22a52ff Maíra Canal      2022-07-08  403  	KUNIT_EXPECT_TRUE(test, mode.refresh_specified);
9f0527d22a52ff Maíra Canal      2022-07-08  404  	KUNIT_EXPECT_EQ(test, mode.refresh, 60);
9f0527d22a52ff Maíra Canal      2022-07-08  405  
9f0527d22a52ff Maíra Canal      2022-07-08  406  	KUNIT_EXPECT_TRUE(test, mode.bpp_specified);
9f0527d22a52ff Maíra Canal      2022-07-08  407  	KUNIT_EXPECT_EQ(test, mode.bpp, 24);
9f0527d22a52ff Maíra Canal      2022-07-08  408  
9f0527d22a52ff Maíra Canal      2022-07-08  409  	KUNIT_EXPECT_FALSE(test, mode.rb);
9f0527d22a52ff Maíra Canal      2022-07-08  410  	KUNIT_EXPECT_FALSE(test, mode.cvt);
9f0527d22a52ff Maíra Canal      2022-07-08  411  	KUNIT_EXPECT_FALSE(test, mode.interlace);
9f0527d22a52ff Maíra Canal      2022-07-08  412  	KUNIT_EXPECT_FALSE(test, mode.margins);
9f0527d22a52ff Maíra Canal      2022-07-08  413  	KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON_DIGITAL);
9f0527d22a52ff Maíra Canal      2022-07-08 @414  }
9f0527d22a52ff Maíra Canal      2022-07-08  415  

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


More information about the dri-devel mailing list