mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Charles Han <hanchunchao@inspur.com>,
	neil.armstrong@linaro.org, quic_jesszhan@quicinc.com,
	mripard@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	liuyanming@ieisystem.com, hanchunchao <hanchunchao@inspur.com>
Subject: Re: [PATCH] drm/panel/hx83102: fix null pointer dereference in hx83102_get_modes
Date: Thu, 22 Aug 2024 10:21:18 +0800	[thread overview]
Message-ID: <202408221044.vVHNGMnS-lkp@intel.com> (raw)
In-Reply-To: <20240821095039.15282-1-hanchunchao@inspur.com>

Hi Charles,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.11-rc4 next-20240821]
[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/Charles-Han/drm-panel-hx83102-fix-null-pointer-dereference-in-hx83102_get_modes/20240821-191703
base:   linus/master
patch link:    https://lore.kernel.org/r/20240821095039.15282-1-hanchunchao%40inspur.com
patch subject: [PATCH] drm/panel/hx83102: fix null pointer dereference in hx83102_get_modes
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20240822/202408221044.vVHNGMnS-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408221044.vVHNGMnS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408221044.vVHNGMnS-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/blk_types.h:11,
                    from include/linux/writeback.h:13,
                    from include/linux/memcontrol.h:23,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/gpu/drm/panel/panel-himax-hx83102.c:14:
   drivers/gpu/drm/panel/panel-himax-hx83102.c: In function 'hx83102_get_modes':
>> drivers/gpu/drm/panel/panel-himax-hx83102.c:569:34: error: passing argument 1 of '_dev_err' from incompatible pointer type [-Wincompatible-pointer-types]
     569 |                 dev_err(connector->dev, "bad mode or failed to add mode\n");
         |                         ~~~~~~~~~^~~~~
         |                                  |
         |                                  struct drm_device *
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/gpu/drm/panel/panel-himax-hx83102.c:569:17: note: in expansion of macro 'dev_err'
     569 |                 dev_err(connector->dev, "bad mode or failed to add mode\n");
         |                 ^~~~~~~
   include/linux/dev_printk.h:50:36: note: expected 'const struct device *' but argument is of type 'struct drm_device *'
      50 | void _dev_err(const struct device *dev, const char *fmt, ...);
         |               ~~~~~~~~~~~~~~~~~~~~~^~~


vim +/_dev_err +569 drivers/gpu/drm/panel/panel-himax-hx83102.c

   559	
   560	static int hx83102_get_modes(struct drm_panel *panel,
   561				    struct drm_connector *connector)
   562	{
   563		struct hx83102 *ctx = panel_to_hx83102(panel);
   564		const struct drm_display_mode *m = ctx->desc->modes;
   565		struct drm_display_mode *mode;
   566	
   567		mode = drm_mode_duplicate(connector->dev, m);
   568		if (!mode) {
 > 569			dev_err(connector->dev, "bad mode or failed to add mode\n");
   570			return -EINVAL;
   571		}
   572	
   573		mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
   574		drm_mode_set_name(mode);
   575		drm_mode_probed_add(connector, mode);
   576	
   577		connector->display_info.width_mm = ctx->desc->size.width_mm;
   578		connector->display_info.height_mm = ctx->desc->size.height_mm;
   579		connector->display_info.bpc = 8;
   580	
   581		return 1;
   582	}
   583	

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

  parent reply	other threads:[~2024-08-22  2:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21  9:50 Charles Han
2024-08-21 23:45 ` Greg KH
2024-08-22  2:21 ` kernel test robot [this message]
2024-08-22  3:24 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408221044.vVHNGMnS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hanchunchao@inspur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyanming@ieisystem.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=quic_jesszhan@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®