Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3913994imw; Mon, 11 Jul 2022 19:40:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjOIsUnqz3y+6wFdKKu8KojwiXCG6HbO//qxSQSm2VL9ztypTkaH05n6u/q+whFQCi7uq1 X-Received: by 2002:a17:906:84ef:b0:72b:7649:f5bb with SMTP id zp15-20020a17090684ef00b0072b7649f5bbmr2797917ejb.637.1657593632739; Mon, 11 Jul 2022 19:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657593632; cv=none; d=google.com; s=arc-20160816; b=UX2S4KWUyWUD85C4o6CHxSbZzo4shGL5Mn0pQtx+3qJwoGDFO5A+Ptq4Bus5/mP8Zm KvtYx5KLpJHh/+ORfEQncpi6VrCPzHaY+37TevkRhcCYpHc1weE6xslLn22VW0mHFKkX slJqlrkFsE8IOd70tQ4fdW77Cf2/blwxdQNnv35s98NPbS0YwWuWeMGisS4GsJtiCJ9Q UMPJRT+q6QTlRzkLUP+j83uWKZtb0LmrlNA0uLpKFnewqs/vHinMtEikHeuJ8TpHiKig o4cKMoPjI2t6HF28lFfMdfbbSut+ZE2T/cbsJJtE5TLzm1HlS94Hzo3C3mkdxNFOtucJ /GBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IxoTNA/zDnsySFdAYo8chOzZkaHvLP42Ut6JOgZ89yU=; b=wYQdDKOpl8VFwZ1VPyHA9vUiIJchmkQJCYZiGfQEG3EO3/yx/ZFr6mnfxJjb6i6wDZ 4t3s5HXkT+aDYPCNnlkn6xF+9qWP4cSkJGUt6bJ/lc4/Wj7VVgB9F/Feag7/9cHKX5ip jvUnCaahGtQvg7ztqdlSqwhDv1P+cSa4kuV2q1Cm2t9Ok3rSx4Lvmc0qYQoUMSQTobvY VLZGreREySo4HxOYjAc2xSMAxaFqKsbmasfxgeozIsYZGFpkVXRGDLpIPnIGimWEyYd6 6WeZSn7ur3rlYTY9erWlQmQ2QD7bTzhz07Iee3RHUPQvhTAtebG25wOtG6lTmnWd9CP1 SAYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C4iGv5VG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt31-20020a1709072d9f00b0072b66c5cdb5si5380816ejc.519.2022.07.11.19.40.03; Mon, 11 Jul 2022 19:40:32 -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=@gmail.com header.s=20210112 header.b=C4iGv5VG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230073AbiGLCh1 (ORCPT + 99 others); Mon, 11 Jul 2022 22:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbiGLChZ (ORCPT ); Mon, 11 Jul 2022 22:37:25 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 415028CC9F; Mon, 11 Jul 2022 19:37:21 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id z1so6063602plb.1; Mon, 11 Jul 2022 19:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IxoTNA/zDnsySFdAYo8chOzZkaHvLP42Ut6JOgZ89yU=; b=C4iGv5VG2K/dDKqOMaykdf00mFnMNKz49RWIQBvaU8bCZSy8K0xMd9LSXYz3M8byWD UZklB8NdFtYahKUv0PnS3njEpEoHrVQClHJlSjmLuH6rogryhbJGkYS32XvDCNm3SorJ gn+CfXNJl4uZgmVFqaESl8usitUihOJ4DOa0Ww+NTXbSYt9DikkbRJ3S99E/RWJBK1Sx SjPYYdAnBu0igO7IRRpTeyE4KoYkZE+BnG1xBJ2eLbW0D7I44mi2L1diqCCF5t1irJhD Tj8yqSu0cY51KWbholhgtnepNjQxsquX3iMtidfnThxmwoWdeYgr9hBCAlP6T/aOJt++ Mizw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IxoTNA/zDnsySFdAYo8chOzZkaHvLP42Ut6JOgZ89yU=; b=Gw7ZIK7eOa54PMxYcuPmWsByueevMNpFxhiqZk572ENrCAa7WXzK0t2Wf/yfV+16Pd dZjfBQBa/sHttrWgJEr3PU8sNtUl45Hlfe/1kfAOHImCK5FDB9piehS6E6t21Nobefme CffTBpzuyStUd0TI/5wzRCcqEzLaeE1BkAHKsstcgYytGj+qFJmYJ2Jb5aLssCxn07Tq V44DIpqnzVwisMPbKZEzfYnMzDkcDkluAYsqa/kNahMqMn8jg6W0fXJuCyQ30EyOWOm9 kApq+g1rAZyV0AUMFTmFcknjLf7u4kNeyAQ+0Neohdl6pV/Fw8VmuVG5WYqH9QEckVV/ bw6Q== X-Gm-Message-State: AJIora8qPE0qDxQr+9uZx9ZmZJqhA7moNZwXB+p27/DWhx9pozwnH0v6 rxBUE7i/gzKFOT011DhM7knqHbiAeTs= X-Received: by 2002:a17:90b:388e:b0:1f0:3d7f:e620 with SMTP id mu14-20020a17090b388e00b001f03d7fe620mr1655103pjb.31.1657593440778; Mon, 11 Jul 2022 19:37:20 -0700 (PDT) Received: from sol (110-174-58-111.static.tpgi.com.au. [110.174.58.111]) by smtp.gmail.com with ESMTPSA id j7-20020a625507000000b0052ac2e23295sm4006716pfb.44.2022.07.11.19.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 19:37:19 -0700 (PDT) Date: Tue, 12 Jul 2022 10:37:14 +0800 From: Kent Gibson To: Bartosz Golaszewski Cc: Linus Walleij , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] gpio: sim: fix the chip_name configfs item Message-ID: <20220712023714.GA9406@sol> References: <20220711173418.91709-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220711173418.91709-1-brgl@bgdev.pl> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 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.