From: Jeff Layton <jlayton@kernel.org>
To: Chenguang Zhao <zhaochenguang@kylinos.cn>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
Cc: linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-next v2] SUNRPC: Change list definition method
Date: Mon, 08 Dec 2025 17:57:08 +0900 [thread overview]
Message-ID: <d7bf5931398b48170ac08dd4d63cb7cf8020df62.camel@kernel.org> (raw)
In-Reply-To: <20251208085348.467419-1-zhaochenguang@kylinos.cn>
On Mon, 2025-12-08 at 16:53 +0800, Chenguang Zhao wrote:
> The LIST_HEAD macro can both define a linked list and initialize
> it in one step. To simplify code, we replace the separate operations
> of linked list definition and manual initialization with the LIST_HEAD
> macro.
>
> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
> ---
> v2:
> - Modify the commit message according to Chuck's suggestion
>
> net/sunrpc/backchannel_rqst.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c
> index caa94cf57123..949022c5574c 100644
> --- a/net/sunrpc/backchannel_rqst.c
> +++ b/net/sunrpc/backchannel_rqst.c
> @@ -131,7 +131,7 @@ EXPORT_SYMBOL_GPL(xprt_setup_backchannel);
> int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs)
> {
> struct rpc_rqst *req;
> - struct list_head tmp_list;
> + LIST_HEAD(tmp_list);
> int i;
>
> dprintk("RPC: setup backchannel transport\n");
> @@ -147,7 +147,6 @@ int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs)
> * lock is held on the rpc_xprt struct. It also makes cleanup
> * easier in case of memory allocation errors.
> */
> - INIT_LIST_HEAD(&tmp_list);
> for (i = 0; i < min_reqs; i++) {
> /* Pre-allocate one backchannel rpc_rqst */
> req = xprt_alloc_bc_req(xprt);
Thought I'd already sent this, but...
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2025-12-08 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 8:53 [PATCH linux-next v2] SUNRPC: Change list definition method Chenguang Zhao
2025-12-08 8:57 ` Jeff Layton [this message]
2025-12-10 13:56 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7bf5931398b48170ac08dd4d63cb7cf8020df62.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=netdev@vger.kernel.org \
--cc=okorniev@redhat.com \
--cc=pabeni@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@kernel.org \
--cc=zhaochenguang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox