linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf, docs: iterator: Rectify non-standard line break
@ 2025-04-23  3:06 WangYuli
  2025-04-24  3:06 ` Yanteng Si
  2025-04-24 14:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: WangYuli @ 2025-04-23  3:06 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, corbet
  Cc: bpf, linux-doc, linux-kernel, void, psreep, yhs, zhanjun,
	niecheng1, guanwentao, WangYuli, Chen Linxuan

Even though the kernel's coding-style document does not explicitly
state this, we generally put a newline after the semicolon of every
C language statement to enhance code readability.

Adjust the placement of newlines to adhere to this convention.

Reported-by: Chen Linxuan <chenlinxuan@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
 Documentation/bpf/bpf_iterators.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/bpf/bpf_iterators.rst b/Documentation/bpf/bpf_iterators.rst
index 7f514cb6b052..385cd05aabf5 100644
--- a/Documentation/bpf/bpf_iterators.rst
+++ b/Documentation/bpf/bpf_iterators.rst
@@ -323,8 +323,8 @@ Now, in the userspace program, pass the pointer of struct to the
 
 ::
 
-  link = bpf_program__attach_iter(prog, &opts); iter_fd =
-  bpf_iter_create(bpf_link__fd(link));
+  link = bpf_program__attach_iter(prog, &opts);
+  iter_fd = bpf_iter_create(bpf_link__fd(link));
 
 If both *tid* and *pid* are zero, an iterator created from this struct
 ``bpf_iter_attach_opts`` will include every opened file of every task in the
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf, docs: iterator: Rectify non-standard line break
  2025-04-23  3:06 [PATCH] bpf, docs: iterator: Rectify non-standard line break WangYuli
@ 2025-04-24  3:06 ` Yanteng Si
  2025-04-24 14:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Yanteng Si @ 2025-04-24  3:06 UTC (permalink / raw)
  To: WangYuli, ast, daniel, andrii, martin.lau, eddyz87, song,
	yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa,
	corbet
  Cc: bpf, linux-doc, linux-kernel, void, psreep, yhs, zhanjun,
	niecheng1, guanwentao, Chen Linxuan


在 4/23/25 11:06 AM, WangYuli 写道:
> Even though the kernel's coding-style document does not explicitly
> state this, we generally put a newline after the semicolon of every
> C language statement to enhance code readability.
>
> Adjust the placement of newlines to adhere to this convention.
>
> Reported-by: Chen Linxuan <chenlinxuan@uniontech.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.com>

Reviewed-by: Yanteng Si <si.yanteng@linux.dev>


Thanks,

Yanteng

> ---
>   Documentation/bpf/bpf_iterators.rst | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/bpf/bpf_iterators.rst b/Documentation/bpf/bpf_iterators.rst
> index 7f514cb6b052..385cd05aabf5 100644
> --- a/Documentation/bpf/bpf_iterators.rst
> +++ b/Documentation/bpf/bpf_iterators.rst
> @@ -323,8 +323,8 @@ Now, in the userspace program, pass the pointer of struct to the
>   
>   ::
>   
> -  link = bpf_program__attach_iter(prog, &opts); iter_fd =
> -  bpf_iter_create(bpf_link__fd(link));
> +  link = bpf_program__attach_iter(prog, &opts);
> +  iter_fd = bpf_iter_create(bpf_link__fd(link));
>   
>   If both *tid* and *pid* are zero, an iterator created from this struct
>   ``bpf_iter_attach_opts`` will include every opened file of every task in the

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf, docs: iterator: Rectify non-standard line break
  2025-04-23  3:06 [PATCH] bpf, docs: iterator: Rectify non-standard line break WangYuli
  2025-04-24  3:06 ` Yanteng Si
@ 2025-04-24 14:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-24 14:50 UTC (permalink / raw)
  To: WangYuli
  Cc: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, corbet, bpf,
	linux-doc, linux-kernel, void, psreep, yhs, zhanjun, niecheng1,
	guanwentao, chenlinxuan

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed, 23 Apr 2025 11:06:32 +0800 you wrote:
> Even though the kernel's coding-style document does not explicitly
> state this, we generally put a newline after the semicolon of every
> C language statement to enhance code readability.
> 
> Adjust the placement of newlines to adhere to this convention.
> 
> Reported-by: Chen Linxuan <chenlinxuan@uniontech.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.com>
> 
> [...]

Here is the summary with links:
  - bpf, docs: iterator: Rectify non-standard line break
    https://git.kernel.org/bpf/bpf-next/c/4cc20482143c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-24 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23  3:06 [PATCH] bpf, docs: iterator: Rectify non-standard line break WangYuli
2025-04-24  3:06 ` Yanteng Si
2025-04-24 14:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).