Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4085617imw; Tue, 12 Jul 2022 01:10:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tntxliP6rtXOIRRXkc6DXLOhL39KT2grlN946oFU/uoOzorubfkPFjkG/YaLVbcuyfONoq X-Received: by 2002:a17:906:847c:b0:72b:4188:f940 with SMTP id hx28-20020a170906847c00b0072b4188f940mr14167917ejc.552.1657613419659; Tue, 12 Jul 2022 01:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657613419; cv=none; d=google.com; s=arc-20160816; b=Z4Vpw4b+n0zxSnu/dPbonQ+45kboXJFsoX77prMPW85gIpu093reZFoBlI9dmAwoyK rInQNrSW+UEAzW1Am9C7ZsuZRTgLfrZAhqxEykhCbbZ0d65zaOWuhlMiDHAO9rUXSyQx 8V97vtVSoY3ta5c3PAyuy0HjYc2DSv5NHKs0WDo8TWRwkyrf+xJwFvKqlV1uEiTvWWHm 9mV4nZctj4DehcYwI8x0neRbwq+MJs+dXJH2QXFfHccoqnZtfkBsQ5yL6tMW1Kcw4hyv 1sHwe+Ho6OC7iVREmoWUNm9cM/qxQLyemtcNpHNNBbRSj8MicnMM3ah/g3EW53EqxwG3 qRsg== 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=NSrNMqUgWaYuH+mTVW1bDRg+I5uODANEes06ggGuCQ8=; b=REhIYY5UZY+XXZEOpAA0HWAtNEJ54semB9Ha5D6DWj0JPktiY+45sLFGjpYRW67I79 jfUQUNCFAgpjNpaWoDkE8PXlaKEQ23T8B6PMdsgJlZwnQ75NKgH9XmHDfUOKzPzJy8er F1wOdEcVwjRsyUDqzf35djWJnKAmZLIFJAOO4ZaUbfJOTWMNHOrDrt5Fnr2L1O1E5cqW qLARz+2cmJu2ZIRDGzWxWZvqP1lMT1srhYRtnQsfAvzN63tCxniIdqpJicvti1S7fqko S990vj+C9HQ6wyJ3d9ecffpDKDdSGyAHktIw3jh6N5oT58uGGTbPSFe0OyDgJCsiGTLk mEig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=hSinwd2+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a170906345200b00726e16c2d4fsi1781468ejb.178.2022.07.12.01.09.42; Tue, 12 Jul 2022 01:10:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=hSinwd2+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232398AbiGLHly (ORCPT + 99 others); Tue, 12 Jul 2022 03:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbiGLHlt (ORCPT ); Tue, 12 Jul 2022 03:41:49 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C9959B9C5 for ; Tue, 12 Jul 2022 00:41:48 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id b11so12782901eju.10 for ; Tue, 12 Jul 2022 00:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NSrNMqUgWaYuH+mTVW1bDRg+I5uODANEes06ggGuCQ8=; b=hSinwd2+o7s7Z5GqAva/JbWo3c3bbU31+fz4J9bmDcla74i63981XKzdYwltOdOu1s 2jTGjN6+qb5wlVV+hkl0h60UYgDH8kFDFL2aVikT8YCXbwim0ernZtNOJWgcZbcLbb2i PdZr11THsg6zAbwfwDrRoSIduA+KV9lUAknSTADM1h0faJPFYZo/mf86nSUbWkClq5Mp 52rUpSHWGHvwV/UJ1DbTRI/iEgEA0ZuaV0I/zwH8xzq5VaxPhbdIqHoWScSbZ4olJSPO CfUTV8fs2HWp92EhfeTstC8tbHSSCX/trZxM0SQybm5vscnXl8h0QEebFp1UHZlMj3zm xCQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NSrNMqUgWaYuH+mTVW1bDRg+I5uODANEes06ggGuCQ8=; b=O336idSVP6qiAelHRB16jGff57gZ4e1BtUpspQnm+2Dp11IxAF/dQ20G9UniYb/BWo NihC77NUdJi99bIGk8N+I12WqPg/R6jgUCWbdhqskAfHHtwCR5t4pjseMinNTU1bYDqW N+9/jPjry+yel3T8bOdDSWx+haJ+RUU9NDlFbKvSr4edKwc9WBfqVkf/JDqoA2WzeI4+ OcOkkUwew6YzxU21bi8DN5Z3UAqQqFBjGFzMCRseVJavVncUUndL8UFSsdmUelYtZiQl 6WM88CN6ZTjoghbmuSnn5dqmKQkTW7/VcV0tNq3c1jbU8XDckqEshf9JW4fI1VU2sDCg J75w== X-Gm-Message-State: AJIora/AV1723u1YSG6OUJ0VqBFeKx3sqocxwMfqzcSF8b0J/h6G4De9 UlzCA75oholsta0BskVOdLzxQcXiRXKQw4ho8deK+w== X-Received: by 2002:a17:907:cc14:b0:726:3555:ac63 with SMTP id uo20-20020a170907cc1400b007263555ac63mr21853308ejc.697.1657611706834; Tue, 12 Jul 2022 00:41:46 -0700 (PDT) MIME-Version: 1.0 References: <20220711173418.91709-1-brgl@bgdev.pl> <20220712023714.GA9406@sol> In-Reply-To: <20220712023714.GA9406@sol> From: Bartosz Golaszewski Date: Tue, 12 Jul 2022 09:41:36 +0200 Message-ID: Subject: Re: [PATCH] gpio: sim: fix the chip_name configfs item To: Kent Gibson Cc: Linus Walleij , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , stable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 12, 2022 at 4:37 AM Kent Gibson wrote: > > On Mon, Jul 11, 2022 at 07:34:18PM +0200, Bartosz Golaszewski wrote: > > The chip_name configs attribute always displays the device name of the > > first GPIO bank because the logic of the relevant function is simply > > wrong. > > > > Fix it by correctly comparing the bank's swnode against the GPIO > > device's children. > > > > That works for me, so thanks for that. > > Not totally convinced by Andy's suggestion to rename swnode to fwnode. > Variables should be named for what they represent, not their type, and > you use swnode extensively elsewhere in the module, so either change it > everywhere or not at all, and such a sweeping change is beyond the scope > this patch. > > Though it may make his other suggestion to use device_match_fwnode() > read a little better. No issue with that suggestion. > > Cheers, > Kent. I agree on device_match_fwnode() and disagree on the swnode rename. v2 sent out. Bart