lkml.org 
[lkml]   [2019]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 09/11] gpiolib: provide a dedicated function for setting lineinfo
On Wed, Dec 4, 2019 at 6:02 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> We'll soon be filling out the gpioline_info structure in multiple
> places. Add a separate function that given a gpio_desc sets all relevant
> fields.

> + if (desc->name) {
> + strncpy(info->name, desc->name, sizeof(info->name));
> + info->name[sizeof(info->name) - 1] = '\0';
> + } else {
> + info->name[0] = '\0';
> + }
> +
> + if (desc->label) {
> + strncpy(info->consumer, desc->label, sizeof(info->consumer));
> + info->consumer[sizeof(info->consumer) - 1] = '\0';
> + } else {
> + info->consumer[0] = '\0';
> + }

I think we have to fix GCC warnings first and then do whatever this patch does.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-12-04 23:31    [W:0.105 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site