Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp454379ybl; Mon, 2 Dec 2019 13:19:05 -0800 (PST) X-Google-Smtp-Source: APXvYqw7awh8i298NmNbM4odYdss6JKQRpq6Os3u9m4SEk3RAyRZ90FXXdIltF3OAVCGelxs7gxF X-Received: by 2002:a9d:5f09:: with SMTP id f9mr865130oti.259.1575321545386; Mon, 02 Dec 2019 13:19:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575321545; cv=none; d=google.com; s=arc-20160816; b=bhXMLXstr61ft73I5ptqkVLyDWv6xHjhgaxYyFM5Y4qhhsBd7XZBwaG5ZjwVOr/IYi uyRSLrF8/zpx7g1vRhd2KKtRrJdMB2V0uHpNMAbhOd0FWFw/V/RurxEnHtuAS36ZIclS zKWSOHdglnCJcJWYLBBy1CM2Avb7YTCIooMNmmhQSZrgs+6ZGT9zE6vFYkhv/WlyTzNl vr/tsSBhiRin7Z6WvnEvgb1w5XixZt/jto8iUAA657WSUHebIUBHIky+CROFHVVWOJ1g 8P3r9/AensHyIhtMPgTOpj7VcAPoMX4Z5jlpPNu5XHp7UeApZIre1mQe/zDxz0TxzNeI wgLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eBAu2y5OTrfLJ0knw8xyLtClb0Hsf39F2SKdjv/zuuw=; b=ciYzimjEKThFj94qYb8lytXKGShp4t0yw2BJ9jiYk+5qq8GBAYhKSqsSg4znmPgQ3I 8TWQrPhp+8ecBh7jTdRkirfqQC1avKnJbLBOg+41jf6lvojATE7x4oksRQJdbl4MMWkm 0aOnlnrKNiqSk4H2fNtqgFlODl6Qfb20muRFlKMW3Pa5zvxTmlzIb1B4jC8XIH0+9q3e rCHT8cXWXCBsJjMg7A1ajE2R5jUVWqVN7w1SZng9wvezl8swxfDILXcLzhfNGg9t5TrG M47jPKBYNHHL9Qau8vv++LoHwwnM77gPB+GJ95FAr5+Cpf4jYb7SCKASad5vfsAya9s3 CkRw== ARC-Authentication-Results: i=1; mx.google.com; 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 g43si159116otg.223.2019.12.02.13.18.52; Mon, 02 Dec 2019 13:19:05 -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; 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 S1726824AbfLBVRu (ORCPT + 99 others); Mon, 2 Dec 2019 16:17:50 -0500 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:39332 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbfLBVRt (ORCPT ); Mon, 2 Dec 2019 16:17:49 -0500 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id EA9133C0579; Mon, 2 Dec 2019 22:17:46 +0100 (CET) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0ASiIrofYquI; Mon, 2 Dec 2019 22:17:40 +0100 (CET) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 540063C003B; Mon, 2 Dec 2019 22:17:40 +0100 (CET) Received: from vmlxhi-102.adit-jv.com (10.72.93.184) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 2 Dec 2019 22:17:39 +0100 Date: Mon, 2 Dec 2019 22:17:37 +0100 From: Eugeniu Rosca To: Geert Uytterhoeven CC: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Rob Herring , Mark Rutland , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , , , , , , , Eugeniu Rosca Subject: Re: [PATCH v3 1/7] gpiolib: Add GPIOCHIP_NAME definition Message-ID: <20191202211737.GA27915@vmlxhi-102.adit-jv.com> References: <20191127084253.16356-1-geert+renesas@glider.be> <20191127084253.16356-2-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20191127084253.16356-2-geert+renesas@glider.be> User-Agent: Mutt/1.12.1+40 (7f8642d4ee82) (2019-06-28) X-Originating-IP: [10.72.93.184] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Wed, Nov 27, 2019 at 09:42:47AM +0100, Geert Uytterhoeven wrote: > The string literal "gpiochip" is used in several places. > Add a definition for it, and use it everywhere, to make sure everything > stays in sync. > > Signed-off-by: Geert Uytterhoeven > --- > v3: > - New. > --- > drivers/gpio/gpiolib-sysfs.c | 7 +++---- > drivers/gpio/gpiolib.c | 4 ++-- > drivers/gpio/gpiolib.h | 2 ++ > 3 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h > index ca9bc1e4803c2979..a4a759920faa48ab 100644 > --- a/drivers/gpio/gpiolib.h > +++ b/drivers/gpio/gpiolib.h > @@ -16,6 +16,8 @@ > #include > #include > > +#define GPIOCHIP_NAME "gpiochip" [.02$/nit] I wonder if GPIOCHIP_NAME is actually an essential part of kernel-user contract [1-2], in which case it could probably be moved to include/uapi/linux/gpio.h ? Regardless: Reviewed-by: Eugeniu Rosca [1] linux (v5.4) git grep '"gpiochip' -- tools/ tools/gpio/lsgpio.c: if (check_prefix(ent->d_name, "gpiochip")) { tools/testing/selftests/gpio/gpio-mockup-chardev.c: if (check_prefix(ent->d_name, "gpiochip")) { [2] libgpiod (v1.4-76-g00418dfdfc8b) git grep '"gpiochip' lib/iter.c: return !strncmp(dir->d_name, "gpiochip", 8); tests/mockup/gpio-mockup.c: rv = sscanf(sysname, "gpiochip%u", &chip->num); tools/gpioget.c: die("gpiochip must be specified"); tools/gpiomon.c: die("gpiochip must be specified"); tools/gpioset.c: die("gpiochip must be specified"); -- Best Regards, Eugeniu