On Saturday, May 27, 2023 4:44 PM, Andy Shevchenko wrote: > +Cc Hans (see below) > > On Wed, May 24, 2023 at 05:17:14PM +0800, Jiawen Wu wrote: > > Register software nodes for GPIO, I2C, SFP and PHYLINK. Define the > > device properties. > > ... > > > +int txgbe_init_phy(struct txgbe *txgbe) > > +{ > > + int ret; > > + > > + ret = txgbe_swnodes_register(txgbe); > > + if (ret) { > > + wx_err(txgbe->wx, "failed to register software nodes\n"); > > > + return ret; > > + } > > + > > + return 0; > > These 4 lines can be as simple as > > return ret; This function is going to be extended with later patches, is it necessary to simply it here? > > > +} > > ... > > > +#define NODE_PROP(_NAME, _PROP) \ > > + (const struct software_node) { \ > > + .name = _NAME, \ > > + .properties = _PROP, \ > > + } > > Looking at the amount of drivers that want this, I would declare it in the > property.h with SOFTWARE_NODE_PROPERTY name. I'll Ack that. > > Hans, what do you think?