Re: [PATCH v8 3/8] media: i2c: max2175: Add MAX2175 support

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

 




Hi Hans,

On Mon, Jun 12, 2017 at 3:50 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> On 06/12/2017 03:26 PM, Ramesh Shanmugasundaram wrote:
>> This patch adds driver support for the MAX2175 chip. This is Maxim
>> Integrated's RF to Bits tuner front end chip designed for software-defined
>> radio solutions. This driver exposes the tuner as a sub-device instance
>> with standard and custom controls to configure the device.
>>
>> Signed-off-by: Ramesh Shanmugasundaram
>> <ramesh.shanmugasundaram@xxxxxxxxxxxxxx>
>
>
> Sorry, got this sparse warning:
>
> /home/hans/work/build/media-git/drivers/media/i2c/max2175.c: In function
> 'max2175_poll_timeout':
> /home/hans/work/build/media-git/drivers/media/i2c/max2175.c:385:21: warning:
> '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
>     1000, timeout_ms * 1000);
>           ~~~~~~~~~~~^~~
>
> The smatch warnings are now gone.
>
> If you can make a v9 for just this patch?

This is not an issue with the max2175 driver, but with the
regmap_read_poll_timeout() macro:

    #define regmap_read_poll_timeout(map, addr, val, cond, sleep_us,
timeout_us) \
    ({ \
            ...
            if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \

For increased safety, and to avoid this warning, "timeout_us" should be
inside parentheses.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux