Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2883166rwd; Mon, 29 May 2023 02:16:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ55Pm708pKBfH7IZ7qvHhB4lEdv3DdtNxCs+CwCTO9P7GgHJ+/zB48SHYQsZi3Ux0oOE6L+ X-Received: by 2002:a05:6a20:20c2:b0:105:94e5:f5c5 with SMTP id t2-20020a056a2020c200b0010594e5f5c5mr6719764pza.56.1685351804397; Mon, 29 May 2023 02:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685351804; cv=none; d=google.com; s=arc-20160816; b=YcgumPiRXnroLsIbpW4/NQdHEKTYQ7xCPtxFi6EBJRdw2ZaRcG0WYqCQ132JdjYx/z aN3XxYNBTxQIGpzDlqIK+8DamRT5TML0yj3O8z93lpbL0PlCbYEe81JAWeI+EJWe/MvR N+7fBOfLDieNDEgXhYPfVStph0WYgxSUCS7XfpBUoklz4TIGoKP7dbV5suVW3Q64SyRm XRfqhBBgL27g30EXIurSZjiIT+hMLZu//oiMIrwdgq4OqWljsixJaoOpmPe+MSurcDKe 1I+usljiJMwn71Jy/QpUfUnfMxK4E1rksDWYBuKMBuMnPAXHZOjIaW8SYUiCahIg2mR2 HRCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=czKe3+OmUvIsF46Cr74M2YagU7bLWoF6T2tvzMeSlIg=; b=DVZEVkSF1son5/o58F1ACew/O7EYk7Zh0ThSC9A2Igid++/HBd6acOev8BKpOp/Md1 j1VkRWzHOS71RtnaflGSRjR/MUr7cbH9trK29O0NP04YEnPdjXQsX76wPrj9fTS3kM/V ByvsUU4ZBOcswMPaLrHW4BvepEDf+xoEvUdOaqFH2+MLJfzdO4kAW6qEO9dcN0IX0xDM sdT15/BTsWEQf0yz5qhmWLxEbQsSiWKpw0Cs/7VcILEE96zRkdlHKmwO+zsqUeLPxQbn TqKHW9V2mHE/hWdWU63a4KkxnERUjqSV1rbvKnzTMwtSxnIGsdmisuumVP7ytord5w3V aQmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="O+A2G/w0"; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l65-20020a639144000000b005348f85f89fsi9342486pge.226.2023.05.29.02.16.31; Mon, 29 May 2023 02:16:44 -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=@linaro.org header.s=google header.b="O+A2G/w0"; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbjE2JIQ (ORCPT + 99 others); Mon, 29 May 2023 05:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231435AbjE2JIK (ORCPT ); Mon, 29 May 2023 05:08:10 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7766BB8 for ; Mon, 29 May 2023 02:08:08 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-565c7399afaso28511797b3.1 for ; Mon, 29 May 2023 02:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685351287; x=1687943287; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=czKe3+OmUvIsF46Cr74M2YagU7bLWoF6T2tvzMeSlIg=; b=O+A2G/w0fOq+1Ct3SKL09BppJX3dlGxHqIbZwduCd49YuqjHRRwvehja/JiS5c0V0B 342USrUWjCMDNqmrMyuNd+eEWhWMMy7m2DksTK6k50+Ha4cj+CUk2XLVVJ3WcK2WsYm6 o83IHJldC0MEoVSD49MGLKzDUqRKbp8HMeN9HD9+dO72HySbQGC2LKOlS7MEUpXPgJq3 WqgzfEPCH8gSUDFWaoqTDocj+LXRolU2s5nIw2FGB6QQFgF/PDjh2HTWBIj6nodnDfzi LIZmPg4qrAWPSqUFHDIR5OP0zRvTCcqjdTYOvTAJoNwkV2wkk9hoaUrPa4/IJmlDrNvI 6iMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685351287; x=1687943287; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=czKe3+OmUvIsF46Cr74M2YagU7bLWoF6T2tvzMeSlIg=; b=TAF+zJPy6Jjj34A+5iJ/ZSdEY9PH34wxUZaYYEq/F+CN5mtjy52KV3WLEGbf8ARTjU fDrMT9hRm+GvDv1gDiAY2GSKjgygRPrjlSt0KrKbW2kN+lXUa2k0lotEduaZzl39cnWX 6TYZDFtiQMvDxD+9EE6OSaAp1LBPEnTQ9zq60yjzF5lWgtsoopujWbQgqj5a/rQDyuHI WyPCYuPBbseNf4FSVe7oY+d4RL90iIJ2OiKGmAJfDPU8huZrmTNZqeOIwJDKBfBVWrtU yWEO9axP5DGFG9xuY4W38w3XX0/ceY1fsfBOsY3Bbv8GxntXqodO3rPBEyjFZRMrMpzD GMMw== X-Gm-Message-State: AC+VfDwojjRY3xTfwaWOw8xDvpRbfRUdcarKlDf5NWTwKYKtrhz4QTze LeUorh0DVV/rbMyzHVdxwPndk7kaQZi9kdD1t0X5lg== X-Received: by 2002:a0d:eb0d:0:b0:565:cf47:7331 with SMTP id u13-20020a0deb0d000000b00565cf477331mr10291900ywe.2.1685351287600; Mon, 29 May 2023 02:08:07 -0700 (PDT) MIME-Version: 1.0 References: <20230512042806.3438373-1-chris.packham@alliedtelesis.co.nz> <31a23398-9b0e-4a19-3576-84fcfd3ce4b5@alliedtelesis.co.nz> In-Reply-To: <31a23398-9b0e-4a19-3576-84fcfd3ce4b5@alliedtelesis.co.nz> From: Linus Walleij Date: Mon, 29 May 2023 11:07:56 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible() To: Chris Packham Cc: "brgl@bgdev.pl" , "johan@kernel.org" , "andy.shevchenko@gmail.com" , "maz@kernel.org" , Ben Brown , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 Wed, May 17, 2023 at 12:19=E2=80=AFAM Chris Packham wrote: > On 17/05/23 01:57, Linus Walleij wrote: > > On Mon, May 15, 2023 at 12:27=E2=80=AFAM Chris Packham > > wrote: > >> The crux of the problem is that the irq_desc is created when it hasn't > >> been requested. > > The right solution to me seems to be to not use gpiod_export() > > and not use sysfs TBH. > > That's not really a feasible solution. I'm dealing with application code > that has been happily using the sysfs interface for many years. I wonder how many years. The GPIO sysfs has been deprecated for seven years: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/D= ocumentation/ABI/obsolete/sysfs-gpio?id=3Dfe95046e960b4b76e73dc1486955d93f4= 7276134 My fear is that deprecation is ignored and people still develop stuff like this ignoring the fact that the ABI is deprecated. Yours, Linus Walleij