Re: [PATCH net-next v4 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-11-02 Thread Andrew Lunn
> > + vmxnet3_rq_driver_stats[i].desc); > > } > > > > for (i = 0; i < ARRAY_SIZE(vmxnet3_global_stats); i++) > > - ethtool_sprintf(&buf, vmxnet3_global_stats[i].desc); > > + ethtool_puts(&buf, vmxnet3_global_stats[i].desc); > > } > > > > netdev_featur

Re: [PATCH net-next v4 1/3] ethtool: Implement ethtool_puts()

2023-11-02 Thread Russell King (Oracle)
On Thu, Nov 02, 2023 at 06:55:42PM +, Justin Stitt wrote: > +/** > + * ethtool_puts - Write string to ethtool string data > + * @data: Pointer to a pointer to the start of string to update > + * @str: String to write > + * > + * Write string to *data. Update *data to point at start of > + * nex

RE: [PATCH net-next v4 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-11-02 Thread Kiyanovski, Arthur
> -Original Message- > From: Justin Stitt > Sent: Thursday, November 2, 2023 8:56 PM > To: David S. Miller ; Eric Dumazet > ; Jakub Kicinski ; Paolo Abeni > ; Agroskin, Shay ; Kiyanovski, > Arthur ; Arinzon, David ; > Dagan, Noam ; Bshara, Saeed > ; Rasesh Mody ; Sudarsana > Kalluru ; gr

[PATCH net-next v4 0/3] ethtool: Add ethtool_puts()

2023-11-02 Thread Justin Stitt
Hi, This series aims to implement ethtool_puts() and send out a wave 1 of conversions from ethtool_sprintf(). There's also a checkpatch patch included to check for the cases listed below. This was sparked from recent discussion here [1] The conversions are used in cases where ethtool_sprintf() w

[PATCH net-next v4 2/3] checkpatch: add ethtool_sprintf rules

2023-11-02 Thread Justin Stitt
Add some warnings for using ethtool_sprintf() where a simple ethtool_puts() would suffice. The two cases are: 1) Use ethtool_sprintf() with just two arguments: | ethtool_sprintf(&data, driver[i].name); or 2) Use ethtool_sprintf() with a standalone "%s" fmt string: | ethtool_sprintf(&d

[PATCH net-next v4 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-11-02 Thread Justin Stitt
This patch converts some basic cases of ethtool_sprintf() to ethtool_puts(). The conversions are used in cases where ethtool_sprintf() was being used with just two arguments: | ethtool_sprintf(&data, buffer[i].name); or when it's used with format string: "%s" | ethtool_sprintf(&data, "

[PATCH net-next v4 1/3] ethtool: Implement ethtool_puts()

2023-11-02 Thread Justin Stitt
Use strscpy() to implement ethtool_puts(). Functionally the same as ethtool_sprintf() when it's used with two arguments or with just "%s" format specifier. Signed-off-by: Justin Stitt --- include/linux/ethtool.h | 13 + net/ethtool/ioctl.c | 7 +++ 2 files changed, 20 inser

[PATCH 3/3] x86/apic: Drop struct local_apic

2023-11-02 Thread Andrew Cooper
This type predates recorded history in tglx/history.git, making it older than Feb 5th 2002. This structure is literally old enough to drink in most juristictions in the world, and has not been used once in that time. Lay it to rest in /dev/null. Signed-off-by: Andrew Cooper --- There is perhaps

[PATCH 2/3] x86/apic: Drop enum apic_delivery_modes

2023-11-02 Thread Andrew Cooper
The type is not used any more. Replace the constants with plain defines so they can live outside of an __ASSEMBLY__ block, allowing for more cleanup in subsequent changes. Signed-off-by: Andrew Cooper --- arch/x86/include/asm/apicdef.h | 16 +++- 1 file changed, 7 insertions(+), 9 d

[PATCH 1/3] x86/apic: Drop apic::delivery_mode

2023-11-02 Thread Andrew Cooper
This field is set to APIC_DELIVERY_MODE_FIXED in all cases, and is read exactly once. Fold the constant in uv_program_mmr() and drop the field. Searching for the origin of the stale HyperV comment reveals commit a31e58e129f7 ("x86/apic: Switch all APICs to Fixed delivery mode") which notes: As

[PATCH 0/3] x86/apic: Misc pruning

2023-11-02 Thread Andrew Cooper
pic_uv_x.c| 1 - arch/x86/platform/uv/uv_irq.c | 2 +- drivers/pci/controller/pci-hyperv.c | 7 - 12 files changed, 8 insertions(+), 289 deletions(-) --- base-commit: b56ebe7c896dc78b5865ec2c4b1dae3c93537517 change-id: 20231102-x86-apic-88dc3eae3032 Best regards, -- Andrew Cooper