All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Tomer Maimon <tmaimon77@gmail.com>
Cc: kbuild-all@lists.01.org, p.zabel@pengutronix.de,
	robh+dt@kernel.org, mark.rutland@arm.com, yuenn@google.com,
	venture@google.com, benjaminfair@google.com,
	avifishman70@gmail.com, joel@jms.id.au, openbmc@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Tomer Maimon <tmaimon77@gmail.com>
Subject: Re: [PATCH v2 3/3] reset: npcm: add NPCM reset controller driver
Date: Wed, 30 Oct 2019 13:11:21 +0800	[thread overview]
Message-ID: <201910301308.KgCCQSfo%lkp@intel.com> (raw)
In-Reply-To: <20191028155403.134126-4-tmaimon77@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4965 bytes --]

Hi Tomer,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pza/reset/next]
[also build test WARNING on v5.4-rc5 next-20191029]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Tomer-Maimon/reset-npcm-add-NPCM-reset-driver-support/20191030-101136
base:   https://git.pengutronix.de/git/pza/linux reset/next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.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=7.4.0 make.cross ARCH=sparc64 

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers//reset/reset-npcm.c: In function 'npcm_rc_probe':
>> drivers//reset/reset-npcm.c:147:2: warning: 'gcr_regmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
     regmap_read(gcr_regmap, NPCM_MDLR_OFFSET, &mdlr);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers//reset/reset-npcm.c:131:17: note: 'gcr_regmap' was declared here
     struct regmap *gcr_regmap;
                    ^~~~~~~~~~

vim +/gcr_regmap +147 drivers//reset/reset-npcm.c

   122	
   123	/*
   124	 *  The following procedure should be observed in USB PHY, USB device and
   125	 *  USB host initialization at BMC boot
   126	 */
   127	static int npcm_usb_reset(struct platform_device *pdev, struct npcm_rc_data *rc)
   128	{
   129		struct device_node *np = pdev->dev.of_node;
   130		u32 mdlr, iprst1, iprst2, iprst3;
   131		struct regmap *gcr_regmap;
   132		u32 ipsrst1_bits = 0;
   133		u32 ipsrst2_bits = NPCM_IPSRST2_USB_HOST;
   134		u32 ipsrst3_bits = 0;
   135	
   136		if (of_device_is_compatible(np, "nuvoton,npcm750-reset")) {
   137			gcr_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-gcr");
   138			if (IS_ERR(gcr_regmap)) {
   139				dev_err(&pdev->dev, "Failed to find nuvoton,npcm750-gcr\n");
   140				return PTR_ERR(gcr_regmap);
   141			}
   142		}
   143		if (!gcr_regmap)
   144			return -ENXIO;
   145	
   146		/* checking which USB device is enabled */
 > 147		regmap_read(gcr_regmap, NPCM_MDLR_OFFSET, &mdlr);
   148		if (!(mdlr & NPCM_MDLR_USBD0))
   149			ipsrst3_bits |= NPCM_IPSRST3_USBD0;
   150		if (!(mdlr & NPCM_MDLR_USBD1))
   151			ipsrst1_bits |= NPCM_IPSRST1_USBD1;
   152		if (!(mdlr & NPCM_MDLR_USBD2_4))
   153			ipsrst1_bits |= (NPCM_IPSRST1_USBD2 |
   154					 NPCM_IPSRST1_USBD3 |
   155					 NPCM_IPSRST1_USBD4);
   156		if (!(mdlr & NPCM_MDLR_USBD0)) {
   157			ipsrst1_bits |= (NPCM_IPSRST1_USBD5 |
   158					 NPCM_IPSRST1_USBD6);
   159			ipsrst3_bits |= (NPCM_IPSRST3_USBD7 |
   160					 NPCM_IPSRST3_USBD8 |
   161					 NPCM_IPSRST3_USBD9);
   162		}
   163	
   164		/* assert reset USB PHY and USB devices */
   165		iprst1 = readl(rc->base + NPCM_IPSRST1);
   166		iprst2 = readl(rc->base + NPCM_IPSRST2);
   167		iprst3 = readl(rc->base + NPCM_IPSRST3);
   168	
   169		iprst1 |= ipsrst1_bits;
   170		iprst2 |= ipsrst2_bits;
   171		iprst3 |= (ipsrst3_bits | NPCM_IPSRST3_USBPHY1 |
   172			   NPCM_IPSRST3_USBPHY2);
   173	
   174		writel(iprst1, rc->base + NPCM_IPSRST1);
   175		writel(iprst2, rc->base + NPCM_IPSRST2);
   176		writel(iprst3, rc->base + NPCM_IPSRST3);
   177	
   178		/* clear USB PHY RS bit */
   179		regmap_update_bits(gcr_regmap, NPCM_USB1PHYCTL_OFFSET,
   180				   NPCM_USBXPHYCTL_RS, 0);
   181		regmap_update_bits(gcr_regmap, NPCM_USB2PHYCTL_OFFSET,
   182				   NPCM_USBXPHYCTL_RS, 0);
   183	
   184		/* deassert reset USB PHY */
   185		iprst3 &= ~(NPCM_IPSRST3_USBPHY1 | NPCM_IPSRST3_USBPHY2);
   186		writel(iprst3, rc->base + NPCM_IPSRST3);
   187	
   188		udelay(50);
   189	
   190		/* set USB PHY RS bit */
   191		regmap_update_bits(gcr_regmap, NPCM_USB1PHYCTL_OFFSET,
   192				   NPCM_USBXPHYCTL_RS, NPCM_USBXPHYCTL_RS);
   193		regmap_update_bits(gcr_regmap, NPCM_USB2PHYCTL_OFFSET,
   194				   NPCM_USBXPHYCTL_RS, NPCM_USBXPHYCTL_RS);
   195	
   196		/* deassert reset USB devices*/
   197		iprst1 &= ~ipsrst1_bits;
   198		iprst2 &= ~ipsrst2_bits;
   199		iprst3 &= ~ipsrst3_bits;
   200	
   201		writel(iprst1, rc->base + NPCM_IPSRST1);
   202		writel(iprst2, rc->base + NPCM_IPSRST2);
   203		writel(iprst3, rc->base + NPCM_IPSRST3);
   204	
   205		return 0;
   206	}
   207	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59112 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 3/3] reset: npcm: add NPCM reset controller driver
