Messages in this thread | | | Date | Thu, 25 Apr 2024 12:44:22 +0300 | From | Andy Shevchenko <> | Subject | Re: [PATCH v2 4/4] net: txgbe: Utilize i2c-designware.h |
| |
On Wed, Apr 24, 2024 at 05:26:42PM -0700, Florian Fainelli wrote: > Rather than open code the i2c_designware string, utilize the newly > defined constant in i2c-designware.h.
..
> +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c > @@ -8,6 +8,7 @@ > #include <linux/clkdev.h> > #include <linux/i2c.h> > #include <linux/pci.h> > +#include <linux/platform_data/i2c-designware.h>
Same comment, make this a separate group, it will be easier to see the quite specific niche headers, that are not related to the generic libraries / or subsystem-level ones.
> #include <linux/platform_device.h> > #include <linux/regmap.h> > #include <linux/pcs/pcs-xpcs.h>
..
> - snprintf(clk_name, sizeof(clk_name), "i2c_designware.%d", > - pci_dev_id(pdev)); > + snprintf(clk_name, sizeof(clk_name), "%s.%d", > + I2C_DESIGNWARE_NAME, pci_dev_id(pdev));
Why do you make it %s? It was constant literal and is, no need to use %s.
-- With Best Regards, Andy Shevchenko
| |