All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:pending-fixes 371/429] drivers/phy/broadcom/phy-brcm-sata.c:542:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Fri, 21 Feb 2020 14:03:15 +0530	[thread overview]
Message-ID: <167c2cd7-2771-e138-7162-fab697f46486@ti.com> (raw)
In-Reply-To: <8bc435b6-9819-ff5e-00a3-8b406d88ace2@gmail.com>

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



On 21/02/20 9:34 am, Florian Fainelli wrote:
> Hi Kishon,
> 
> On 2/20/2020 5:14 PM, kbuild test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
>> head:   943e218edd5a2125dc1bc50877b6447e4e15a021
>> commit: b063826de7f1340a0929d9061f0f225c606489f5 [371/429] phy: brcm-sata: Correct MDIO operations for 40nm platforms
>> reproduce:
>>         # apt-get install sparse
>>         # sparse version: v0.6.1-166-g7e4a5b6f-dirty
>>         git checkout b063826de7f1340a0929d9061f0f225c606489f5
>>         make ARCH=x86_64 allmodconfig
>>         make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>>
>> sparse warnings: (new ones prefixed by >>)
> 
> Looks like I missed converting brcm_sr_sata_init() somehow, I will be
> sending you a v2 patch shortly, sorry about that.

No problem. Merged the v2 patch now.

Thanks
Kishon
> 
>>
>>>> drivers/phy/broadcom/phy-brcm-sata.c:542:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>>> drivers/phy/broadcom/phy-brcm-sata.c:542:26: sparse:    expected struct brcm_sata_port *port
>>>> drivers/phy/broadcom/phy-brcm-sata.c:542:26: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:544:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:544:26: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:544:26: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:546:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:546:26: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:546:26: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:550:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:550:26: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:550:26: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:555:40: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:555:40: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:555:40: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:570:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:570:26: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:570:26: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:578:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:578:26: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:578:26: sparse:    got void [noderef] <asn:2> *base
>>    drivers/phy/broadcom/phy-brcm-sata.c:582:26: sparse: sparse: incorrect type in argument 1 (different address spaces)
>>    drivers/phy/broadcom/phy-brcm-sata.c:582:26: sparse:    expected struct brcm_sata_port *port
>>    drivers/phy/broadcom/phy-brcm-sata.c:582:26: sparse:    got void [noderef] <asn:2> *base
>>
>> vim +542 drivers/phy/broadcom/phy-brcm-sata.c
>>
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  532  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  533  static int brcm_sr_sata_init(struct brcm_sata_port *port)
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  534  {
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  535  	struct brcm_sata_phy *priv = port->phy_priv;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  536  	struct device *dev = port->phy_priv->dev;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  537  	void __iomem *base = priv->phy_base;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  538  	unsigned int val, try;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  539  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  540  	/* Configure PHY PLL register bank 1 */
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  541  	val = SR_PLL1_ACTRL2_MAGIC;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08 @542  	brcm_sata_phy_wr(base, PLL1_REG_BANK, PLL1_ACTRL2, 0x0, val);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  543  	val = SR_PLL1_ACTRL3_MAGIC;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  544  	brcm_sata_phy_wr(base, PLL1_REG_BANK, PLL1_ACTRL3, 0x0, val);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  545  	val = SR_PLL1_ACTRL4_MAGIC;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  546  	brcm_sata_phy_wr(base, PLL1_REG_BANK, PLL1_ACTRL4, 0x0, val);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  547  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  548  	/* Configure PHY PLL register bank 0 */
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  549  	val = SR_PLL0_ACTRL6_MAGIC;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  550  	brcm_sata_phy_wr(base, PLL_REG_BANK_0, PLL_ACTRL6, 0x0, val);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  551  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  552  	/* Wait for PHY PLL lock by polling pll_lock bit */
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  553  	try = 50;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  554  	do {
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  555  		val = brcm_sata_phy_rd(base, BLOCK0_REG_BANK,
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  556  					BLOCK0_XGXSSTATUS);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  557  		if (val & BLOCK0_XGXSSTATUS_PLL_LOCK)
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  558  			break;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  559  		msleep(20);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  560  		try--;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  561  	} while (try);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  562  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  563  	if ((val & BLOCK0_XGXSSTATUS_PLL_LOCK) == 0) {
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  564  		/* PLL did not lock; give up */
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  565  		dev_err(dev, "port%d PLL did not lock\n", port->portnum);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  566  		return -ETIMEDOUT;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  567  	}
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  568  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  569  	/* Invert Tx polarity */
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  570  	brcm_sata_phy_wr(base, TX_REG_BANK, TX_ACTRL0,
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  571  			 ~TX_ACTRL0_TXPOL_FLIP, TX_ACTRL0_TXPOL_FLIP);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  572  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  573  	/* Configure OOB control to handle 100MHz reference clock */
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  574  	val = ((0xc << OOB_CTRL1_BURST_MAX_SHIFT) |
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  575  		(0x4 << OOB_CTRL1_BURST_MIN_SHIFT) |
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  576  		(0x8 << OOB_CTRL1_WAKE_IDLE_MAX_SHIFT) |
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  577  		(0x3 << OOB_CTRL1_WAKE_IDLE_MIN_SHIFT));
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  578  	brcm_sata_phy_wr(base, OOB_REG_BANK, OOB_CTRL1, 0x0, val);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  579  	val = ((0x1b << OOB_CTRL2_RESET_IDLE_MAX_SHIFT) |
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  580  		(0x2 << OOB_CTRL2_BURST_CNT_SHIFT) |
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  581  		(0x9 << OOB_CTRL2_RESET_IDLE_MIN_SHIFT));
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  582  	brcm_sata_phy_wr(base, OOB_REG_BANK, OOB_CTRL2, 0x0, val);
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  583  
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  584  	return 0;
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  585  }
>> 80886f7c698fd6 Srinath Mannam 2017-06-08  586  
>>
>> :::::: The code at line 542 was first introduced by commit
>> :::::: 80886f7c698fd64366a6eced011ec82f4daf968b phy: Add stingray SATA phy support
>>
>> :::::: TO: Srinath Mannam <srinath.mannam@broadcom.com>
>> :::::: CC: Kishon Vijay Abraham I <kishon@ti.com>
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>>
> 

      reply	other threads:[~2020-02-21  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  1:14 [linux-next:pending-fixes 371/429] drivers/phy/broadcom/phy-brcm-sata.c:542:26: sparse: sparse: incorrect type in argument 1 (different address spaces) kbuild test robot
2020-02-21  4:04 ` Florian Fainelli
2020-02-21  8:33   ` Kishon Vijay Abraham I [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=167c2cd7-2771-e138-7162-fab697f46486@ti.com \
    --to=kishon@ti.com \
    --cc=kbuild-all@lists.01.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
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.