DPDK patches and discussions
 help / color / mirror / Atom feed
From: Usman Tanveer <usman.tanveer@emumba.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, sachin.saxena@oss.nxp.com, hemant.agrawal@nxp.com
Subject: Re: [PATCH] drivers/raw/skeleton: fix typecasting in skeleton_rawdev_enqueue_bufs()
Date: Fri, 2 Sep 2022 09:57:49 +0500	[thread overview]
Message-ID: <CAH_O0bzA3vs2QbBV4VQv2KyUwpLNthAq=SmVZO3gBAJg8qFHAA@mail.gmail.com> (raw)
In-Reply-To: <20220706063255.255325-1-usman.tanveer@emumba.com>

[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]

Hi Thomas,
Can you please have a look and update the status?



On Wed, Jul 6, 2022 at 11:33 AM Usman Tanveer <usman.tanveer@emumba.com>
wrote:

> In function "skeleton_rawdev_enqueue_bugs", variable "context" is being
> typecasted to (int*), and then assigned to a "uint16_t" type variable
> "q_id". As the value is a "uint16_t", (int*) is replaced by (uint16_t*).
>
> Signed-off-by: Usman Tanveer <usman.tanveer@emumba.com>
> ---
>  drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/raw/skeleton/skeleton_rawdev.c
> b/drivers/raw/skeleton/skeleton_rawdev.c
> index 16ecae3d92..3f4da88747 100644
> --- a/drivers/raw/skeleton/skeleton_rawdev.c
> +++ b/drivers/raw/skeleton/skeleton_rawdev.c
> @@ -421,7 +421,7 @@ static int skeleton_rawdev_enqueue_bufs(struct
> rte_rawdev *dev,
>          * help in complex implementation which require more information
> than
>          * just an integer - for example, a queue-pair.
>          */
> -       q_id = *((int *)context);
> +       q_id = *((uint16_t *)context);
>
>         for (i = 0; i < count; i++)
>                 queue_buf[q_id].bufs[i] = buffers[i]->buf_addr;
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 1759 bytes --]

      reply	other threads:[~2022-09-02  4:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  6:32 Usman Tanveer
2022-09-02  4:57 ` Usman Tanveer [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='CAH_O0bzA3vs2QbBV4VQv2KyUwpLNthAq=SmVZO3gBAJg8qFHAA@mail.gmail.com' \
    --to=usman.tanveer@emumba.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=thomas@monjalon.net \
    /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).