From: Jerin Jacob <jerinjacobk@gmail.com>
To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Cc: dpdk-dev <dev@dpdk.org>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
Shijith Thotton <sthotton@marvell.com>,
Jerin Jacob <jerinj@marvell.com>
Subject: Re: [PATCH 1/3] event/cnxk: fix incompatible casting of variables
Date: Tue, 22 Feb 2022 15:20:47 +0530 [thread overview]
Message-ID: <CALBAE1OBDj=60XO5WJn+6DwFBuipjpWK_LA8c+RoL4LNVrPrHA@mail.gmail.com> (raw)
In-Reply-To: <20220212123948.3394407-1-gmuthukrishn@marvell.com>
On Sat, Feb 12, 2022 at 6:10 PM Gowrishankar Muthukrishnan
<gmuthukrishn@marvell.com> wrote:
>
> Fix incompatible casting on variables reported by coverity scan.
Series applied to dpdk-next-net-eventdev/for-main. Thanks
>
> Fixes: 6223ede2036 ("event/cnxk: add event port link and unlink")
> Coverity issue: 370582 370584
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> ---
> drivers/event/cnxk/cn10k_eventdev.c | 4 ++--
> drivers/event/cnxk/cn9k_eventdev.c | 11 ++++-------
> 2 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
> index 7b7ce44c74..2bcf5066c4 100644
> --- a/drivers/event/cnxk/cn10k_eventdev.c
> +++ b/drivers/event/cnxk/cn10k_eventdev.c
> @@ -98,10 +98,10 @@ cn10k_sso_hws_release(void *arg, void *hws)
> {
> struct cnxk_sso_evdev *dev = arg;
> struct cn10k_sso_hws *ws = hws;
> - int i;
> + uint16_t i;
>
> for (i = 0; i < dev->nb_event_queues; i++)
> - roc_sso_hws_unlink(&dev->sso, ws->hws_id, (uint16_t *)&i, 1);
> + roc_sso_hws_unlink(&dev->sso, ws->hws_id, &i, 1);
> memset(ws, 0, sizeof(*ws));
> }
>
> diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
> index 4611936b7f..3413467edc 100644
> --- a/drivers/event/cnxk/cn9k_eventdev.c
> +++ b/drivers/event/cnxk/cn9k_eventdev.c
> @@ -97,24 +97,21 @@ cn9k_sso_hws_release(void *arg, void *hws)
> struct cnxk_sso_evdev *dev = arg;
> struct cn9k_sso_hws_dual *dws;
> struct cn9k_sso_hws *ws;
> - int i;
> + uint16_t i;
>
> if (dev->dual_ws) {
> dws = hws;
> for (i = 0; i < dev->nb_event_queues; i++) {
> roc_sso_hws_unlink(&dev->sso,
> - CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 0),
> - (uint16_t *)&i, 1);
> + CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 0), &i, 1);
> roc_sso_hws_unlink(&dev->sso,
> - CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 1),
> - (uint16_t *)&i, 1);
> + CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 1), &i, 1);
> }
> memset(dws, 0, sizeof(*dws));
> } else {
> ws = hws;
> for (i = 0; i < dev->nb_event_queues; i++)
> - roc_sso_hws_unlink(&dev->sso, ws->hws_id,
> - (uint16_t *)&i, 1);
> + roc_sso_hws_unlink(&dev->sso, ws->hws_id, &i, 1);
> memset(ws, 0, sizeof(*ws));
> }
> }
> --
> 2.25.1
>
prev parent reply other threads:[~2022-02-22 9:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 12:39 Gowrishankar Muthukrishnan
2022-02-12 12:39 ` [PATCH 2/3] event/cnxk: fix memory leak Gowrishankar Muthukrishnan
2022-02-12 12:39 ` [PATCH 3/3] event/cnxk: fix uninitialized local variable Gowrishankar Muthukrishnan
2022-02-22 9:50 ` Jerin Jacob [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='CALBAE1OBDj=60XO5WJn+6DwFBuipjpWK_LA8c+RoL4LNVrPrHA@mail.gmail.com' \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=gmuthukrishn@marvell.com \
--cc=jerinj@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=sthotton@marvell.com \
/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).