Searched hist:06863620 (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/drivers/gpio/ |
H A D | gpiolib.h | 06863620 Tue Dec 24 06:06:59 CST 2019 Bartosz Golaszewski <bgolaszewski@baylibre.com> gpiolib: convert the type of hwnum to unsigned int in gpiochip_get_desc()
gpiochip_get_desc() takes a u16 hwnum, but it turns out most users don't respect that and usually pass an unsigned int. Since implicit casting to a smaller type is dangerous - let's change the type of hwnum to unsigned int in gpiochip_get_desc() and in gpiochip_request_own_desc() where the size of hwnum is not respected either and who's a user of the former.
This is safe as we then check the hwnum against the number of lines before proceeding in gpiochip_get_desc().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> 06863620 Tue Dec 24 06:06:59 CST 2019 Bartosz Golaszewski <bgolaszewski@baylibre.com> gpiolib: convert the type of hwnum to unsigned int in gpiochip_get_desc() gpiochip_get_desc() takes a u16 hwnum, but it turns out most users don't respect that and usually pass an unsigned int. Since implicit casting to a smaller type is dangerous - let's change the type of hwnum to unsigned int in gpiochip_get_desc() and in gpiochip_request_own_desc() where the size of hwnum is not respected either and who's a user of the former. This is safe as we then check the hwnum against the number of lines before proceeding in gpiochip_get_desc(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
H A D | gpiolib.c | 06863620 Tue Dec 24 06:06:59 CST 2019 Bartosz Golaszewski <bgolaszewski@baylibre.com> gpiolib: convert the type of hwnum to unsigned int in gpiochip_get_desc()
gpiochip_get_desc() takes a u16 hwnum, but it turns out most users don't respect that and usually pass an unsigned int. Since implicit casting to a smaller type is dangerous - let's change the type of hwnum to unsigned int in gpiochip_get_desc() and in gpiochip_request_own_desc() where the size of hwnum is not respected either and who's a user of the former.
This is safe as we then check the hwnum against the number of lines before proceeding in gpiochip_get_desc().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
/openbmc/linux/include/linux/gpio/ |
H A D | driver.h | 06863620 Tue Dec 24 06:06:59 CST 2019 Bartosz Golaszewski <bgolaszewski@baylibre.com> gpiolib: convert the type of hwnum to unsigned int in gpiochip_get_desc()
gpiochip_get_desc() takes a u16 hwnum, but it turns out most users don't respect that and usually pass an unsigned int. Since implicit casting to a smaller type is dangerous - let's change the type of hwnum to unsigned int in gpiochip_get_desc() and in gpiochip_request_own_desc() where the size of hwnum is not respected either and who's a user of the former.
This is safe as we then check the hwnum against the number of lines before proceeding in gpiochip_get_desc().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> 06863620 Tue Dec 24 06:06:59 CST 2019 Bartosz Golaszewski <bgolaszewski@baylibre.com> gpiolib: convert the type of hwnum to unsigned int in gpiochip_get_desc() gpiochip_get_desc() takes a u16 hwnum, but it turns out most users don't respect that and usually pass an unsigned int. Since implicit casting to a smaller type is dangerous - let's change the type of hwnum to unsigned int in gpiochip_get_desc() and in gpiochip_request_own_desc() where the size of hwnum is not respected either and who's a user of the former. This is safe as we then check the hwnum against the number of lines before proceeding in gpiochip_get_desc(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|