Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp16362pxk; Wed, 16 Sep 2020 15:44:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMXDxZWKhxiWhKJWwGML1bLEi4G4NQD4ey6nkcxKY0UaVg6A6Eiw94oJMbklX1m+8nItWL X-Received: by 2002:a17:906:3a0e:: with SMTP id z14mr27054946eje.192.1600296269415; Wed, 16 Sep 2020 15:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600296269; cv=none; d=google.com; s=arc-20160816; b=0tTfupx0qgav474lImbcwYU29c0HJqhkwjPt6fVj0A3+JR+nU70ry2gywAjKrseKE1 mz9PNuERFeJ3X2alD0nPEF3mJIjHO91k8WUAFrKG8gjKGZngOM+1bcv9ySno+us53KPP 7zpgPsfu3gsFGL3NLGuazjlSr271fGPpmlX++sbvr1R3XZZhQkYtG9NnoIZ0zH9aOiHN XHet0q6cTaG1Eb5YvDPPhvVWapI+XQoNee6mbrIrkmz1rkFEgalKlCrS1mVRcUwAo9g0 9V+fkF+zwl5Xrpv8eiQZc85Ol8Hdnncwj9eFP7TDLCTOQRDazitP2lVJJS7Zl9YiAnsm G/Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7GiT9eDSqdWyYzWccMuLBu4d8BPz/ksICennMbNChNM=; b=agbFhddXOtMKfeOK73SiOXRcOY+jncGRJqZGUYUgYdqP901vnPa6ZjReivVhDfz80j EzM9kmtpYhowO7qJZCqo8Ts6rTjVtrjmKgGauZf7OM6aAxtbh6roKaZ4UC+7kAdOJbrp fbI1DpqR/zBjUcWCFpB7j3Oef/UDiXoHpV4EGcSX+UgwybbafB/weFrX0q2VTLNvw1fu 8uXXPTXECHG2W5209I3nySGCp86IFgSWrUPzK8vVJuBGavUUEVW+zcLobqKkTnQQU63W TT+M17QRePyOOC5tnx3zgib9sxW3ttGosRt3H1x6LtNAYhUBlKg1O5LEeoVCzb9c2E9S 2Q3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NoKXXjta; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g25si12234241edu.330.2020.09.16.15.44.06; Wed, 16 Sep 2020 15:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NoKXXjta; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbgIPWnG (ORCPT + 99 others); Wed, 16 Sep 2020 18:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbgIPWm5 (ORCPT ); Wed, 16 Sep 2020 18:42:57 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A316C06121D for ; Wed, 16 Sep 2020 14:25:28 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id b22so8473494lfs.13 for ; Wed, 16 Sep 2020 14:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7GiT9eDSqdWyYzWccMuLBu4d8BPz/ksICennMbNChNM=; b=NoKXXjtajoWY4tEFRPv2OskWdH4HGzBP1P/qSWuc9FaxXQ+8jqAufht1vLsf99B80m riS1+DGjBqL6gylbik034bUF17j9V99bs70Y39lHhiPe/wMIYMIz2lBihGBf7VXA18TC x/1r0GtDrUau+gBq35J351RVX/wmtLLAbQfhrLLHoTXxuAlZPWZmJF9CfnGH2lPNg7ky G+Wvyg19qnDvcL5dQN6srKoGXQIWyBR2ty79taasZeDEJ9vriuypOmN/LvMPVhL8WhZx vvqQpJILvKOL/cwoOgWCByZr7zkqmbwEeYvHTObSbVXIPOLwa6PKMEkITFWYytcqnf8b fSGQ== 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; bh=7GiT9eDSqdWyYzWccMuLBu4d8BPz/ksICennMbNChNM=; b=YRASFT8gYrSpFctVVV8a8ReERFWUzvDWwrkwEvrlm2onHziusxQv0p6uiNb5A0cYLK 0+Nn9Ubt0UJbUOxonqgumXCvBKD4mPtf+3GWCIylaXtbq+XEo4oYeRFbhdqjnnY7dOsG F7jOiTPZ5B6hIH0U/gBzfMuqxFyi4FWFNKeWnBTYGhJc+9yQa1hJ/u3Hobi31kRjUJ1a k3prxI/rzNsp5MP8YjFggL7kBHmSCMGVqUicrwGC/EQnn2iSCQ5A7PliSFj0OsCVoKfq UvyQ0WcFyxAHfXmW1rbEi9Dt315Gu8Nrt/su2LOkowI2F6QpaHYMmq6nghsZjtFOirrt yjNA== X-Gm-Message-State: AOAM531DE8eo2ZU98ceQd4ESfA0COcGqZDWvR+k394aKMPm9Zo9pADns tT46mz8DsrY8QxxoqGPTUMEbHMxxCrXe9H9hlDVScYWNGy6jmw== X-Received: by 2002:ac2:51a8:: with SMTP id f8mr9031976lfk.472.1600291526503; Wed, 16 Sep 2020 14:25:26 -0700 (PDT) MIME-Version: 1.0 References: <20200916134327.3435-1-brgl@bgdev.pl> <20200916142930.GK3956970@smile.fi.intel.com> In-Reply-To: From: Anders Roxell Date: Wed, 16 Sep 2020 23:25:15 +0200 Message-ID: Subject: Re: [PATCH next] gpiolib: check for parent device in devprop_gpiochip_set_names() To: Bartosz Golaszewski Cc: Andy Shevchenko , Linus Walleij , Mika Westerberg , Kent Gibson , "open list:GPIO SUBSYSTEM" , Linux Next Mailing List , Linux Kernel Mailing List , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Sep 2020 at 16:47, Bartosz Golaszewski wrote: > > On Wed, Sep 16, 2020 at 4:29 PM Andy Shevchenko > wrote: > > > > On Wed, Sep 16, 2020 at 03:43:27PM +0200, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > > > It's possible for a GPIO chip to not have a parent device (whose > > > properties we inspect for 'gpio-line-names'). In this case we should > > > simply return from devprop_gpiochip_set_names(). Add an appropriate > > > check for this use-case. > > > > Ah, nice! > > Can we also add a small comment in the code, b/c w/o it I would stumble over > > and eager to remove looks-as-unneeded check? > > Reviewed-by: Andy Shevchenko Tested-by: Anders Roxell