Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1241963rwd; Sun, 14 May 2023 15:51:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5DW9ocYI14TjzNDC+F0hHln8MEPbrqVtMapi7126cZqeCkZ1Z0D/MW/7ywAniiyLh9hzNT X-Received: by 2002:a17:90a:8a8d:b0:24e:69e:71f with SMTP id x13-20020a17090a8a8d00b0024e069e071fmr30375385pjn.7.1684104675524; Sun, 14 May 2023 15:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684104675; cv=none; d=google.com; s=arc-20160816; b=QxkjxPQu/dk4uKJ2HeZOX3y5+wyf3tlvXz8Ln0RRjP83O+TTcmZmnvYQNcSFdaTBvk J53h0NeaT4uXw24D+q+ohzpQGXfkZL1PlTlmCoZxQUDwMNk9VnaTdQ0cKFLWpljDMEWu AaM8DVmpsKS+CisOV4tGQjvZjKQVBvLH6ZGqU7ownSiF39eeTZVHWXy+OOjlP2q3Bjqi 35UU1eyhWtUzLxL9Wam+7LzxXqmGrO03id4TKrBWg5YOBx7yLu6Zm1UGnv2E6ofi3PzW L8lcH4Xz45S3dXnyZ2Jm+WxnwSESekwLeqLKxjlKrNWrZzClHNXV6p8SmKpjkX8Jej9s aY6w== 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=JeDX45idLyAjJeK4Qpwm2w1/vop2BI8SWEa3eOTQ/4k=; b=AjI1CzxUQnjiKaE7r8Wm/IS5dz8zal/GES6wjqgNEMV8XlTI1fuIe4iqCeuP6u49sR LG7pgZRBOaXUM29DnryM5uoVqVp9BZxOjJCVcaY8Np4gPbz+h+Kpm1A34QqiPdrrjTbC LyXL5bRG5F2sbQq4r10mx3IkVUPlSciIG2EchkSKg4LFd5aD6XIZMg2uHWzB8QTeLTfI v3CZZxnRN1J9oQw4tzGJ8yqd924ANd204f8Yr2E9BQpSHQJrGCAUfo+S5ZtQboTYjMiE nNOw8YUoybTJ2/ShymyDpJo3OrxQLqBSFjT3qYBXa34MUIHhJzFJievAXLMowSOaU0ru lYtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=E8aXm5JT; 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 f9-20020a17090ace0900b002527f171401si10481943pju.182.2023.05.14.15.51.01; Sun, 14 May 2023 15:51:15 -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=E8aXm5JT; 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 S233729AbjENV6G (ORCPT + 99 others); Sun, 14 May 2023 17:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjENV6F (ORCPT ); Sun, 14 May 2023 17:58:05 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0DEE1B1 for ; Sun, 14 May 2023 14:58:02 -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 A546C2C0616; Mon, 15 May 2023 09:57:59 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1684101479; bh=JeDX45idLyAjJeK4Qpwm2w1/vop2BI8SWEa3eOTQ/4k=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=E8aXm5JTSLl9mZugZJgeNLfzDQGW/WSHeKZJsDR1Ugt4AY7Ivjm2EXCuRULFTKbM9 fo4RledFP9AMlSMDfDYuDfuMpnFyH1CQOQOgchFRfgUfQkoDS3njYyZ5t62JGWUNZB XDTaEP7gYXnzHgJamYmH20+Ex8OYFgqqNIvYw1fPTghM5tVlWaEWBmzLSZk5lcVGzF Q5/qd2bgdmnbfN1+F7eBOeiZon1FDVkis5xysK1CxpzKKv47eDfXDvWLw2qiMY+g7K oSeQlPe2mHT/ZxVCQqWW9tOxXGrGXjxxGrGo08i9wJqGUV1jEjm066kaBkAIZPI7Fs mLIXReplQ6EFw== 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, 15 May 2023 09:57:59 +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, 15 May 2023 09:57:59 +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, 15 May 2023 09:57:59 +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, 15 May 2023 09:57:59 +1200 From: Chris Packham To: Johan Hovold CC: "linus.walleij@linaro.org" , "brgl@bgdev.pl" , "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+f53K9Vc1EAgAQYugA= Date: Sun, 14 May 2023 21:57:58 +0000 Message-ID: <2265adee-e003-08ae-e66d-fb41bdd79122@alliedtelesis.co.nz> References: <20230512042806.3438373-1-chris.packham@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: <7073B9F3EF69294B989A10B1BB7B59F2@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=62ntRvTiAAAA:8 a=VwQbUJbxAAAA:8 a=7-fA9F3rEMDvrztMVqEA:9 a=QEXdDO2ut3YA:10 a=pToNdpNmrtiFLRE6bQ9Z:22 a=AjGcO6oz07-iQ99wixmX:22 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 DQpPbiAxMi8wNS8yMyAxOToyNCwgSm9oYW4gSG92b2xkIHdyb3RlOg0KPiBPbiBGcmksIE1heSAx MiwgMjAyMyBhdCAwNDoyODowNlBNICsxMjAwLCBDaHJpcyBQYWNraGFtIHdyb3RlOg0KPj4gQ2Fs bGluZyBncGlvZF90b19pcnEoKSBjcmVhdGVzIGFuIGlycV9kZXNjIGZvciB0aGUgR1BJTy4gVGhp cyBpcyBub3QNCj4+IHNvbWV0aGluZyB0aGF0IHNob3VsZCBoYXBwZW4gd2hlbiBqdXN0IGV4cG9y dGluZyB0aGUgR1BJTyB2aWEgc3lzZnMuIFRoZQ0KPj4gZWZmZWN0IG9mIHRoaXMgd2FzIG9ic2Vy dmVkIGFzIHRyaWdnZXJpbmcgYSB3YXJuaW5nIGluDQo+PiBncGlvY2hpcF9kaXNhYmxlX2lycSgp IHdoZW4ga2V4ZWMoKWluZyBhZnRlciBleHBvcnRpbmcgYSBHUElPLg0KPiBZb3UgbmVlZCBhIGJl dHRlciBleHBsYW5hdGlvbiBhcyB0byB3aHkgdGhpcyBpcyBhbiBpc3N1ZS4gV2hhdCBkb2VzIHRo ZQ0KPiB3YXJuaW5nIGxvb2sgbGlrZSBmb3IgZXhhbXBsZT8NCg0KSXJvbmljYWxseSBJIGhhZCB0 aGF0IGluIG15IGZpcnN0IGF0dGVtcHQgdG8gYWRkcmVzcyB0aGUgaXNzdWUgYnV0IHdhcyANCnRv bGQgaXQgd2FzIHRvbyBtdWNoIGRldGFpbC4gU28gbm93IEkndmUgZ29uZSB0b28gZmFyIHRoZSBv dGhlciB3YXkuIA0KSSdsbCBpbmNs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