Re: [PATCH 06/10] gpio: mockup: refuse to accept an odd number of GPIO ranges

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

 



On Sat, May 27, 2017 at 8:29 PM, Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>> Currently we ignore the last odd range value, since each chip is
>> described by two values. Be more strict and require the user to
>> pass an even number of ranges.
>
>> -       if (gpio_mockup_params_nr < 2)
>> +       if (gpio_mockup_params_nr < 2 || (gpio_mockup_params_nr % 2))
>
>      if (((gpio_mockup_params_nr + 1) & ~3) < 3)
>
> 3 might have a suffix regarding to the type of variable.

Oh, ignore that, sorry, for a noise.


-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux