Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp592486pxk; Wed, 16 Sep 2020 11:38:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyEc4oT+MGNKlMoPzbjs0b/IHquEX0U7gldLvfCc0n4NeoPiA4vqGO8I0iVZRQcjIo2Cau X-Received: by 2002:a50:fb98:: with SMTP id e24mr28670351edq.130.1600281534967; Wed, 16 Sep 2020 11:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600281534; cv=none; d=google.com; s=arc-20160816; b=wJe5rxPfT3E6loKiGYZeCFFAuap4Y4ZH15fwYO79V+HW7R/yb+7i4LQ90xqT3rPxUC kB0qjYil9az0jvz3AUm7SmFKYn3hK13sk2pu0ojmXgaXj9sD5Qe1NZh835jMk4fl0xuC LGE0mPb/KfznW270Yoa41vwLT+bzQmAhgX2riCCVQIBKNVoD5v4+dZ5TvYd9VwRsXfxX 1aBsBcUdwuxb0EzaQtH8hB3eYUu2bIAsvo2rLQ2XbYxReCn8gsM5gLY4gR1dis7njDXZ K9FfwRXzDJQvv1LteRCnH3reeiOeRo4rHNG34uRAEiUtV5KcM0qXA3AJH8NyK0RENZ2E AvaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=E5pF9lMmeVoSBJb8mSB6mFtIhSuvd8nIA3BqMoC/eWU=; b=yDfOH8bnvbBgRFVx9eeWzcx9athll6DbYbcwCS4HcQdSspno0Hf6dpfRpoBEXvC7WC 8XzFCHHO9SdzP6CodzS6auikJ3h6mlPdl5VG5AhckHJJTXx8Yrr8QrEZkgKZOVoRY8gu DTpjbdhDNH+175bSYFsDjsWkVQiLQ8Q/0O/5VrOageRfH2xyvxZHbAV5QXmwD9rXDvOG vzTKqp4nYefNDLSMYWInddxaDVueKpJD7eISBFRcnNSCoJW+DTQOMxfjtBe4b0VU+7jF V9coxjA5u+m/s1VWYZq6pwSTkgsqQrR2/F+ubddBsUT2k1gL4UoFHfAQ6dqFsxLSjqHB qvXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=SFRo8QQj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si12283021edq.82.2020.09.16.11.38.32; Wed, 16 Sep 2020 11:38:54 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=SFRo8QQj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727907AbgIPShO (ORCPT + 99 others); Wed, 16 Sep 2020 14:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727988AbgIPS3N (ORCPT ); Wed, 16 Sep 2020 14:29:13 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1423CC0005BD for ; Wed, 16 Sep 2020 07:47:36 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id m17so8579641ioo.1 for ; Wed, 16 Sep 2020 07:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E5pF9lMmeVoSBJb8mSB6mFtIhSuvd8nIA3BqMoC/eWU=; b=SFRo8QQjxsU7yKkA+RZc0YVot3GIsc/FRsrK3XDE3VFi72Otyyfa37isT95eY/1wtq MFTg0QpHqZRFvTRFDlrFiSP3PwPeoA+vQWykjFHhcOa6Pt45+MOdLiZIGiWfr/0bBR55 x6zoBu/4a/uCc2h1Qtdet7tGyDJj6X4suctDKC1q2H1gyhukKXJsDMdlzeuOkJTB1cz5 NgQ9SfBmbOhIO95vCjqaG5gyoMA2Y5IDj/Ozp7HLnsrr9GeFkW84RSVFeycVMOw3jqL1 QzlgXVHjwg6JEJ3b7wBa/bDvc3fOnW4NMEdYxIAk4e9E5IXvJM2BaUO/KoEw/9ZXqGVM dxvA== 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=E5pF9lMmeVoSBJb8mSB6mFtIhSuvd8nIA3BqMoC/eWU=; b=AjiA/exGKjJvgDBpfi+Rf6Cy7P3n54zwkAB0oTwjY7Iz2e+I7qdscmlhUgfwsf+ofk HI4q3LnXxX/zuL8OlRGI6oY7tC6/EmdwLS2/dQK0t28A4iYvyaw4FLxuMju4ztvZ1y9W 87NzOHUuOATMuSoA/Bedn88u5pcsh7JitXlbycCQxU3KWp7/EW3aHBnPBX0d5F0r9/wV Q8NJQrUN3yvkh4FU0RunNXuWfjJkKafi8pBlBs+VUmA9WhxYcQylnIpcQ92/F20PP5zY w76j+nRZ8goO2zJeqQwdj1dOiOajIj78U7r1F6yKjtCpNJLxSbEIuuPPuQ5n++QFkHQO 3yGw== X-Gm-Message-State: AOAM5303aSe4wWXIBWfufSLhyHPp1OZDQglUVZaYNtfNXPd5rZmsVK8P u6WYIe5+RDVIQIl/IB1NYa7a67XkF4R1iGq7ix03EQ== X-Received: by 2002:a5e:dc08:: with SMTP id b8mr19358681iok.13.1600267655428; Wed, 16 Sep 2020 07:47:35 -0700 (PDT) MIME-Version: 1.0 References: <20200916134327.3435-1-brgl@bgdev.pl> <20200916142930.GK3956970@smile.fi.intel.com> In-Reply-To: <20200916142930.GK3956970@smile.fi.intel.com> From: Bartosz Golaszewski Date: Wed, 16 Sep 2020 16:47:24 +0200 Message-ID: Subject: Re: [PATCH next] gpiolib: check for parent device in devprop_gpiochip_set_names() To: Andy Shevchenko Cc: Linus Walleij , Mika Westerberg , Kent Gibson , Anders Roxell , "open list:GPIO SUBSYSTEM" , Linux Next Mailing List , Linux Kernel Mailing List , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Sure, I'll make a v2 then. Bart