Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2652417rwd; Sun, 28 May 2023 21:21:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sgmKD1veDDdOzabYY1cDzT53rOoJGWUx+OvfshkU7L4Qpfp0nZzeu7N2Mg5i8HNyaF02m X-Received: by 2002:a05:6a21:6d89:b0:10d:6dc6:32df with SMTP id wl9-20020a056a216d8900b0010d6dc632dfmr8978461pzb.34.1685334104938; Sun, 28 May 2023 21:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685334104; cv=none; d=google.com; s=arc-20160816; b=TEx2WY6IybgnGWqvewCBP9TW6T/Mpf/cuVdPyNLh9pkfyCeaKTumryW25Dk8N18Vgh KDPStRiKg+A9SOUaOHLRs02rKjTpIeNpGS9Z31MDgfvGDV8Ar6EtjOcHT0y/ooGF/Ay7 lwq/U7WR+vtPYVrxSwuRnaBI6tkYAHA9Nvhy/AhXD0d0a3gsrhO7q5qmJP7FSePOPP+b s53IAkh4Ux22/5FbveXtBp/3ks5pWYKWpjyr9CBuWQLZ8J/9dd7pZHOZaOkXmFW48GO9 6hQe72o5SEbGMnjwarvTmMGTBgxB0rKS0jz+Hg2u1rkW4SNAdkcBCU6Fg9HRmr2rVHKC M6/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=oKlYQC0LT6sfil+DPN2R63ASzsz4+4zowbTWgSU7fY8=; b=MXyInRuOn2qAZ3lfD2jRGoeu4CDILwSWiAE0tH7CW0OiTDh0gjiYzBnRv/tVub1ldT IIJM+U1Ls2hpnhhm8tYE5rO4QNDWUqzxl4/Ttu9eeCULIWTsB2qw88AogXc+JrX9eCoe S92lcfCHbqjEFzIG6K3JYLr5/TSUBYvPz3JQoHZqHMO0TdO6qniH6CSG5KuPVj+fhEC/ F6yjRgF1maeG+yKN8Zh11IbSNFEpjn46GN0TSvInwe7zcKyZwk80zJVphwnZc7CsR+dp Z4QWtV/HZYqGtdgpmS5b0vIgJ48mcI0O1ZyOkNkrNgH/1FtG6/D11XBMEchW7EJbQcWC Zgdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=q8eE82hf; 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=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a621807000000b0063d45a6d0e5si7584089pfy.17.2023.05.28.21.21.30; Sun, 28 May 2023 21:21: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=@alliedtelesis.co.nz header.s=mail181024 header.b=q8eE82hf; 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=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbjE2EIV (ORCPT + 99 others); Mon, 29 May 2023 00:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230512AbjE2EIT (ORCPT ); Mon, 29 May 2023 00:08:19 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9D1AF for ; Sun, 28 May 2023 21:08:16 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 191472C0596; Mon, 29 May 2023 16:08:14 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1685333294; bh=oKlYQC0LT6sfil+DPN2R63ASzsz4+4zowbTWgSU7fY8=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=q8eE82hfZHB/48waBxAYHQeP0R0gMP6+Ou/5fjSBck72VnFnYbEwHOyBGCoxsdDE3 eRq+i5wIh1ivcURrQP3S9uzqBLSZEHe9cv9PS3J0Mgaok7ds7Wm5LOwacsAtFVEDXb 1CBDAbr35lSPNJ3oKAFVcvmtZ3fjpK53Dbij1RZmmUHGP7BrT5f0WhWWj9CrjYhvOa jgm054H0xXjqjJMrN3kJ+uisoMKIybH4snCzUKVgOsW7sjY4e23XplqUlRQXU8ACLR tE4SXRE5f48T+5x9NZhs0yevOhOhO/MBqAPdHeRZ7dCSmq24VPhqyz7oqx9RUQVU5X /LIFIjMxqNlKQ== Received: from svr-chch-ex2.atlnz.lc (Not Verified[2001:df5:b000:bc8::76]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Mon, 29 May 2023 16:08:14 +1200 Received: from svr-chch-ex1.atlnz.lc (2001:df5:b000:bc8::77) by svr-chch-ex2.atlnz.lc (2001:df5:b000:bc8::76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1118.26; Mon, 29 May 2023 16:08:13 +1200 Received: from svr-chch-ex2.atlnz.lc (2001:df5:b000:bc8::76) by svr-chch-ex1.atlnz.lc (2001:df5:b000:bc8::77) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 29 May 2023 16:08:13 +1200 Received: from svr-chch-ex2.atlnz.lc ([fe80::a9eb:c9b7:8b52:9567]) by svr-chch-ex2.atlnz.lc ([fe80::a9eb:c9b7:8b52:9567%15]) with mapi id 15.02.1118.026; Mon, 29 May 2023 16:08:13 +1200 From: Chris Packham To: Johan Hovold , Bartosz Golaszewski CC: Andy Shevchenko , "linus.walleij@linaro.org" , "maz@kernel.org" , "warthog618@gmail.com" , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] gpiolib: Avoid side effects in gpio_is_visible() Thread-Topic: [PATCH v2] gpiolib: Avoid side effects in gpio_is_visible() Thread-Index: AQHZig/BTFGZ3AxBtUaao6thQCRKf69gloYAgAswboCAAAZKAIADqjcAgABxoIA= Date: Mon, 29 May 2023 04:08:13 +0000 Message-ID: References: <20230519050702.3681791-1-chris.packham@alliedtelesis.co.nz> <47cf842e-5ff5-e185-6f8f-351e886047b6@alliedtelesis.co.nz> In-Reply-To: <47cf842e-5ff5-e185-6f8f-351e886047b6@alliedtelesis.co.nz> Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.33.22.30] Content-Type: text/plain; charset="utf-8" Content-ID: <2028263B5443BF45B4A64C2ACC63421F@atlnz.lc> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.3 cv=cLieTWWN c=1 sm=1 tr=0 a=Xf/6aR1Nyvzi7BryhOrcLQ==:117 a=xqWC_Br6kY4A:10 a=75chYTbOgJ0A:10 a=IkcTkHD0fZMA:10 a=P0xRbXHiH_UA:10 a=pGLkceISAAAA:8 a=K8AQLKREUDc6VxAMmqQA:9 a=QEXdDO2ut3YA:10 X-SEG-SpamProfiler-Score: 0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 DQpPbiAyOS8wNS8yMyAwOToyMSwgQ2hyaXMgUGFja2hhbSB3cm90ZToNCj4NCj4gT24gMjcvMDUv MjMgMDE6MjMsIEpvaGFuIEhvdm9sZCB3cm90ZToNCj4+IE9uIEZyaSwgTWF5IDI2LCAyMDIzIGF0 IDAzOjAxOjAxUE0gKzAyMDAsIEJhcnRvc3ogR29sYXN6ZXdza2kgd3JvdGU6DQo+Pj4gT24gRnJp LCBNYXkgMTksIDIwMjMgYXQgMTI6MDnigK9QTSBBbmR5IFNoZXZjaGVua28NCj4+PiA8YW5keS5z aGV2Y2hlbmtvQGdtYWlsLmNvbT4gd3JvdGU6DQo+Pj4+IE9uIEZyaSwgTWF5IDE5LCAyMDIzIGF0 IDg6MDfigK9BTSBDaHJpcyBQYWNraGFtDQo+Pj4+IDxjaHJpcy5wYWNraGFtQGFsbGllZHRlbGVz aXMuY28ubno+IHdyb3RlOg0KPj4+Pj4gT24gYSBzeXN0ZW0gd2l0aCBwY2E5NTU1IEdQSU9zIHRo YXQgaGF2ZSBiZWVuIGV4cG9ydGVkIHZpYSBzeXNmcyB0aGUNCj4+Pj4+IGZvbGxvd2luZyB3YXJu aW5nIGNvdWxkIGJlIHRyaWdnZXJlZCBvbiBrZXhlYygpLg0KPj4+Pj4NCj4+Pj4+IMKgwqAgV0FS TklORzogQ1BVOiAwIFBJRDogMjY1IGF0IGRyaXZlcnMvZ3Bpby9ncGlvbGliLmM6MzQxMSANCj4+ Pj4+IGdwaW9jaGlwX2Rpc2FibGVfaXJxDQo+Pj4+PiDCoMKgIENhbGwgdHJhY2U6DQo+Pj4+PiDC oMKgwqAgZ3Bpb2NoaXB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