[PATCH v2 5/5] drm/selftests: Add command line parser selftests

kbuild test robot lkp at intel.com
Fri Apr 12 07:18:58 UTC 2019


Hi Maxime,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.1-rc4 next-20190411]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Maxime-Ripard/drm-modes-Rewrite-the-command-line-parser/20190412-122837
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:20:44: sparse: Using plain integer as NULL pointer
>> drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:21:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:45:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:46:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:70:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:71:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:95:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:96:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:120:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:121:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:146:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:147:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:172:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:173:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:199:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:200:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:226:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:227:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:253:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:254:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:280:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:281:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:292:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:293:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:319:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:320:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:346:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:347:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:374:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:375:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:401:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:402:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:426:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:427:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:451:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:452:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:463:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:464:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:475:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:476:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:490:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:491:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:508:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:509:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:520:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:521:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:532:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:533:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:544:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:545:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:556:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:557:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:571:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:572:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:588:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:589:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:614:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:615:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:640:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:641:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:666:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:667:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:692:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:693:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:704:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:705:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:716:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:717:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:742:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:743:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:768:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:769:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:797:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:798:42: sparse: missing braces around initializer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:823:44: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:824:42: sparse: missing braces around initializer

vim +20 drivers/gpu/drm/selftests/test-drm_cmdline_parser.c

    17	
    18	static int drm_cmdline_test_res(void *ignored)
    19	{
  > 20		struct drm_connector connector = { 0 };
  > 21		struct drm_cmdline_mode mode = { 0 };
    22	
    23		FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480",
    24								      &connector,
    25								      &mode));
    26		FAIL_ON(!mode.specified);
    27		FAIL_ON(mode.xres != 720);
    28		FAIL_ON(mode.yres != 480);
    29	
    30		FAIL_ON(mode.refresh_specified);
    31	
    32		FAIL_ON(mode.bpp_specified);
    33	
    34		FAIL_ON(mode.rb);
    35		FAIL_ON(mode.cvt);
    36		FAIL_ON(mode.interlace);
    37		FAIL_ON(mode.margins);
    38		FAIL_ON(mode.force != DRM_FORCE_UNSPECIFIED);
    39	
    40		return 0;
    41	}
    42	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


More information about the dri-devel mailing list