From: Chuck Lever III <chuck.lever@oracle.com>
To: Anna Schumaker <anna.schumaker@netapp.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Benjamin Coddington <bcodding@redhat.com>
Subject: Re: [PATCH] xprtrdma: Fix a maybe-uninitialized compiler warning
Date: Sun, 31 Oct 2021 15:04:35 +0000 [thread overview]
Message-ID: <3EC776BC-8E37-477B-98BB-C9DE163EFA52@oracle.com> (raw)
In-Reply-To: <2b32d41cf6a502918a685447cd749c4b1cb0d16d.1635685588.git.bcodding@redhat.com>
> On Oct 31, 2021, at 9:08 AM, Benjamin Coddington <bcodding@redhat.com> wrote:
>
> This minor fix-up keeps GCC from complaining that "last' may be used
> uninitialized", which breaks some build workflows that have been running
> with all warnings treated as errors.
>
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> net/sunrpc/xprtrdma/frwr_ops.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
> index f700b34a5bfd..de813fa07daa 100644
> --- a/net/sunrpc/xprtrdma/frwr_ops.c
> +++ b/net/sunrpc/xprtrdma/frwr_ops.c
> @@ -503,7 +503,7 @@ static void frwr_wc_localinv_wake(struct ib_cq *cq, struct ib_wc *wc)
> */
> void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
> {
> - struct ib_send_wr *first, **prev, *last;
> + struct ib_send_wr *first, **prev, *last = NULL;
> struct rpcrdma_ep *ep = r_xprt->rx_ep;
> const struct ib_send_wr *bad_wr;
> struct rpcrdma_mr *mr;
> @@ -608,7 +608,7 @@ static void frwr_wc_localinv_done(struct ib_cq *cq, struct ib_wc *wc)
> */
> void frwr_unmap_async(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
> {
> - struct ib_send_wr *first, *last, **prev;
> + struct ib_send_wr *first, *last = NULL, **prev;
> struct rpcrdma_ep *ep = r_xprt->rx_ep;
> struct rpcrdma_mr *mr;
> int rc;
> --
> 2.31.1
>
--
Chuck Lever
next prev parent reply other threads:[~2021-10-31 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-31 13:08 [PATCH] xprtrdma: Fix a maybe-uninitialized compiler warning Benjamin Coddington
2021-10-31 15:04 ` Chuck Lever III [this message]
2021-11-02 16:43 ` Trond Myklebust
2021-11-02 16:50 ` Chuck Lever III
2021-11-02 17:36 ` Trond Myklebust
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=3EC776BC-8E37-477B-98BB-C9DE163EFA52@oracle.com \
--to=chuck.lever@oracle.com \
--cc=anna.schumaker@netapp.com \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.