Netdev List
 help / color / mirror / Atom feed
* [PATCH] phy: Add helpers for setting/clearing bits in paged registers
@ 2022-09-04 22:55 Olliver Schinagl
  2022-09-05  0:05 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Olliver Schinagl @ 2022-09-04 22:55 UTC (permalink / raw)
  To: netdev, Andrew Lunn
  Cc: inux-kernel, Heiner Kallweit, Russell King, Olliver Schinagl

As we have helpers for setting/clearing bits in PHY registers and MMD
registers, add also helpers to do the same with paged registers.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
---
 include/linux/phy.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 87638c55d844..6f13dc9b4fe5 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1262,6 +1262,32 @@ static inline int phy_clear_bits_mmd(struct phy_device *phydev, int devad,
 	return phy_modify_mmd(phydev, devad, regnum, val, 0);
 }
 
+/**
+ * phy_set_bits_paged - Convenience function for setting bits in a paged register
+ * @phydev: the phy_device struct
+ * @page: the page for the phy
+ * @regnum: register number to write
+ * @val: bits to set
+ */
+static inline int phy_set_bits_paged(struct phy_device *phydev, int page,
+				     u32 regnum, u16 val)
+{
+	return phy_modify_paged(phydev, page, regnum, 0, val);
+}
+
+/**
+ * phy_clear_bits_paged - Convenience function for clearing bits in a paged register
+ * @phydev: the phy_device struct
+ * @page: the page for the phy
+ * @regnum: register number to write
+ * @val: bits to clear
+ */
+static inline int phy_clear_bits_paged(struct phy_device *phydev, int page,
+				       u32 regnum, u16 val)
+{
+	return phy_modify_paged(phydev, page, regnum, val, 0);
+}
+
 /**
  * phy_interrupt_is_valid - Convenience function for testing a given PHY irq
  * @phydev: the phy_device struct
-- 
2.37.2


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

* Re: [PATCH] phy: Add helpers for setting/clearing bits in paged registers
  2022-09-04 22:55 [PATCH] phy: Add helpers for setting/clearing bits in paged registers Olliver Schinagl
@ 2022-09-05  0:05 ` kernel test robot
  2022-09-05  1:18 ` kernel test robot
  2022-09-09  1:33 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-09-05  0:05 UTC (permalink / raw)
  To: Olliver Schinagl, netdev, Andrew Lunn
  Cc: kbuild-all, inux-kernel, Heiner Kallweit, Russell King,
	Olliver Schinagl

Hi Olliver,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.0-rc4 next-20220901]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Olliver-Schinagl/phy-Add-helpers-for-setting-clearing-bits-in-paged-registers/20220905-070318
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e18e42e4b280c85b76967a9106a13ca61c16179
config: arm-randconfig-r032-20220904 (https://download.01.org/0day-ci/archive/20220905/202209050848.JPIiJd7T-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/342260cb7603ad567f4799836ad4ed390ccedf2a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Olliver-Schinagl/phy-Add-helpers-for-setting-clearing-bits-in-paged-registers/20220905-070318
        git checkout 342260cb7603ad567f4799836ad4ed390ccedf2a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/phy/freescale/

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

All errors (new ones prefixed by >>):

   In file included from drivers/phy/freescale/phy-fsl-lynx-28g.c:5:
   include/linux/phy.h: In function 'phy_set_bits_paged':
>> include/linux/phy.h:1275:16: error: implicit declaration of function 'phy_modify_paged'; did you mean 'phy_modify_changed'? [-Werror=implicit-function-declaration]
    1275 |         return phy_modify_paged(phydev, page, regnum, 0, val);
         |                ^~~~~~~~~~~~~~~~
         |                phy_modify_changed
   include/linux/phy.h: At top level:
>> include/linux/phy.h:1447:5: error: conflicting types for 'phy_modify_paged'; have 'int(struct phy_device *, int,  u32,  u16,  u16)' {aka 'int(struct phy_device *, int,  unsigned int,  short unsigned int,  short unsigned int)'}
    1447 | int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
         |     ^~~~~~~~~~~~~~~~
   include/linux/phy.h:1448:22: note: an argument type that has a default promotion cannot match an empty parameter name list declaration
    1448 |                      u16 mask, u16 set);
         |                      ^~~
   include/linux/phy.h:1275:16: note: previous implicit declaration of 'phy_modify_paged' with type 'int()'
    1275 |         return phy_modify_paged(phydev, page, regnum, 0, val);
         |                ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +1275 include/linux/phy.h

  1264	
  1265	/**
  1266	 * phy_set_bits_paged - Convenience function for setting bits in a paged register
  1267	 * @phydev: the phy_device struct
  1268	 * @page: the page for the phy
  1269	 * @regnum: register number to write
  1270	 * @val: bits to set
  1271	 */
  1272	static inline int phy_set_bits_paged(struct phy_device *phydev, int page,
  1273					     u32 regnum, u16 val)
  1274	{
> 1275		return phy_modify_paged(phydev, page, regnum, 0, val);
  1276	}
  1277	
  1278	/**
  1279	 * phy_clear_bits_paged - Convenience function for clearing bits in a paged register
  1280	 * @phydev: the phy_device struct
  1281	 * @page: the page for the phy
  1282	 * @regnum: register number to write
  1283	 * @val: bits to clear
  1284	 */
  1285	static inline int phy_clear_bits_paged(struct phy_device *phydev, int page,
  1286					       u32 regnum, u16 val)
  1287	{
  1288		return phy_modify_paged(phydev, page, regnum, val, 0);
  1289	}
  1290	
  1291	/**
  1292	 * phy_interrupt_is_valid - Convenience function for testing a given PHY irq
  1293	 * @phydev: the phy_device struct
  1294	 *
  1295	 * NOTE: must be kept in sync with addition/removal of PHY_POLL and
  1296	 * PHY_MAC_INTERRUPT
  1297	 */
  1298	static inline bool phy_interrupt_is_valid(struct phy_device *phydev)
  1299	{
  1300		return phydev->irq != PHY_POLL && phydev->irq != PHY_MAC_INTERRUPT;
  1301	}
  1302	
  1303	/**
  1304	 * phy_polling_mode - Convenience function for testing whether polling is
  1305	 * used to detect PHY status changes
  1306	 * @phydev: the phy_device struct
  1307	 */
  1308	static inline bool phy_polling_mode(struct phy_device *phydev)
  1309	{
  1310		if (phydev->state == PHY_CABLETEST)
  1311			if (phydev->drv->flags & PHY_POLL_CABLE_TEST)
  1312				return true;
  1313	
  1314		return phydev->irq == PHY_POLL;
  1315	}
  1316	
  1317	/**
  1318	 * phy_has_hwtstamp - Tests whether a PHY time stamp configuration.
  1319	 * @phydev: the phy_device struct
  1320	 */
  1321	static inline bool phy_has_hwtstamp(struct phy_device *phydev)
  1322	{
  1323		return phydev && phydev->mii_ts && phydev->mii_ts->hwtstamp;
  1324	}
  1325	
  1326	/**
  1327	 * phy_has_rxtstamp - Tests whether a PHY supports receive time stamping.
  1328	 * @phydev: the phy_device struct
  1329	 */
  1330	static inline bool phy_has_rxtstamp(struct phy_device *phydev)
  1331	{
  1332		return phydev && phydev->mii_ts && phydev->mii_ts->rxtstamp;
  1333	}
  1334	
  1335	/**
  1336	 * phy_has_tsinfo - Tests whether a PHY reports time stamping and/or
  1337	 * PTP hardware clock capabilities.
  1338	 * @phydev: the phy_device struct
  1339	 */
  1340	static inline bool phy_has_tsinfo(struct phy_device *phydev)
  1341	{
  1342		return phydev && phydev->mii_ts && phydev->mii_ts->ts_info;
  1343	}
  1344	
  1345	/**
  1346	 * phy_has_txtstamp - Tests whether a PHY supports transmit time stamping.
  1347	 * @phydev: the phy_device struct
  1348	 */
  1349	static inline bool phy_has_txtstamp(struct phy_device *phydev)
  1350	{
  1351		return phydev && phydev->mii_ts && phydev->mii_ts->txtstamp;
  1352	}
  1353	
  1354	static inline int phy_hwtstamp(struct phy_device *phydev, struct ifreq *ifr)
  1355	{
  1356		return phydev->mii_ts->hwtstamp(phydev->mii_ts, ifr);
  1357	}
  1358	
  1359	static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb,
  1360					int type)
  1361	{
  1362		return phydev->mii_ts->rxtstamp(phydev->mii_ts, skb, type);
  1363	}
  1364	
  1365	static inline int phy_ts_info(struct phy_device *phydev,
  1366				      struct ethtool_ts_info *tsinfo)
  1367	{
  1368		return phydev->mii_ts->ts_info(phydev->mii_ts, tsinfo);
  1369	}
  1370	
  1371	static inline void phy_txtstamp(struct phy_device *phydev, struct sk_buff *skb,
  1372					int type)
  1373	{
  1374		phydev->mii_ts->txtstamp(phydev->mii_ts, skb, type);
  1375	}
  1376	
  1377	/**
  1378	 * phy_is_internal - Convenience function for testing if a PHY is internal
  1379	 * @phydev: the phy_device struct
  1380	 */
  1381	static inline bool phy_is_internal(struct phy_device *phydev)
  1382	{
  1383		return phydev->is_internal;
  1384	}
  1385	
  1386	/**
  1387	 * phy_on_sfp - Convenience function for testing if a PHY is on an SFP module
  1388	 * @phydev: the phy_device struct
  1389	 */
  1390	static inline bool phy_on_sfp(struct phy_device *phydev)
  1391	{
  1392		return phydev->is_on_sfp_module;
  1393	}
  1394	
  1395	/**
  1396	 * phy_interface_mode_is_rgmii - Convenience function for testing if a
  1397	 * PHY interface mode is RGMII (all variants)
  1398	 * @mode: the &phy_interface_t enum
  1399	 */
  1400	static inline bool phy_interface_mode_is_rgmii(phy_interface_t mode)
  1401	{
  1402		return mode >= PHY_INTERFACE_MODE_RGMII &&
  1403			mode <= PHY_INTERFACE_MODE_RGMII_TXID;
  1404	};
  1405	
  1406	/**
  1407	 * phy_interface_mode_is_8023z() - does the PHY interface mode use 802.3z
  1408	 *   negotiation
  1409	 * @mode: one of &enum phy_interface_t
  1410	 *
  1411	 * Returns true if the PHY interface mode uses the 16-bit negotiation
  1412	 * word as defined in 802.3z. (See 802.3-2015 37.2.1 Config_Reg encoding)
  1413	 */
  1414	static inline bool phy_interface_mode_is_8023z(phy_interface_t mode)
  1415	{
  1416		return mode == PHY_INTERFACE_MODE_1000BASEX ||
  1417		       mode == PHY_INTERFACE_MODE_2500BASEX;
  1418	}
  1419	
  1420	/**
  1421	 * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
  1422	 * is RGMII (all variants)
  1423	 * @phydev: the phy_device struct
  1424	 */
  1425	static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
  1426	{
  1427		return phy_interface_mode_is_rgmii(phydev->interface);
  1428	};
  1429	
  1430	/**
  1431	 * phy_is_pseudo_fixed_link - Convenience function for testing if this
  1432	 * PHY is the CPU port facing side of an Ethernet switch, or similar.
  1433	 * @phydev: the phy_device struct
  1434	 */
  1435	static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev)
  1436	{
  1437		return phydev->is_pseudo_fixed_link;
  1438	}
  1439	
  1440	int phy_save_page(struct phy_device *phydev);
  1441	int phy_select_page(struct phy_device *phydev, int page);
  1442	int phy_restore_page(struct phy_device *phydev, int oldpage, int ret);
  1443	int phy_read_paged(struct phy_device *phydev, int page, u32 regnum);
  1444	int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
  1445	int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum,
  1446				     u16 mask, u16 set);
