Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1425823rwd; Tue, 16 May 2023 17:33:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4knmEqTn0m9sGOUT4xUAhC7q6o95aVFzt4DsNr7qGjMNCjQcbYJ9EItpEPxZhytUjUqq78 X-Received: by 2002:a05:6a20:4283:b0:101:17e2:5d4 with SMTP id o3-20020a056a20428300b0010117e205d4mr38977887pzj.39.1684283604259; Tue, 16 May 2023 17:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684283604; cv=none; d=google.com; s=arc-20160816; b=U8mANRx6Q1teVwBTEhGLeldv7EdyyrD4qUSoqVCyAp7zuSTdwwuZ/XaUNG0EjTACZ0 Q4stJ6lZMyyj8dtLM6J/CCE7D3W43Ui/NjhBUSjxK2K954c2qD/ntIOsJRjFVKGnPd6i GDTiK74tMdmbayqErub/GcEI8+uSo7oG4yK9MjGsjzknhdCQFwR6iWDBw1wYFicArt85 skwnTTKv2zhCaRkfHjUCGvl7CmRXZD10pnKF+EITSWjdcorQddPgr0bBg8hKi9mQLAfn zspL/5lK5TSO5Ay/8pQc8CG1NwLT2h0qo6lX9rHpdhtvE01KvcZeAugmvj3HxgaF/0xB wB/A== 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=3D1Qeg9Vdm2SO2BYRMW3uU/dp1GudVa7VV/Yx6qdljs=; b=bEoA5ymtRoeycEsHzzayZ9Ha3uDh4738z1VzVyrxgCzqCduWSatKe+eHxOjcWImvye TemSjK9JuALXFfZqhk/ox2y6YxirV6PGx7NACwCschmKaCtHrUg4k7GhEwp858u/9eJI nS6mYCHozQAXYU5NhFyO4f82pKxkgKV9C4XzPv5cNWM5vy57LVDgoYwyRdWu9wjH1wTd 0XbYzI9ZcHYiZrPTB39GezozNIe+aFFOK2XCfYVECIM6Pn2f9wLf19GtDGYSbgghOemk tabFyurqT4nt1DWXh7wspay0MNvaIjLIh52LbL6XT3/SEjajCdfyBWkSAIWL1xvZEDK3 pnJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=EIimZDit; 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 v30-20020a63b95e000000b0053440fe17b0si2093301pgo.623.2023.05.16.17.33.09; Tue, 16 May 2023 17:33:23 -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=EIimZDit; 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 S229452AbjEPXuv (ORCPT + 99 others); Tue, 16 May 2023 19:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjEPXuu (ORCPT ); Tue, 16 May 2023 19:50:50 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71AB7527C for ; Tue, 16 May 2023 16:50:47 -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 D6FDB2C04E1; Wed, 17 May 2023 11:50:43 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1684281043; bh=3D1Qeg9Vdm2SO2BYRMW3uU/dp1GudVa7VV/Yx6qdljs=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=EIimZDitC0lLMiMFeO6XI8fLS3c/bvjuKrlKKoY11IIfwx6vTAwEMA6nQcYs1BCdl 4hxn3dfwcNBeRVLv9Rb/GQcsdY0VsmbxJhYWpxFnOquqB1RbS9/rCwp1RR+rq6x+dR +w/LNysmOuBg5TLBGEXcPyj5SLR9xy+R2zeEtCe5fk6ccu0aTL8Q2plPbiHpq4GV+u hgLt6VzjNtJ6zgZREjQneCWB49pXodYdIKnw+wX6yFNfvHnQFw77I1VbITgW3aJIRA lzj+gPoo6KWQvqXl0vJy0R1v7f+r0ufKZ+DGp7NK2D99o7B0C+rZ+4BJK/odgKV3WS JAKmFAvYCesXA== 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 ; Wed, 17 May 2023 11:50:43 +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; Wed, 17 May 2023 11:50:43 +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; Wed, 17 May 2023 11:50:43 +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; Wed, 17 May 2023 11:50:42 +1200 From: Chris Packham To: Kent Gibson CC: Linus Walleij , "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" Subject: Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Thread-Topic: [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Thread-Index: AQHZhIoofApft8Zm8kuYZtpxH+f53K9VfDeAgAQYHQCAApZDgIAAjA4AgAAH1ICAABG6AA== Date: Tue, 16 May 2023 23:50:42 +0000 Message-ID: References: <20230512042806.3438373-1-chris.packham@alliedtelesis.co.nz> <31a23398-9b0e-4a19-3576-84fcfd3ce4b5@alliedtelesis.co.nz> In-Reply-To: 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: <84A7B75C14345E4490F53D57F5980578@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=ZguqjsaIh1nrprT209UA: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,URIBL_BLOCKED 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 SGkgS2VudCwNCg0KT24gMTcvMDUvMjMgMTA6NDcsIEtlbnQgR2lic29uIHdyb3RlOg0KPiBPbiBU dWUsIE1heSAxNiwgMjAyMyBhdCAxMDoxOToxNFBNICswMDAwLCBDaHJpcyBQYWNraGFtIHdyb3Rl Og0KPj4gT24gMTcvMDUvMjMgMDE6NTcsIExpbnVzIFdhbGxlaWogd3JvdGU6DQo+Pj4gT24gTW9u LCBNYXkgMTUsIDIwMjMgYXQgMTI6MjfigK9BTSBDaHJpcyBQYWNraGFtDQo+Pj4gPENocmlzLlBh Y2toYW1AYWxsaWVkdGVsZXNpcy5jby5uej4gd3JvdGU6DQo+Pj4NCj4+Pj4gSW4gbXkgb3JpZ2lu YWwgY2FzZSB3aGljaCBpcyBhIGtlcm5lbCBtb2R1bGUgdGhhdCBleHBvcnRzIGEgR1BJTyBmb3IN Cj4+Pj4gdXNlcnNwYWNlIHVzaW5nIGdwaW9kX2V4cG9ydCgpDQo+Pj4gV2Ugc2hvdWxkIG5vdCBh ZGQgbmV3IHVzZXJzIGZvciB0aGF0IEFQSSBhcyBpdCBpbmNyZWFzZSB0aGUgdXNhZ2UNCj4+PiBv ZiB0aGUgc3lzZnMgQUJJIGJ1dCBpZiBpdCdzIGFuIGV4aXN0aW5nIGluLXRyZWUgdXNlY2FzZSBJ IGJ1eSBpdC4NCj4+Pg0KPj4+PiBUaGUgY3J1eCBvZiB0aGUgcHJvYmxlbSBpcyB0aGF0IHRoZSBp cnFfZGVzYyBpcyBjcmVhdGVkIHdoZW4gaXQgaGFzbid0DQo+Pj4+IGJlZW4gcmVxdWVzdGVkLg0K Pj4+IFRoZSByaWdodCBzb2x1dGlvbiB0byBtZSBzZWVtcyB0byBiZSB0byBub3QgdXNlIGdwaW9k X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