From: kernel test robot <lkp@intel.com>
To: Tobias Jordan <kernel@cdqe.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Subject: Re: [PATCH] drm: of: fix leak of port_node
Date: Sun, 27 Sep 2020 03:16:29 +0800 [thread overview]
Message-ID: <202009270338.vd5jedCa%lkp@intel.com> (raw)
In-Reply-To: <20200925223700.GA26659@agrajag.zerfleddert.de>
[-- Attachment #1: Type: text/plain, Size: 3633 bytes --]
Hi Tobias,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.9-rc6 next-20200925]
[cannot apply to drm/drm-next]
[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]
url: https://github.com/0day-ci/linux/commits/Tobias-Jordan/drm-of-fix-leak-of-port_node/20200926-063854
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-s001-20200925 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# https://github.com/0day-ci/linux/commit/9acba5320ef136e5d4a3b7563f4b5a362922c818
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tobias-Jordan/drm-of-fix-leak-of-port_node/20200926-063854
git checkout 9acba5320ef136e5d4a3b7563f4b5a362922c818
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_of.c:318:37: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct device_node *node @@ got struct device_node const *port_node @@
>> drivers/gpu/drm/drm_of.c:318:37: sparse: expected struct device_node *node
>> drivers/gpu/drm/drm_of.c:318:37: sparse: got struct device_node const *port_node
drivers/gpu/drm/drm_of.c:335:37: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct device_node *node @@ got struct device_node const *port_node @@
drivers/gpu/drm/drm_of.c:335:37: sparse: expected struct device_node *node
drivers/gpu/drm/drm_of.c:335:37: sparse: got struct device_node const *port_node
vim +318 drivers/gpu/drm/drm_of.c
302
303 static int drm_of_lvds_get_remote_pixels_type(
304 const struct device_node *port_node)
305 {
306 struct device_node *endpoint = NULL;
307 int pixels_type = -EPIPE;
308
309 for_each_child_of_node(port_node, endpoint) {
310 struct device_node *remote_port;
311 int current_pt;
312
313 if (!of_node_name_eq(endpoint, "endpoint"))
314 continue;
315
316 remote_port = of_graph_get_remote_port(endpoint);
317 if (!remote_port) {
> 318 of_node_put(port_node);
319 return -EPIPE;
320 }
321
322 current_pt = drm_of_lvds_get_port_pixels_type(remote_port);
323 of_node_put(remote_port);
324 if (pixels_type < 0)
325 pixels_type = current_pt;
326
327 /*
328 * Sanity check, ensure that all remote endpoints have the same
329 * pixel type. We may lift this restriction later if we need to
330 * support multiple sinks with different dual-link
331 * configurations by passing the endpoints explicitly to
332 * drm_of_lvds_get_dual_link_pixel_order().
333 */
334 if (!current_pt || pixels_type != current_pt) {
335 of_node_put(port_node);
336 return -EINVAL;
337 }
338 }
339
340 return pixels_type;
341 }
342
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37273 bytes --]
prev parent reply other threads:[~2020-09-26 19:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 22:37 [PATCH] drm: of: fix leak of port_node Tobias Jordan
2020-09-26 1:56 ` kernel test robot
2020-09-26 19:16 ` kernel test robot [this message]
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=202009270338.vd5jedCa%lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabrizio.castro@bp.renesas.com \
--cc=kbuild-all@lists.01.org \
--cc=kernel@cdqe.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).