lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 06/10] gpio: mockup: refuse to accept an odd number of GPIO ranges
On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski <brgl@bgdev.pl> 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.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-05-27 19:30    [W:0.116 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site