Re: [PATCH net-next 14/15] net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver

kernel test robot
2025-11-19T11:20:41Z

Hi Vladimir,

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/Vladimir-Oltean/net-dsa-sja1105-let-phylink-help-with-the-replay-of-link-callbacks/20251119-031300
base: net-next/main
patch link: https://lore.kernel.org/r/20251118190530.580267-15-vladimir.oltean%40nxp.com
patch subject: [PATCH net-next 14/15] net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20251119/202511191835.rwfD48SW-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/20251119/202511191835.rwfD48SW-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511191835.rwfD48SW-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/net/dsa/sja1105/sja1105_mfd.c: In function 'sja1105_create_pcs_nodes':
>> drivers/net/dsa/sja1105/sja1105_mfd.c:145:73: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
145 | snprintf(node_name, sizeof(node_name), "ethernet-pcs@%llx",
| ~~~^
| |
| long long unsigned int
| %x
146 | pcs_res->res.start);
| ~~~~~~~~~~~~~~~~~~
| |
| resource_size_t {aka unsigned int}

vim +145 drivers/net/dsa/sja1105/sja1105_mfd.c

124
125 static int sja1105_create_pcs_nodes(struct sja1105_private *priv,
126 struct device_node *regs_node)
127 {
128 struct dsa_switch *ds = priv->ds;
129 struct device *dev = ds->dev;
130 struct device_node *pcs_node;
131 const u32 reg_io_width = 4;
132 char node_name[32];
133 u32 reg_props[2];
134 int rc;
135
136 for (int i = 0; i < priv->info->num_pcs_resources; i++) {
137 const struct sja1105_pcs_resource *pcs_res;
138
139 pcs_res = &priv->info->pcs_resources[i];
140
141 if (sja1105_child_node_exists(regs_node, "ethernet-pcs",
142 &pcs_res->res))
143 continue;
144
> 145 snprintf(node_name, sizeof(node_name), "ethernet-pcs@%llx",
146 pcs_res->res.start);
147
148 pcs_node = of_changeset_create_node(&priv->of_cs, regs_node,
149 node_name);
150 if (!pcs_node) {
151 dev_err(dev, "Failed to create PCS node %s\n", node_name);
152 return -ENOMEM;
153 }
154
155 rc = of_changeset_add_prop_string(&priv->of_cs, pcs_node,
156 "compatible",
157 pcs_res->compatible);
158 if (rc) {
159 dev_err(dev, "Failed to add compatible property to %s: %pe\n",
160 node_name, ERR_PTR(rc));
161 return rc;
162 }
163
164 reg_props[0] = pcs_res->res.start;
165 reg_props[1] = resource_size(&pcs_res->res);
166 rc = of_changeset_add_prop_u32_array(&priv->of_cs, pcs_node,
167 "reg", reg_props, 2);
168 if (rc) {
169 dev_err(dev, "Failed to add reg property to %s: %pe\n",
170 node_name, ERR_PTR(rc));
171 return rc;
172 }
173
174 rc = of_changeset_add_prop_string(&priv->of_cs, pcs_node,
175 "reg-names",
176 pcs_res->res.name);
177 if (rc) {
178 dev_err(dev, "Failed to add reg-names property to %s: %pe\n",
179 node_name, ERR_PTR(rc));
180 return rc;
181 }
182
183 rc = of_changeset_add_prop_u32_array(&priv->of_cs, pcs_node,
184 "reg-io-width",
185 &reg_io_width, 1);
186 if (rc) {
187 dev_err(dev, "Failed to add reg-io-width property to %s: %pe\n",
188 node_name, ERR_PTR(rc));
189 return rc;
190 }
191
192 dev_dbg(dev, "Created OF node %pOF\n", pcs_node);
193 priv->pcs_fwnode[pcs_res->port] = of_fwnode_handle(pcs_node);
194 }
195
196 return 0;
197 }
198

--
0-DAY CI Kernel Test Service