Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1452432ybl; Thu, 5 Dec 2019 01:29:43 -0800 (PST) X-Google-Smtp-Source: APXvYqx0+TweLJ4LIdMklzk6yVGPAQ4iWwLZ5TeSgsP8BBfMnoB5313fF9VQv5c2UO/ZQQDT8/DL X-Received: by 2002:a9d:6c81:: with SMTP id c1mr4523742otr.39.1575538183726; Thu, 05 Dec 2019 01:29:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575538183; cv=none; d=google.com; s=arc-20160816; b=EaTmuhxbI+V68pC4rXIp2Pq/OZi1KsDU6sm221zttJx0MDy9W+yEJ7iQMhLfg+bhwZ vpTsnIUWM3zn/nPtL66HkWG3ju0KReqn91nLCvWM1moHUifdk0UG9tc8FHSD80vCw1Uf jsyJ2ZvOCJyaCQP2ro3Gk9WdrKVInynJfbqUup+jT1UR3YgFpIJncY++ZtFux3Ydmg7R M5AN10lk/MNLJ+M1qN+gWPb8Gt13t3UsikQB1Gm5018BtLErU08pomg5fdvUcI9lou37 WQXTC+Uyf0MuQh8ZljaxIQGb4QGhSd1joqcXSlvO48/mgw68BK4tsk9IpfkaKQHrim5D fqKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=jvkGwJO9wpwmWzb9yFYF8g0IZb78yl4JdpgD9iqbzYo=; b=ms0wfhEdrg5PkgFhWn4uZLkER3DD6s6Mda1ylOH0jZSi2Sj5ao8lBB4QBqhGxlWhrI jixJ/opboMLWfwl92/XfunlNp+2cfoay57LSXacO50D2OKSV1Iaw8swm6SPvRkK3s+6K LEZDiTBI9tDAkpwCiGIP2vgBIt6MYEHMzG9BpI3U8JMRo9tmEezNqpSBCq5IxEU410pJ dMq8KxNrWJmr/mayZJ0wsj1z3WLomo/qJd50cTe5yiBDNLvXRl0F7fkXpyRQwy/8P2Gc jCKWhcIr/3NBag2WFonUEZxZddvJdUbhS5rqbhoU0XnhgXLdHb7XT3QYuH04NqZD+etF wOkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=On51OQFW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si4696149oid.254.2019.12.05.01.29.31; Thu, 05 Dec 2019 01:29:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=On51OQFW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729185AbfLEJ2q (ORCPT + 99 others); Thu, 5 Dec 2019 04:28:46 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:40138 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbfLEJ2p (ORCPT ); Thu, 5 Dec 2019 04:28:45 -0500 Received: by mail-ot1-f68.google.com with SMTP id i15so1993937oto.7 for ; Thu, 05 Dec 2019 01:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=jvkGwJO9wpwmWzb9yFYF8g0IZb78yl4JdpgD9iqbzYo=; b=On51OQFWdvIjn8Q3J7N+Tq3YSiDkfSP1sBhnb0QIuJfAxFuDJab1AxvkR2BocBCgDP dHZqvUqVxKaUnabdCFbiFQBB1Lp1/nntWzS19cPHJj3zIt6epATT9q8EfZVqVvn1eGPT ziWJu3cwExxojl3nIbXHdilO6R5IMkujgFB+h9/y+VHUXpeLjAdT4OPU25bQHA9cXKQp iJ448kofN9nG9IzMawFJcHJCjxTdPyfRv1sqE6NDxL+proHg+TNDcD3K/iZetFEjVPs3 gJyKX/M99cccEcKlgPw5zt/VGH8fuHw9SzVXs/lgLePyYUdmY9Ar7DlJigfjzo46/G6H 9ZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=jvkGwJO9wpwmWzb9yFYF8g0IZb78yl4JdpgD9iqbzYo=; b=Sd2mVkLtQyyVmv+TY3SjeqWiuAryGKFZeMmL15aLzKG5AftceDUZG+jUG0Rep8Q4Ky iRhnivbXcozyeL504kgIsoD95JpH+sOb+st7vpVfV2eD97Lu/HdxDNWHYMM/Db/G32OB 0I/S+TSoL6aFzRNiqHSyP1ioRJg4zftZPzKP9Yh55t9x4GiDxhKWDfi7QrM9kbTtN60a nt55lqGoCMdEXMLu8KHPkMjQpOMNe3RUI9/Ay/Fm62FFR25cPrswVUy1kxitm9chsUbO MPH4oHDXOtl1Zx+TaubgMxRFOV4zZ8fYwc8+SmX+FQ/UE/CjOTtIvcgq49cTq/omZp9B nRsg== X-Gm-Message-State: APjAAAVMSYe6TzqjP7SaAD1uIMtduoSPbijkKpe808NetanvYKX8g4ea um+OMlym9fJL2wdoewdKj4yk+7qyFnrVb9RJNev4fYJh X-Received: by 2002:a9d:7a46:: with SMTP id z6mr5944040otm.194.1575538124736; Thu, 05 Dec 2019 01:28:44 -0800 (PST) MIME-Version: 1.0 References: <20191204155912.17590-1-brgl@bgdev.pl> <20191204155912.17590-10-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 5 Dec 2019 10:28:33 +0100 Message-ID: Subject: Re: [PATCH v2 09/11] gpiolib: provide a dedicated function for setting lineinfo To: Andy Shevchenko Cc: Bartosz Golaszewski , Kent Gibson , Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C5=9Br., 4 gru 2019 o 23:30 Andy Shevchenko na= pisa=C5=82(a): > > On Wed, Dec 4, 2019 at 6:02 PM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > We'll soon be filling out the gpioline_info structure in multiple > > places. Add a separate function that given a gpio_desc sets all relevan= t > > fields. > > > + if (desc->name) { > > + strncpy(info->name, desc->name, sizeof(info->name)); > > + info->name[sizeof(info->name) - 1] =3D '\0'; > > + } else { > > + info->name[0] =3D '\0'; > > + } > > + > > + if (desc->label) { > > + strncpy(info->consumer, desc->label, sizeof(info->consu= mer)); > > + info->consumer[sizeof(info->consumer) - 1] =3D '\0'; > > + } else { > > + info->consumer[0] =3D '\0'; > > + } > > I think we have to fix GCC warnings first and then do whatever this patch= does. > What GCC warnings are you referring to exactly? Bart > -- > With Best Regards, > Andy Shevchenko