[PATCH 2/2] drm/panel: Add a driver for the TPO TPG110

kbuild test robot lkp at intel.com
Thu Jun 21 19:43:40 UTC 2018


Hi Linus,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tegra-drm/drm/tegra/for-next]
[also build test WARNING on v4.18-rc1 next-20180621]
[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/Linus-Walleij/drm-panel-Augment-the-TPO-TPG110-bindings/20180622-025655
base:   git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/panel/panel-tpo-tpg110.c: In function 'tpg110_get_modes':
>> drivers/gpu/drm/panel/panel-tpo-tpg110.c:420:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
     strncpy(connector->display_info.name, tpg->panel_mode->name,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      DRM_DISPLAY_INFO_LEN);
      ~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +420 drivers/gpu/drm/panel/panel-tpo-tpg110.c

   405	
   406	/**
   407	 * tpg110_get_modes() - return the appropriate mode
   408	 * @panel: the panel to get the mode for
   409	 *
   410	 * This currently does not present a forest of modes, instead it
   411	 * presents the mode that is configured for the system under use,
   412	 * and which is detected by reading the registers of the display.
   413	 */
   414	static int tpg110_get_modes(struct drm_panel *panel)
   415	{
   416		struct drm_connector *connector = panel->connector;
   417		struct tpg110 *tpg = to_tpg110(panel);
   418		struct drm_display_mode *mode;
   419	
 > 420		strncpy(connector->display_info.name, tpg->panel_mode->name,
   421			DRM_DISPLAY_INFO_LEN);
   422		connector->display_info.width_mm = tpg->width;
   423		connector->display_info.height_mm = tpg->height;
   424		connector->display_info.bus_flags = tpg->panel_mode->bus_flags;
   425	
   426		mode = drm_mode_duplicate(panel->drm, &tpg->panel_mode->mode);
   427		drm_mode_set_name(mode);
   428		mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
   429	
   430		mode->width_mm = tpg->width;
   431		mode->height_mm = tpg->height;
   432	
   433		drm_mode_probed_add(connector, mode);
   434	
   435		return 1;
   436	}
   437	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 49880 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180622/1a9577e1/attachment-0001.gz>


More information about the dri-devel mailing list