All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC PATCH net-next v3 05/20] net: dsa: qca8k: handle error with qca8k_read operation
@ 2021-05-05  6:26 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-05-05  6:26 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210504222915.17206-5-ansuelsmth@gmail.com>
References: <20210504222915.17206-5-ansuelsmth@gmail.com>
TO: Ansuel Smith <ansuelsmth@gmail.com>

Hi Ansuel,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on robh/for-next]
[also build test WARNING on v5.12]
[cannot apply to net-next/master net/master linus/master next-20210505]
[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/Ansuel-Smith/net-mdio-ipq8064-clean-whitespaces-in-define/20210505-063401
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

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


cocci warnings: (new ones prefixed by >>)
>> drivers/net/dsa/qca8k.c:496:2-8: preceding lock on line 489
   drivers/net/dsa/qca8k.c:529:2-8: preceding lock on line 522

vim +496 drivers/net/dsa/qca8k.c

69462fe6a39048 Jonathan McDowell 2020-08-01  475  
69462fe6a39048 Jonathan McDowell 2020-08-01  476  static int
69462fe6a39048 Jonathan McDowell 2020-08-01  477  qca8k_vlan_add(struct qca8k_priv *priv, u8 port, u16 vid, bool untagged)
69462fe6a39048 Jonathan McDowell 2020-08-01  478  {
69462fe6a39048 Jonathan McDowell 2020-08-01  479  	u32 reg;
69462fe6a39048 Jonathan McDowell 2020-08-01  480  	int ret;
69462fe6a39048 Jonathan McDowell 2020-08-01  481  
69462fe6a39048 Jonathan McDowell 2020-08-01  482  	/*
69462fe6a39048 Jonathan McDowell 2020-08-01  483  	   We do the right thing with VLAN 0 and treat it as untagged while
69462fe6a39048 Jonathan McDowell 2020-08-01  484  	   preserving the tag on egress.
69462fe6a39048 Jonathan McDowell 2020-08-01  485  	 */
69462fe6a39048 Jonathan McDowell 2020-08-01  486  	if (vid == 0)
69462fe6a39048 Jonathan McDowell 2020-08-01  487  		return 0;
69462fe6a39048 Jonathan McDowell 2020-08-01  488  
69462fe6a39048 Jonathan McDowell 2020-08-01 @489  	mutex_lock(&priv->reg_mutex);
69462fe6a39048 Jonathan McDowell 2020-08-01  490  	ret = qca8k_vlan_access(priv, QCA8K_VLAN_READ, vid);
69462fe6a39048 Jonathan McDowell 2020-08-01  491  	if (ret < 0)
69462fe6a39048 Jonathan McDowell 2020-08-01  492  		goto out;
69462fe6a39048 Jonathan McDowell 2020-08-01  493  
69462fe6a39048 Jonathan McDowell 2020-08-01  494  	reg = qca8k_read(priv, QCA8K_REG_VTU_FUNC0);
e0bc1bb1e57e47 Ansuel Smith      2021-05-05  495  	if (reg < 0)
e0bc1bb1e57e47 Ansuel Smith      2021-05-05 @496  		return reg;
69462fe6a39048 Jonathan McDowell 2020-08-01  497  	reg |= QCA8K_VTU_FUNC0_VALID | QCA8K_VTU_FUNC0_IVL_EN;
69462fe6a39048 Jonathan McDowell 2020-08-01  498  	reg &= ~(QCA8K_VTU_FUNC0_EG_MODE_MASK << QCA8K_VTU_FUNC0_EG_MODE_S(port));
69462fe6a39048 Jonathan McDowell 2020-08-01  499  	if (untagged)
69462fe6a39048 Jonathan McDowell 2020-08-01  500  		reg |= QCA8K_VTU_FUNC0_EG_MODE_UNTAG <<
69462fe6a39048 Jonathan McDowell 2020-08-01  501  				QCA8K_VTU_FUNC0_EG_MODE_S(port);
69462fe6a39048 Jonathan McDowell 2020-08-01  502  	else
69462fe6a39048 Jonathan McDowell 2020-08-01  503  		reg |= QCA8K_VTU_FUNC0_EG_MODE_TAG <<
69462fe6a39048 Jonathan McDowell 2020-08-01  504  				QCA8K_VTU_FUNC0_EG_MODE_S(port);
69462fe6a39048 Jonathan McDowell 2020-08-01  505  
69462fe6a39048 Jonathan McDowell 2020-08-01  506  	qca8k_write(priv, QCA8K_REG_VTU_FUNC0, reg);
69462fe6a39048 Jonathan McDowell 2020-08-01  507  	ret = qca8k_vlan_access(priv, QCA8K_VLAN_LOAD, vid);
69462fe6a39048 Jonathan McDowell 2020-08-01  508  
69462fe6a39048 Jonathan McDowell 2020-08-01  509  out:
69462fe6a39048 Jonathan McDowell 2020-08-01  510  	mutex_unlock(&priv->reg_mutex);
69462fe6a39048 Jonathan McDowell 2020-08-01  511  
69462fe6a39048 Jonathan McDowell 2020-08-01  512  	return ret;
69462fe6a39048 Jonathan McDowell 2020-08-01  513  }
69462fe6a39048 Jonathan McDowell 2020-08-01  514  

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [RFC PATCH net-next v3 01/20] net: mdio: ipq8064: clean whitespaces in define
@ 2021-05-04 22:28 Ansuel Smith
  2021-05-04 22:28 ` [RFC PATCH net-next v3 05/20] net: dsa: qca8k: handle error with qca8k_read operation Ansuel Smith
  0 siblings, 1 reply; 4+ messages in thread
From: Ansuel Smith @ 2021-05-04 22:28 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Ansuel Smith, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Jakub Kicinski, netdev, linux-kernel

Fix mixed whitespace and tab for define spacing.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 drivers/net/mdio/mdio-ipq8064.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mdio/mdio-ipq8064.c b/drivers/net/mdio/mdio-ipq8064.c
index 1bd18857e1c5..fb1614242e13 100644
--- a/drivers/net/mdio/mdio-ipq8064.c
+++ b/drivers/net/mdio/mdio-ipq8064.c
@@ -15,25 +15,26 @@
 #include <linux/mfd/syscon.h>
 
 /* MII address register definitions */
-#define MII_ADDR_REG_ADDR                       0x10
-#define MII_BUSY                                BIT(0)
-#define MII_WRITE                               BIT(1)
-#define MII_CLKRANGE_60_100M                    (0 << 2)
-#define MII_CLKRANGE_100_150M                   (1 << 2)
-#define MII_CLKRANGE_20_35M                     (2 << 2)
-#define MII_CLKRANGE_35_60M                     (3 << 2)
-#define MII_CLKRANGE_150_250M                   (4 << 2)
-#define MII_CLKRANGE_250_300M                   (5 << 2)
+#define MII_ADDR_REG_ADDR			0x10
+#define MII_BUSY				BIT(0)
+#define MII_WRITE				BIT(1)
+#define MII_CLKRANGE(x)				((x) << 2)
+#define MII_CLKRANGE_60_100M			MII_CLKRANGE(0)
+#define MII_CLKRANGE_100_150M			MII_CLKRANGE(1)
+#define MII_CLKRANGE_20_35M			MII_CLKRANGE(2)
+#define MII_CLKRANGE_35_60M			MII_CLKRANGE(3)
+#define MII_CLKRANGE_150_250M			MII_CLKRANGE(4)
+#define MII_CLKRANGE_250_300M			MII_CLKRANGE(5)
 #define MII_CLKRANGE_MASK			GENMASK(4, 2)
 #define MII_REG_SHIFT				6
 #define MII_REG_MASK				GENMASK(10, 6)
 #define MII_ADDR_SHIFT				11
 #define MII_ADDR_MASK				GENMASK(15, 11)
 
-#define MII_DATA_REG_ADDR                       0x14
+#define MII_DATA_REG_ADDR			0x14
 
-#define MII_MDIO_DELAY_USEC                     (1000)
-#define MII_MDIO_RETRY_MSEC                     (10)
+#define MII_MDIO_DELAY_USEC			(1000)
+#define MII_MDIO_RETRY_MSEC			(10)
 
 struct ipq8064_mdio {
 	struct regmap *base; /* NSS_GMAC0_BASE */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-05  6:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05  6:26 [RFC PATCH net-next v3 05/20] net: dsa: qca8k: handle error with qca8k_read operation kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-05-04 22:28 [RFC PATCH net-next v3 01/20] net: mdio: ipq8064: clean whitespaces in define Ansuel Smith
2021-05-04 22:28 ` [RFC PATCH net-next v3 05/20] net: dsa: qca8k: handle error with qca8k_read operation Ansuel Smith
2021-05-05  0:36   ` Andrew Lunn
2021-05-05  0:44     ` Ansuel Smith

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.