[PATCH net-next v3 02/10] net: stmmac: Add support for Allwinner A523 GMAC200

kernel test robot lkp at intel.com
Sat Sep 6 14:15:57 PDT 2025


Hi Chen-Yu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Chen-Yu-Tsai/dt-bindings-net-sun8i-emac-Add-A523-GMAC200-compatible/20250906-121610
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250906041333.642483-3-wens%40kernel.org
patch subject: [PATCH net-next v3 02/10] net: stmmac: Add support for Allwinner A523 GMAC200
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20250907/202509070456.CKA8CXUt-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250907/202509070456.CKA8CXUt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509070456.CKA8CXUt-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c: In function 'sun55i_gmac200_set_syscon':
>> drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c:60:89: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
      60 |                                              "TX clock delay exceeds maximum (%d00ps > %d00ps)\n",
         |                                                                                        ~^
         |                                                                                         |
         |                                                                                         int
         |                                                                                        %ld
   drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c:74:89: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
      74 |                                              "RX clock delay exceeds maximum (%d00ps > %d00ps)\n",
         |                                                                                        ~^
         |                                                                                         |
         |                                                                                         int
         |                                                                                        %ld


vim +60 drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c

    39	
    40	static int sun55i_gmac200_set_syscon(struct device *dev,
    41					     struct plat_stmmacenet_data *plat)
    42	{
    43		struct device_node *node = dev->of_node;
    44		struct regmap *regmap;
    45		u32 val, reg = 0;
    46		int ret;
    47	
    48		regmap = syscon_regmap_lookup_by_phandle(node, "syscon");
    49		if (IS_ERR(regmap))
    50			return dev_err_probe(dev, PTR_ERR(regmap), "Unable to map syscon\n");
    51	
    52		if (!of_property_read_u32(node, "tx-internal-delay-ps", &val)) {
    53			if (val % 100)
    54				return dev_err_probe(dev, -EINVAL,
    55						     "tx-delay must be a multiple of 100ps\n");
    56			val /= 100;
    57			dev_dbg(dev, "set tx-delay to %x\n", val);
    58			if (!FIELD_FIT(SYSCON_ETXDC_MASK, val))
    59				return dev_err_probe(dev, -EINVAL,
  > 60						     "TX clock delay exceeds maximum (%d00ps > %d00ps)\n",
    61						     val, FIELD_MAX(SYSCON_ETXDC_MASK));
    62	
    63			reg |= FIELD_PREP(SYSCON_ETXDC_MASK, val);
    64		}
    65	
    66		if (!of_property_read_u32(node, "rx-internal-delay-ps", &val)) {
    67			if (val % 100)
    68				return dev_err_probe(dev, -EINVAL,
    69						     "rx-delay must be a multiple of 100ps\n");
    70			val /= 100;
    71			dev_dbg(dev, "set rx-delay to %x\n", val);
    72			if (!FIELD_FIT(SYSCON_ERXDC_MASK, val))
    73				return dev_err_probe(dev, -EINVAL,
    74						     "RX clock delay exceeds maximum (%d00ps > %d00ps)\n",
    75						     val, FIELD_MAX(SYSCON_ERXDC_MASK));
    76	
    77			reg |= FIELD_PREP(SYSCON_ERXDC_MASK, val);
    78		}
    79	
    80		switch (plat->mac_interface) {
    81		case PHY_INTERFACE_MODE_MII:
    82			/* default */
    83			break;
    84		case PHY_INTERFACE_MODE_RGMII:
    85		case PHY_INTERFACE_MODE_RGMII_ID:
    86		case PHY_INTERFACE_MODE_RGMII_RXID:
    87		case PHY_INTERFACE_MODE_RGMII_TXID:
    88			reg |= SYSCON_EPIT | SYSCON_ETCS_INT_GMII;
    89			break;
    90		case PHY_INTERFACE_MODE_RMII:
    91			reg |= SYSCON_RMII_EN;
    92			break;
    93		default:
    94			return dev_err_probe(dev, -EINVAL, "Unsupported interface mode: %s",
    95					     phy_modes(plat->mac_interface));
    96		}
    97	
    98		ret = regmap_write(regmap, SYSCON_REG, reg);
    99		if (ret < 0)
   100			return dev_err_probe(dev, ret, "Failed to write to syscon\n");
   101	
   102		return 0;
   103	}
   104	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the linux-arm-kernel mailing list