From: David Ahern <dsahern@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH iproute2-next] devlink: support direct region read requests
Date: Sat, 3 Dec 2022 11:02:45 -0700 [thread overview]
Message-ID: <20221203180245.GA29763@u2004-local> (raw)
In-Reply-To: <20221128204256.1200695-1-jacob.e.keller@intel.com>
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index 8aefa101b2f8..5057b09505ef 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -8535,11 +8535,15 @@ static int cmd_region_read(struct dl *dl)
> int err;
>
> err = dl_argv_parse(dl, DL_OPT_HANDLE_REGION | DL_OPT_REGION_ADDRESS |
> - DL_OPT_REGION_LENGTH | DL_OPT_REGION_SNAPSHOT_ID,
> - 0);
> + DL_OPT_REGION_LENGTH,
> + DL_OPT_REGION_SNAPSHOT_ID);
> if (err)
> return err;
>
> + /* If user didn't provide a snapshot id, perform a direct read */
> + if (!(dl->opts.present & DL_OPT_REGION_SNAPSHOT_ID))
> + mnl_attr_put(nlh, DEVLINK_ATTR_REGION_DIRECT, 0, NULL);
> +
> nlh = mnlu_gen_socket_cmd_prepare(&dl->nlg, DEVLINK_CMD_REGION_READ,
> NLM_F_REQUEST | NLM_F_ACK | NLM_F_DUMP);
>
>
> base-commit: 2ed09c3bf8aca185b2f3eb369ae435503f9b9826
> --
> 2.38.1.420.g319605f8f00e
>
This introduces a compile warning:
devlink.c: In function ‘dl_cmd’:
devlink.c:8613:3: warning: ‘nlh’ may be used uninitialized in this function [-Wmaybe-uninitialized]
8613 | mnl_attr_put(nlh, DEVLINK_ATTR_REGION_DIRECT, 0, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
devlink.c:8602:19: note: ‘nlh’ was declared here
and always add maintainers to iproute2 patches.
prev parent reply other threads:[~2022-12-03 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 20:42 [PATCH iproute2-next] devlink: support direct region read requests Jacob Keller
2022-12-03 18:02 ` David Ahern [this message]
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=20221203180245.GA29763@u2004-local \
--to=dsahern@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=netdev@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 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).