Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oleksandr Andrushchenko <andr2000@gmail.com>,
	xen-devel@lists.xenproject.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com,
	jgross@suse.com, airlied@linux.ie, daniel@ffwll.ch
Cc: intel-gfx@lists.freedesktop.org, sstabellini@kernel.org,
	kbuild-all@lists.01.org, dan.carpenter@oracle.com
Subject: Re: [Intel-gfx] [PATCH 6/6] drm/xen-front: Add support for EDID based configuration
Date: Wed, 5 Aug 2020 22:35:32 +0800
Message-ID: <202008052221.duhA3v0p%lkp@intel.com> (raw)
In-Reply-To: <20200731125109.18666-7-andr2000@gmail.com>

Hi Oleksandr,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-exynos/exynos-drm-next]
[also build test WARNING on drm-intel/for-linux-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.8 next-20200804]
[cannot apply to xen-tip/linux-next 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/Oleksandr-Andrushchenko/Fixes-and-improvements-for-Xen-pvdrm/20200731-205350
base:   https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/irqchip/irq-gic.c:161:24: warning: Local variable gic_data shadows outer variable [shadowVar]
    struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
                          ^
   drivers/irqchip/irq-gic.c:123:29: note: Shadowed declaration
   static struct gic_chip_data gic_data[CONFIG_ARM_GIC_MAX_NR] __read_mostly;
                               ^
   drivers/irqchip/irq-gic.c:161:24: note: Shadow variable
    struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
                          ^
   drivers/irqchip/irq-gic.c:167:24: warning: Local variable gic_data shadows outer variable [shadowVar]
    struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
                          ^
   drivers/irqchip/irq-gic.c:123:29: note: Shadowed declaration
   static struct gic_chip_data gic_data[CONFIG_ARM_GIC_MAX_NR] __read_mostly;
                               ^
   drivers/irqchip/irq-gic.c:167:24: note: Shadow variable
    struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
                          ^
>> drivers/irqchip/irq-gic.c:400:28: warning: Local variable gic_irq shadows outer function [shadowFunction]
    unsigned int cascade_irq, gic_irq;
                              ^
   drivers/irqchip/irq-gic.c:171:28: note: Shadowed declaration
   static inline unsigned int gic_irq(struct irq_data *d)
                              ^
   drivers/irqchip/irq-gic.c:400:28: note: Shadow variable
    unsigned int cascade_irq, gic_irq;
                              ^
>> drivers/irqchip/irq-gic.c:1507:14: warning: Local variable gic_cpu_base shadows outer function [shadowFunction]
    phys_addr_t gic_cpu_base;
                ^
   drivers/irqchip/irq-gic.c:165:29: note: Shadowed declaration
   static inline void __iomem *gic_cpu_base(struct irq_data *d)
                               ^
   drivers/irqchip/irq-gic.c:1507:14: note: Shadow variable
    phys_addr_t gic_cpu_base;
                ^
>> drivers/irqchip/irq-gic-v3.c:874:71: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
    gic_data.rdists.has_direct_lpi &= (!!(typer & GICR_TYPER_DirectLPIS) |
                                                                         ^
>> drivers/irqchip/irq-gic-v3.c:1808:6: warning: Local variable nr_redist_regions shadows outer variable [shadowVar]
    u32 nr_redist_regions;
        ^
   drivers/irqchip/irq-gic-v3.c:1880:6: note: Shadowed declaration
    u32 nr_redist_regions;
        ^
   drivers/irqchip/irq-gic-v3.c:1808:6: note: Shadow variable
    u32 nr_redist_regions;
        ^
>> drivers/irqchip/irq-gic-v3.c:2042:6: warning: Local variable maint_irq_mode shadows outer variable [shadowVar]
    int maint_irq_mode;
        ^
   drivers/irqchip/irq-gic-v3.c:1884:6: note: Shadowed declaration
    int maint_irq_mode;
        ^
   drivers/irqchip/irq-gic-v3.c:2042:6: note: Shadow variable
    int maint_irq_mode;
        ^
>> drivers/gpu/drm/xen/xen_drm_front_cfg.c:76:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
    ret = xen_drm_front_get_edid(front_info, index, pages,
        ^
   drivers/gpu/drm/xen/xen_drm_front_cfg.c:61:0: note: Variable 'ret' is reassigned a value before the old one has been used.
    int i, npages, ret = -ENOMEM;
   ^
   drivers/gpu/drm/xen/xen_drm_front_cfg.c:76:6: note: Variable 'ret' is reassigned a value before the old one has been used.
    ret = xen_drm_front_get_edid(front_info, index, pages,
        ^

vim +/ret +76 drivers/gpu/drm/xen/xen_drm_front_cfg.c

    54	
    55	static void cfg_connector_edid(struct xen_drm_front_info *front_info,
    56				       struct xen_drm_front_cfg_connector *connector,
    57				       int index)
    58	{
    59		struct page **pages;
    60		u32 edid_sz;
    61		int i, npages, ret = -ENOMEM;
    62	
    63		connector->edid = vmalloc(XENDISPL_EDID_MAX_SIZE);
    64		if (!connector->edid)
    65			goto fail;
    66	
    67		npages = DIV_ROUND_UP(XENDISPL_EDID_MAX_SIZE, PAGE_SIZE);
    68		pages = kvmalloc_array(npages, sizeof(struct page *), GFP_KERNEL);
    69		if (!pages)
    70			goto fail_free_edid;
    71	
    72		for (i = 0; i < npages; i++)
    73			pages[i] = vmalloc_to_page((u8 *)connector->edid +
    74						   i * PAGE_SIZE);
    75	
  > 76		ret = xen_drm_front_get_edid(front_info, index, pages,
    77					     XENDISPL_EDID_MAX_SIZE, &edid_sz);
    78	
    79		kvfree(pages);
    80	
    81		if (ret < 0)
    82			goto fail_free_edid;
    83	
    84		ret = -EINVAL;
    85		if (!edid_sz || (edid_sz % EDID_LENGTH))
    86			goto fail_free_edid;
    87	
    88		if (!drm_edid_is_valid(connector->edid))
    89			goto fail_free_edid;
    90	
    91		DRM_INFO("Connector %s: using EDID for configuration, size %d\n",
    92			 connector->xenstore_path, edid_sz);
    93		return;
    94	
    95	fail_free_edid:
    96		cfg_connector_free_edid(connector);
    97	fail:
    98		/*
    99		 * If any error this is not critical as we can still read
   100		 * connector settings from XenStore, so just warn.
   101		 */
   102		DRM_WARN("Connector %s: cannot read or wrong EDID: %d\n",
   103			 connector->xenstore_path, ret);
   104	}
   105	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


      reply index

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 12:51 [PATCH 0/6] Fixes and improvements for Xen pvdrm Oleksandr Andrushchenko
2020-07-31 12:51 ` [PATCH 1/6] xen/gntdev: Fix dmabuf import with non-zero sgt offset Oleksandr Andrushchenko
2020-08-04  6:11   ` Jürgen Groß
2020-08-04  6:34     ` Oleksandr Andrushchenko
2020-07-31 12:51 ` [PATCH 2/6] drm/xen-front: Fix misused IS_ERR_OR_NULL checks Oleksandr Andrushchenko
2020-08-04  6:12   ` Jürgen Groß
2020-08-04  6:35     ` Oleksandr Andrushchenko
2020-08-04  6:39       ` Jürgen Groß
2020-08-06  9:20       ` Dan Carpenter
2020-08-06  9:17   ` Dan Carpenter
2020-07-31 12:51 ` [PATCH 3/6] drm/xen-front: Add YUYV to supported formats Oleksandr Andrushchenko
2020-08-07  9:35   ` Noralf Trønnes
2020-07-31 12:51 ` [PATCH 4/6] xen: Sync up with the canonical protocol definition in Xen Oleksandr Andrushchenko
2020-08-04  6:14   ` Jürgen Groß
2020-07-31 12:51 ` [PATCH 5/6] drm/xen-front: Pass dumb buffer data offset to the backend Oleksandr Andrushchenko
2020-08-07  9:33   ` Noralf Trønnes
2020-07-31 12:51 ` [PATCH 6/6] drm/xen-front: Add support for EDID based configuration Oleksandr Andrushchenko
2020-08-05 14:35   ` 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=202008052221.duhA3v0p%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=andr2000@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jgross@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git