Date: Wed, 30 Oct 2019 13:11:21 +0800	[thread overview]
Message-ID: <201910301308.KgCCQSfo%lkp@intel.com> (raw)
In-Reply-To: <20191028155403.134126-4-tmaimon77@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5093 bytes --]

Hi Tomer,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pza/reset/next]
[also build test WARNING on v5.4-rc5 next-20191029]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Tomer-Maimon/reset-npcm-add-NPCM-reset-driver-support/20191030-101136
base:   https://git.pengutronix.de/git/pza/linux reset/next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.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=7.4.0 make.cross ARCH=sparc64 

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers//reset/reset-npcm.c: In function 'npcm_rc_probe':
>> drivers//reset/reset-npcm.c:147:2: warning: 'gcr_regmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
     regmap_read(gcr_regmap, NPCM_MDLR_OFFSET, &mdlr);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers//reset/reset-npcm.c:131:17: note: 'gcr_regmap' was declared here
     struct regmap *gcr_regmap;
                    ^~~~~~~~~~

vim +/gcr_regmap +147 drivers//reset/reset-npcm.c

   122	
   123	/*
   124	 *  The following procedure should be observed in USB PHY, USB device and
   125	 *  USB host initialization at BMC boot
   126	 */
   127	static int npcm_usb_reset(struct platform_device *pdev, struct npcm_rc_data *rc)
   128	{
   129		struct device_node *np = pdev->dev.of_node;
   130		u32 mdlr, iprst1, iprst2, iprst3;
   131		struct regmap *gcr_regmap;
   132		u32 ipsrst1_bits = 0;
   133		u32 ipsrst2_bits = NPCM_IPSRST2_USB_HOST;
   134		u32 ipsrst3_bits = 0;
   135	
   136		if (of_device_is_compatible(np, "nuvoton,npcm750-reset")) {
   137			gcr_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-gcr");
   138			if (IS_ERR(gcr_regmap)) {
   139				dev_err(&pdev->dev, "Failed to find nuvoton,npcm750-gcr\n");
   140				return PTR_ERR(gcr_regmap);
   141			}
   142		}
   143		if (!gcr_regmap)
   144			return -ENXIO;
   145	
   146		/* checking which USB device is enabled */
 > 147		regmap_read(gcr_regmap, NPCM_MDLR_OFFSET, &mdlr);
   148		if (!(mdlr & NPCM_MDLR_USBD0))
   149			ipsrst3_bits |= NPCM_IPSRST3_USBD0;
   150		if (!(mdlr & NPCM_MDLR_USBD1))
   151			ipsrst1_bits |= NPCM_IPSRST1_USBD1;
   152		if (!(mdlr & NPCM_MDLR_USBD2_4))
   153			ipsrst1_bits |= (NPCM_IPSRST1_USBD2 |
   154					 NPCM_IPSRST1_USBD3 |
   155					 NPCM_IPSRST1_USBD4);
   156		if (!(mdlr & NPCM_MDLR_USBD0)) {
   157			ipsrst1_bits |= (NPCM_IPSRST1_USBD5 |
   158					 NPCM_IPSRST1_USBD6);
   159			ipsrst3_bits |= (NPCM_IPSRST3_USBD7 |
   160					 NPCM_IPSRST3_USBD8 |
   161					 NPCM_IPSRST3_USBD9);
   162		}
   163	
   164		/* assert reset USB PHY and USB devices */
   165		iprst1 = readl(rc->base + NPCM_IPSRST1);
   166		iprst2 = readl(rc->base + NPCM_IPSRST2);
   167		iprst3 = readl(rc->base + NPCM_IPSRST3);
   168	
   169		iprst1 |= ipsrst1_bits;
   170		iprst2 |= ipsrst2_bits;
   171		iprst3 |= (ipsrst3_bits | NPCM_IPSRST3_USBPHY1 |
   172			   NPCM_IPSRST3_USBPHY2);
   173	
   174		writel(iprst1, rc->base + NPCM_IPSRST1);
   175		writel(iprst2, rc->base + NPCM_IPSRST2);
   176		writel(iprst3, rc->base + NPCM_IPSRST3);
   177	
   178		/* clear USB PHY RS bit */
   179		regmap_update_bits(gcr_regmap, NPCM_USB1PHYCTL_OFFSET,
   180				   NPCM_USBXPHYCTL_RS, 0);
   181		regmap_update_bits(gcr_regmap, NPCM_USB2PHYCTL_OFFSET,
   182				   NPCM_USBXPHYCTL_RS, 0);
   183	
   184		/* deassert reset USB PHY */
   185		iprst3 &= ~(NPCM_IPSRST3_USBPHY1 | NPCM_IPSRST3_USBPHY2);
   186		writel(iprst3, rc->base + NPCM_IPSRST3);
   187	
   188		udelay(50);
   189	
   190		/* set USB PHY RS bit */
   191		regmap_update_bits(gcr_regmap, NPCM_USB1PHYCTL_OFFSET,
   192				   NPCM_USBXPHYCTL_RS, NPCM_USBXPHYCTL_RS);
   193		regmap_update_bits(gcr_regmap, NPCM_USB2PHYCTL_OFFSET,
   194				   NPCM_USBXPHYCTL_RS, NPCM_USBXPHYCTL_RS);
   195	
   196		/* deassert reset USB devices*/
   197		iprst1 &= ~ipsrst1_bits;
   198		iprst2 &= ~ipsrst2_bits;
   199		iprst3 &= ~ipsrst3_bits;
   200	
   201		writel(iprst1, rc->base + NPCM_IPSRST1);
   202		writel(iprst2, rc->base + NPCM_IPSRST2);
   203		writel(iprst3, rc->base + NPCM_IPSRST3);
   204	
   205		return 0;
   206	}
   207	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 59112 bytes --]

  parent reply	other threads:[~2019-10-30  5:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 15:54 [PATCH v2 0/3] reset: npcm: add NPCM reset driver support Tomer Maimon
2019-10-28 15:54 ` [PATCH v2 1/3] dt-binding: reset: add NPCM reset controller documentation Tomer Maimon
2019-10-29 15:14   ` Philipp Zabel
2019-10-31 14:18     ` Tomer Maimon
2019-10-28 15:54 ` [PATCH v2 2/3] dt-bindings: reset: Add binding constants for NPCM7xx reset controller Tomer Maimon
2019-10-29 15:15   ` Philipp Zabel
2019-10-28 15:54 ` [PATCH v2 3/3] reset: npcm: add NPCM reset controller driver Tomer Maimon
2019-10-29 15:34   ` Philipp Zabel
2019-10-31 14:14     ` Tomer Maimon
2019-10-30  5:11   ` kbuild test robot [this message]
2019-10-30  5:11     ` kbuild 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=201910301308.KgCCQSfo%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.