Subject: [nomadik:ux500-skomer 44/47] drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c:62:20: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}'

From: kbuild test robot <[email-masked]>
Date: Tue, 3 Dec 2019 07:33:37 +0800

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-skomer
head:   10adfdbea52ccf7346c17aec778042ab5b604ca9
commit: 0b84df090e9c35a0dcf4519108ac5a014dbbce90 [44/47] drm/panel: Add DSI transport so s6e63m0
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0b84df090e9c35a0dcf4519108ac5a014dbbce90
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email-masked]>

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c:12:0:
   drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c: In function 's6e63m0_dsi_dcs_write':
>> drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c:62:20: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=]
     DRM_DEV_INFO(dev, "sent command %02x %02x bytes\n",
                       ^
           cmd, len - 1);
                ~~~~~~~ 
   include/drm/drm_print.h:336:33: note: in definition of macro 'DRM_DEV_INFO'
     drm_dev_printk(dev, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^~~

vim +62 drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c

    10	
    11	#include <drm/drm_mipi_dsi.h>
  > 12	#include <drm/drm_print.h>
    13	
    14	#include "panel-samsung-s6e63m0.h"
    15	
    16	#define DSI_MAX_CHUNK	15
    17	
    18	static int s6e63m0_dsi_dcs_write(struct device *dev, const u8 *data, size_t len)
    19	{
    20		struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);
    21		const u8 *seqp = data;
    22		u8 cmd;
    23		int cmdwritten = 0;
    24		int chunk;
    25		int ret;
    26	
    27		DRM_DEV_INFO(dev, "DSI writing dcs seq: %*ph\n", (int)len, data);
    28	
    29		/* Pick out the DCS command */
    30		cmd = *seqp;
    31		seqp++;
    32		cmdwritten++;
    33		chunk = len - 1;
    34	
    35		/* Send max 15 bytes at a time */
    36		if (chunk > DSI_MAX_CHUNK)
    37			chunk = DSI_MAX_CHUNK;
    38		ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk);
    39		if (ret < 0) {
    40			DRM_DEV_ERROR(dev,
    41				      "error sending DCS command seq cmd %02x\n",
    42				      cmd);
    43			return ret;
    44		}
    45		cmdwritten += chunk;
    46		seqp += chunk;
    47	
    48		while (cmdwritten < len) {
    49			chunk = len - cmdwritten;
    50			if (chunk > DSI_MAX_CHUNK)
    51				chunk = DSI_MAX_CHUNK;
    52			ret = mipi_dsi_generic_write(dsi, seqp, chunk);
    53			if (ret < 0) {
    54				DRM_DEV_ERROR(dev,
    55					      "error sending generic write seq %02x\n",
    56					      cmd);
    57				return ret;
    58			}
    59			cmdwritten += chunk;
    60			seqp += chunk;
    61		}
  > 62		DRM_DEV_INFO(dev, "sent command %02x %02x bytes\n",
    63			     cmd, len - 1);
    64	
    65		usleep_range(8000, 9000);
    66	
    67		return 0;
    68	}
    69	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email-masked] Intel Corporation
_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel