From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2149C433E0 for ; Tue, 22 Dec 2020 16:28:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADDD42312E for ; Tue, 22 Dec 2020 16:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727365AbgLVQ17 convert rfc822-to-8bit (ORCPT ); Tue, 22 Dec 2020 11:27:59 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:36188 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726931AbgLVQ17 (ORCPT ); Tue, 22 Dec 2020 11:27:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3D5E3BFC9F; Tue, 22 Dec 2020 16:27:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1X26B3-7hQwg; Tue, 22 Dec 2020 16:27:18 +0000 (UTC) Received: from jupiter (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EE1EEC2CCB; Tue, 22 Dec 2020 16:27:05 +0000 (UTC) From: Simon South To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: linux-pwm@vger.kernel.org, heiko@sntech.de, bbrezillon@kernel.org, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, tpiepho@gmail.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/3] pwm: rockchip: Eliminate potential race condition when probing References: <20201221085047.nyl7hacd4imp37qi@pengutronix.de> Date: Tue, 22 Dec 2020 11:26:59 -0500 In-Reply-To: <20201221085047.nyl7hacd4imp37qi@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Mon, 21 Dec 2020 09:50:47 +0100") Message-ID: <875z4trelo.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Uwe Kleine-König writes: > I wonder if the commit log should be more detailed about this, after > reading it I thought the effect of the bug would be that the PWM stops > even though it should oscillate. Your understanding is correct; this was the result of confusion on my part. I'll write a new commit message. >> Also refactor the code slightly to eliminate goto targets as the >> error handlers no longer share any recovery steps. > > This however makes it hard to review the patch. Maybe this refactoring > can be split out? I'll give this another shot, too. -- Simon South simon@simonsouth.net From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFD02C433E0 for ; Tue, 22 Dec 2020 16:27:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 165E723103 for ; Tue, 22 Dec 2020 16:27:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 165E723103 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=simonsouth.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xVfP7/HL4BcvoUJXg8uN/WmpzeSs3sF2AV/0gQzJUBg=; b=Udk4vgLk4bvDFcwAGy4kcSwWZ rIfx/w4jVq/dNj5xY34CCZ8R60USHxSP7VXiZeRErKiIb5KgOyO48O5gqGotaelBdFyHb1jtrS6Es Pxatsuf7WugZmKssWTk16pL/3X/gaMjbBM7gPT8/OX+1dod+F3NRlw26JkUw4M5S4nqJKRktB1o0E S6H7Yb5TkSyHlKRZFyUZN5VBMRM+pubFjezXwT7Bi6FBN6ClgjqMTHVeQdnUztmU7NOm8xhxltlCw 408tjVdmpNKDOpIi1MrlsGldBYj9A4EW48zEatg7kvFUExK3mRJe3P0oCMycX1zBKPF8/g0mDugaL yvCKnDrzg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkVP-0002TO-SP; Tue, 22 Dec 2020 16:27:23 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkVL-0002SM-Sa; Tue, 22 Dec 2020 16:27:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3D5E3BFC9F; Tue, 22 Dec 2020 16:27:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1X26B3-7hQwg; Tue, 22 Dec 2020 16:27:18 +0000 (UTC) Received: from jupiter (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EE1EEC2CCB; Tue, 22 Dec 2020 16:27:05 +0000 (UTC) From: Simon South To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Subject: Re: [PATCH v2 2/3] pwm: rockchip: Eliminate potential race condition when probing References: <20201221085047.nyl7hacd4imp37qi@pengutronix.de> Date: Tue, 22 Dec 2020 11:26:59 -0500 In-Reply-To: <20201221085047.nyl7hacd4imp37qi@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Mon, 21 Dec 2020 09:50:47 +0100") Message-ID: <875z4trelo.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201222_112719_942898_9BF78281 X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, heiko@sntech.de, bbrezillon@kernel.org, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, tpiepho@gmail.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org VXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4gd3JpdGVz Ogo+IEkgd29uZGVyIGlmIHRoZSBjb21taXQgbG9nIHNob3VsZCBiZSBtb3JlIGRldGFpbGVkIGFi b3V0IHRoaXMsIGFmdGVyCj4gcmVhZGluZyBpdCBJIHRob3VnaHQgdGhlIGVmZmVjdCBvZiB0aGUg YnVnIHdvdWxkIGJlIHRoYXQgdGhlIFBXTSBzdG9wcwo+IGV2ZW4gdGhvdWdoIGl0IHNob3VsZCBv c2NpbGxhdGUuCgpZb3VyIHVuZGVyc3RhbmRpbmcgaXMgY29ycmVjdDsgdGhpcyB3YXMgdGhlIHJl c3VsdCBvZiBjb25mdXNpb24gb24gbXkKcGFydC4gSSdsbCB3cml0ZSBhIG5ldyBjb21taXQgbWVz c2FnZS4KCj4+IEFsc28gcmVmYWN0b3IgdGhlIGNvZGUgc2xpZ2h0bHkgdG8gZWxpbWluYXRlIGdv dG8gdGFyZ2V0cyBhcyB0aGUKPj4gZXJyb3IgaGFuZGxlcnMgbm8gbG9uZ2VyIHNoYXJlIGFueSBy ZWNvdmVyeSBzdGVwcy4KPgo+IFRoaXMgaG93ZXZlciBtYWtlcyBpdCBoYXJkIHRvIHJldmlldyB0 aGUgcGF0Y2guIE1heWJlIHRoaXMgcmVmYWN0b3JpbmcKPiBjYW4gYmUgc3BsaXQgb3V0PwoKSSds bCBnaXZlIHRoaXMgYW5vdGhlciBzaG90LCB0b28uCgotLSAKU2ltb24gU291dGgKc2ltb25Ac2lt b25zb3V0aC5uZXQKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fCkxpbnV4LXJvY2tjaGlwIG1haWxpbmcgbGlzdApMaW51eC1yb2NrY2hpcEBsaXN0cy5pbmZy YWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGlu dXgtcm9ja2NoaXAK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C6CDC433E0 for ; Tue, 22 Dec 2020 16:28:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAF3A22AAE for ; Tue, 22 Dec 2020 16:28:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAF3A22AAE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=simonsouth.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R2IT+5LdKlbq33oCYoCr2TjrBgszixtGX6F7u5XzSJQ=; b=zx8xCCn1SXWdCC8uZ3ydy6XRG acNt7zDhRwqvrQt+1ydl6S7ksylpu0ogxfmH9m92usTRII27LXc/JNdCKMeIaH0HZjxRvyGx+9V2Y THgSNqaN/Hkx/x4mVjNSUEMh0B9h+p7T2uRxwxYr2oML9menpz38waC5EDM59exqITI1FxaUQW5kX 2No4UXWDvNr+tQEvlDe+p72Bs+h9sqyrS9/X8LBOWR5kvzv60OSJkDZLbMOS6u32ffvHcE+mwGmfU 3QIl10fcA7MfmRLgL4vwiwmy4BvAmujUtiV4PzZ3HcuZYkK+7FUxsx4nZ7EQVRxl97/+C8Y47PCYR 5WukSvcbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkVO-0002T4-9f; Tue, 22 Dec 2020 16:27:22 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkVL-0002SM-Sa; Tue, 22 Dec 2020 16:27:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3D5E3BFC9F; Tue, 22 Dec 2020 16:27:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1X26B3-7hQwg; Tue, 22 Dec 2020 16:27:18 +0000 (UTC) Received: from jupiter (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EE1EEC2CCB; Tue, 22 Dec 2020 16:27:05 +0000 (UTC) From: Simon South To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Subject: Re: [PATCH v2 2/3] pwm: rockchip: Eliminate potential race condition when probing References: <20201221085047.nyl7hacd4imp37qi@pengutronix.de> Date: Tue, 22 Dec 2020 11:26:59 -0500 In-Reply-To: <20201221085047.nyl7hacd4imp37qi@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Mon, 21 Dec 2020 09:50:47 +0100") Message-ID: <875z4trelo.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201222_112719_942898_9BF78281 X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, heiko@sntech.de, bbrezillon@kernel.org, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, tpiepho@gmail.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org VXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4gd3JpdGVz Ogo+IEkgd29uZGVyIGlmIHRoZSBjb21taXQgbG9nIHNob3VsZCBiZSBtb3JlIGRldGFpbGVkIGFi b3V0IHRoaXMsIGFmdGVyCj4gcmVhZGluZyBpdCBJIHRob3VnaHQgdGhlIGVmZmVjdCBvZiB0aGUg YnVnIHdvdWxkIGJlIHRoYXQgdGhlIFBXTSBzdG9wcwo+IGV2ZW4gdGhvdWdoIGl0IHNob3VsZCBv c2NpbGxhdGUuCgpZb3VyIHVuZGVyc3RhbmRpbmcgaXMgY29ycmVjdDsgdGhpcyB3YXMgdGhlIHJl c3VsdCBvZiBjb25mdXNpb24gb24gbXkKcGFydC4gSSdsbCB3cml0ZSBhIG5ldyBjb21taXQgbWVz c2FnZS4KCj4+IEFsc28gcmVmYWN0b3IgdGhlIGNvZGUgc2xpZ2h0bHkgdG8gZWxpbWluYXRlIGdv dG8gdGFyZ2V0cyBhcyB0aGUKPj4gZXJyb3IgaGFuZGxlcnMgbm8gbG9uZ2VyIHNoYXJlIGFueSBy ZWNvdmVyeSBzdGVwcy4KPgo+IFRoaXMgaG93ZXZlciBtYWtlcyBpdCBoYXJkIHRvIHJldmlldyB0 aGUgcGF0Y2guIE1heWJlIHRoaXMgcmVmYWN0b3JpbmcKPiBjYW4gYmUgc3BsaXQgb3V0PwoKSSds bCBnaXZlIHRoaXMgYW5vdGhlciBzaG90LCB0b28uCgotLSAKU2ltb24gU291dGgKc2ltb25Ac2lt b25zb3V0aC5uZXQKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fCmxpbnV4LWFybS1rZXJuZWwgbWFpbGluZyBsaXN0CmxpbnV4LWFybS1rZXJuZWxAbGlzdHMu aW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZv L2xpbnV4LWFybS1rZXJuZWwK