> 1447	int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
  1448			     u16 mask, u16 set);
  1449	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: [PATCH] phy: Add helpers for setting/clearing bits in paged registers
  2022-09-04 22:55 [PATCH] phy: Add helpers for setting/clearing bits in paged registers Olliver Schinagl
  2022-09-05  0:05 ` kernel test robot
@ 2022-09-05  1:18 ` kernel test robot
  2022-09-09  1:33 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-09-05  1:18 UTC (permalink / raw)
  To: Olliver Schinagl, netdev, Andrew Lunn
  Cc: llvm, kbuild-all, inux-kernel, Heiner Kallweit, Russell King,
	Olliver Schinagl

Hi Olliver,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.0-rc4 next-20220901]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Olliver-Schinagl/phy-Add-helpers-for-setting-clearing-bits-in-paged-registers/20220905-070318
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e18e42e4b280c85b76967a9106a13ca61c16179
config: hexagon-randconfig-r045-20220905 (https://download.01.org/0day-ci/archive/20220905/202209050910.t87wLY38-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/342260cb7603ad567f4799836ad4ed390ccedf2a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Olliver-Schinagl/phy-Add-helpers-for-setting-clearing-bits-in-paged-registers/20220905-070318
        git checkout 342260cb7603ad567f4799836ad4ed390ccedf2a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/phy/microchip/

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

All errors (new ones prefixed by >>):

   In file included from drivers/phy/microchip/lan966x_serdes.c:7:
>> include/linux/phy.h:1275:9: error: call to undeclared function 'phy_modify_paged'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return phy_modify_paged(phydev, page, regnum, 0, val);
                  ^
   include/linux/phy.h:1275:9: note: did you mean 'phy_modify_changed'?
   include/linux/phy.h:1142:5: note: 'phy_modify_changed' declared here
   int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
       ^
   include/linux/phy.h:1288:9: error: call to undeclared function 'phy_modify_paged'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return phy_modify_paged(phydev, page, regnum, val, 0);
                  ^
   include/linux/phy.h:1447:5: error: conflicting types for 'phy_modify_paged'
   int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
       ^
   include/linux/phy.h:1275:9: note: previous implicit declaration is here
           return phy_modify_paged(phydev, page, regnum, 0, val);
                  ^
   3 errors generated.


vim +/phy_modify_paged +1275 include/linux/phy.h

  1264	
  1265	/**
  1266	 * phy_set_bits_paged - Convenience function for setting bits in a paged register
  1267	 * @phydev: the phy_device struct
  1268	 * @page: the page for the phy
  1269	 * @regnum: register number to write
  1270	 * @val: bits to set
  1271	 */
  1272	static inline int phy_set_bits_paged(struct phy_device *phydev, int page,
  1273					     u32 regnum, u16 val)
  1274	{
> 1275		return phy_modify_paged(phydev, page, regnum, 0, val);
  1276	}
  1277	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: [PATCH] phy: Add helpers for setting/clearing bits in paged registers
  2022-09-04 22:55 [PATCH] phy: Add helpers for setting/clearing bits in paged registers Olliver Schinagl
  2022-09-05  0:05 ` kernel test robot
  2022-09-05  1:18 ` kernel test robot
@ 2022-09-09  1:33 ` kernel test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-09-09  1:33 UTC (permalink / raw)
  To: Olliver Schinagl, netdev, Andrew Lunn
  Cc: llvm, kbuild-all, inux-kernel, Heiner Kallweit, Russell King,
	Olliver Schinagl

Hi Olliver,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.0-rc4 next-20220908]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Olliver-Schinagl/phy-Add-helpers-for-setting-clearing-bits-in-paged-registers/20220905-070318
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e18e42e4b280c85b76967a9106a13ca61c16179
config: arm64-randconfig-r016-20220907 (https://download.01.org/0day-ci/archive/20220909/202209090938.3xBYyNyf-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 1546df49f5a6d09df78f569e4137ddb365a3e827)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/342260cb7603ad567f4799836ad4ed390ccedf2a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Olliver-Schinagl/phy-Add-helpers-for-setting-clearing-bits-in-paged-registers/20220905-070318
        git checkout 342260cb7603ad567f4799836ad4ed390ccedf2a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/

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

All warnings (new ones prefixed by >>):

   In file included from drivers/net/ethernet/stmicro/stmmac/enh_desc.c:11:
   In file included from include/linux/stmmac.h:16:
   include/linux/phy.h:1275:9: error: call to undeclared function 'phy_modify_paged'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return phy_modify_paged(phydev, page, regnum, 0, val);
                  ^
   include/linux/phy.h:1275:9: note: did you mean 'phy_modify_changed'?
   include/linux/phy.h:1142:5: note: 'phy_modify_changed' declared here
   int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
       ^
   include/linux/phy.h:1288:9: error: call to undeclared function 'phy_modify_paged'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return phy_modify_paged(phydev, page, regnum, val, 0);
                  ^
   include/linux/phy.h:1447:5: error: conflicting types for 'phy_modify_paged'
   int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
       ^
   include/linux/phy.h:1275:9: note: previous implicit declaration is here
           return phy_modify_paged(phydev, page, regnum, 0, val);
                  ^
   In file included from drivers/net/ethernet/stmicro/stmmac/enh_desc.c:13:
>> drivers/net/ethernet/stmicro/stmmac/descs_com.h:39:26: warning: implicit conversion from 'unsigned long' to '__u32' (aka 'unsigned int') changes value from 18446744073707454463 to 4292870143 [-Wconstant-conversion]
                   p->des0 &= cpu_to_le32(~ETDES0_END_RING);
                              ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
   include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
   #define cpu_to_le32 __cpu_to_le32
                       ^
   include/uapi/linux/byteorder/big_endian.h:34:53: note: expanded from macro '__cpu_to_le32'
   #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
                                             ~~~~~~~~~~^~~
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
           ~~~~~~~~~ ^
   In file included from drivers/net/ethernet/stmicro/stmmac/enh_desc.c:13:
   drivers/net/ethernet/stmicro/stmmac/descs_com.h:73:26: warning: implicit conversion from 'unsigned long' to '__u32' (aka 'unsigned int') changes value from 18446744073675997183 to 4261412863 [-Wconstant-conversion]
                   p->des1 &= cpu_to_le32(~TDES1_END_RING);
                              ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
   #define cpu_to_le32 __cpu_to_le32
                       ^
   include/uapi/linux/byteorder/big_endian.h:34:53: note: expanded from macro '__cpu_to_le32'
   #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
                                             ~~~~~~~~~~^~~
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
           ~~~~~~~~~ ^
   2 warnings and 3 errors generated.
--
   In file included from drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:11:
   In file included from include/linux/stmmac.h:16:
   include/linux/phy.h:1275:9: error: call to undeclared function 'phy_modify_paged'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return phy_modify_paged(phydev, page, regnum, 0, val);
                  ^
   include/linux/phy.h:1275:9: note: did you mean 'phy_modify_changed'?
   include/linux/phy.h:1142:5: note: 'phy_modify_changed' declared here
   int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
       ^
   include/linux/phy.h:1288:9: error: call to undeclared function 'phy_modify_paged'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return phy_modify_paged(phydev, page, regnum, val, 0);
                  ^
   include/linux/phy.h:1447:5: error: conflicting types for 'phy_modify_paged'
   int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
       ^
   include/linux/phy.h:1275:9: note: previous implicit declaration is here
           return phy_modify_paged(phydev, page, regnum, 0, val);
                  ^
>> drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:541:26: warning: implicit conversion from 'unsigned long' to '__u32' (aka 'unsigned int') changes value from 18446744073675997183 to 4261412863 [-Wconstant-conversion]
                   p->des3 &= cpu_to_le32(~RDES3_BUFFER2_VALID_ADDR);
                              ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
   #define cpu_to_le32 __cpu_to_le32
                       ^
   include/uapi/linux/byteorder/big_endian.h:34:53: note: expanded from macro '__cpu_to_le32'
   #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
                                             ~~~~~~~~~~^~~
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
           ~~~~~~~~~ ^
   1 warning and 3 errors generated.


vim +39 drivers/net/ethernet/stmicro/stmmac/descs_com.h

286a837217204b Giuseppe CAVALLARO 2011-10-18  33  
293e4365a1adb1 Giuseppe Cavallaro 2016-02-29  34  static inline void enh_desc_end_tx_desc_on_ring(struct dma_desc *p, int end)
286a837217204b Giuseppe CAVALLARO 2011-10-18  35  {
293e4365a1adb1 Giuseppe Cavallaro 2016-02-29  36  	if (end)
f8be0d78be6e7f Michael Weiser     2016-11-14  37  		p->des0 |= cpu_to_le32(ETDES0_END_RING);
293e4365a1adb1 Giuseppe Cavallaro 2016-02-29  38  	else
f8be0d78be6e7f Michael Weiser     2016-11-14 @39  		p->des0 &= cpu_to_le32(~ETDES0_END_RING);
286a837217204b Giuseppe CAVALLARO 2011-10-18  40  }
286a837217204b Giuseppe CAVALLARO 2011-10-18  41  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

end of thread, other threads:[~2022-09-09  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-04 22:55 [PATCH] phy: Add helpers for setting/clearing bits in paged registers Olliver Schinagl
2022-09-05  0:05 ` kernel test robot
2022-09-05  1:18 ` kernel test robot
2022-09-09  1:33 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox