Re: [PATCH] media: i2c: adv748x: Fix unsafe macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 16, 2020 at 11:25 PM Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
>
> On 1/14/20 12:14 AM, Nathan Chancellor wrote:
> > On Tue, Oct 22, 2019 at 08:25:22AM -0500, Gustavo A. R. Silva wrote:
> >> Enclose multiple macro parameters in parentheses in order to
> >> make such macros safer and fix the Clang warning below:
> >>
> >> drivers/media/i2c/adv748x/adv748x-afe.c:452:12: warning: operator '?:'
> >> has lower precedence than '|'; '|' will be evaluated first
> >> [-Wbitwise-conditional-parentheses]
> >>
> >> ret = sdp_clrset(state, ADV748X_SDP_FRP, ADV748X_SDP_FRP_MASK, enable
> >> ? ctrl->val - 1 : 0);
> >>
> >> Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver")
> >> Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> >> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx
> >
> > It doesn't look like this was picked up? I still see this warning on
> > 5.5-rc6 and next-20200113.
>
> It's been picked up some time ago and will appear in 5.6.

https://git.linuxtv.org/media_tree.git/commit/?id=0d962e061abcf1b9105f88fb850158b5887fbca3

-- 
Thanks,
~Nick Desaulniers



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux