[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210519134754.GX1955@kadam>
Date: Wed, 19 May 2021 16:47:55 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Rajat Asthana <thisisrast7@...il.com>
Cc: vaibhav.sr@...il.com, mgreer@...malcreek.com, johan@...nel.org,
elder@...nel.org, gregkh@...uxfoundation.org,
greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] greybus: audio: Fix sparse warning.
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@...il.com>
> ---
> Changes in v2:
> - Update the commit message.
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
regards,
dan carpenter
Powered by blists - more mailing lists