lkml.org 
[lkml]   [2024]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2024-05-27 18:02    [W:0.099 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site