Re: [PATCH net-next v2] net: bridge: use sysfs_emit instead of sprintf

Ido Schimmel <[email protected]>
Newsgroups gmane.linux.network.bridge,gmane.linux.network,gmane.linux.kernel
Message-ID <20260202174409.GA127339@shredder>
On Mon, Feb 02, 2026 at 07:07:12AM +0000, David Corvaglia wrote:
> @@ -677,9 +677,8 @@ static ssize_t multicast_query_response_interval_show(
>  	struct device *d, struct device_attribute *attr, char *buf)
>  {
>  	struct net_bridge *br = to_bridge(d);
> -	return sprintf(
> -		buf, "%lu\n",
> -		jiffies_to_clock_t(br->multicast_ctx.multicast_query_response_interval));
> +	return sysfs_emit(buf, "%lu\n",
> +		          jiffies_to_clock_t(br->multicast_ctx.multicast_query_response_interval));
>  }

I get:

$ b4 shazam -k 0100019c1d2d46e0-a083f912-ac82-47e8-8cbb-ac9d70355ed3-000000@email.amazonses.com
[...]
    ● checkpatch.pl: 392: ERROR: code indent should use tabs where possible
[...]

$ scripts/checkpatch.pl -g HEAD
ERROR: code indent should use tabs where possible
#332: FILE: net/bridge/br_sysfs_br.c:681:
+^I^I          jiffies_to_clock_t(br->multicast_ctx.multicast_query_response_interval));$

total: 1 errors, 0 warnings, 0 checks, 495 lines checked
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.