public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rajat Asthana <thisisrast7@gmail.com>
Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org,
	elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] greybus: audio: Fix sparse warning.
Date: Wed, 19 May 2021 16:47:55 +0300	[thread overview]
Message-ID: <20210519134754.GX1955@kadam> (raw)
In-Reply-To: <20210519134119.848055-1-thisisrast7@gmail.com>

On Wed, May 19, 2021 at 07:11:19PM +0530, Rajat Asthana wrote:
> Sparse complains that:
>    warning: restricted send_ctl_elem_iface_t degrades to integer.
> 
> I have looked at this code, and the code is fine as-is. Normally we
> would frown on using the __force directive to silence Sparse warnings
> but in this case it's fine. Case statements can't be made into __bitwise
> types. We also can't change the type of "ctl->iface" either because that
> is part of the user space API.
> 
> So just add a (__force int) to make the warning go away.
> 
> Signed-off-by: Rajat Asthana <thisisrast7@gmail.com>
> ---
> Changes in v2:
>     - Update the commit message.

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


      reply	other threads:[~2021-05-19 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  4:16 [PATCH] greybus: audio: Fix sparse warning Rajat Asthana
2021-05-19 10:29 ` Dan Carpenter
2021-05-19 13:41   ` [PATCH v2] " Rajat Asthana
2021-05-19 13:47     ` Dan Carpenter [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=20210519134754.GX1955@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mgreer@animalcreek.com \
    --cc=thisisrast7@gmail.com \
    --cc=vaibhav.sr@gmail.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