Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1263027ybg; Tue, 2 Jun 2020 05:41:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBvHjIdGqQURAJ4qkC9DOsWTg/y5c9LHYjwNq0E3KHEr/XMoqhx+O38bcfWQQcKRLSDWPu X-Received: by 2002:a17:906:e247:: with SMTP id gq7mr17267318ejb.107.1591101698129; Tue, 02 Jun 2020 05:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591101698; cv=none; d=google.com; s=arc-20160816; b=jJ7dM4PLS7LW9m1ZoM+UbpNkLRKJzH/3bTnwrqn2pXRbidw1zfnOXfmF9W++Z6V2c3 Z4yJh9MWKy9woEzOexLQktxX9VbAOiZQWjgzkxAiUmCm285lDqC3lA5UnJOCrHJ6ciAI XjNpEQQwo/jl1eLWEF9XFBs9xKxAzjgPXAR+X94W+fBxSdQHo3KmBnED0CJCnlwQLHKT 6IeJ8bRyEbS4fAa9E7iRD2+o7irWbgT8w59ibjnIFfxVEQ3LNM6wXrAoIfHLRDCUbuqE +6lByDWW2HE2XH2y9eh03/QsN0X+SdnviOwRXoGJXcX2tZZebxYPIHog+D/9/S3U0ekj 2JgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=F1vjzv7szM2SvYyH6cUhGI5pKgsWnnEULj32MB0yFS4=; b=R5RhgbRrJy8ZJexgj15EfrAEt2LjuNKKAgy2o0HoaD5uQQbV3RzIl+XBSglP8bCsdP BEw7AhDBHDqATwd6965KCdT9lifoblCdmXsiilT5gX24xejB7fOq8xAWgzgfkYfEZSFK Qg5xSLJW/OF8UwOFC5g90pUyy0VZrWWaECM8USReeOU5gUtGUoHZZLT8dRBfBgTBMWNH smo0l8KtOsguQCVK7jvOnuQehYs0+xCrKBqKWLPWVMmAyjgMgqH8b53zThk4MbiOEIak LJS41xS9H04YMylxjw2gO4i6Qjc5rIKWjZMy+IVbWw3gzXzN3MSTHXdqTwPdFFHi/z6e iwtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WYnvAJWj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si1331198edr.165.2020.06.02.05.41.14; Tue, 02 Jun 2020 05:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WYnvAJWj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726450AbgFBMjS (ORCPT + 99 others); Tue, 2 Jun 2020 08:39:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbgFBMjR (ORCPT ); Tue, 2 Jun 2020 08:39:17 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84C07C061A0E; Tue, 2 Jun 2020 05:39:17 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id e2so12565814eje.13; Tue, 02 Jun 2020 05:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F1vjzv7szM2SvYyH6cUhGI5pKgsWnnEULj32MB0yFS4=; b=WYnvAJWjcIH5V3n93yd+hBCgHBYATbMf4IhCsfwQ9Oy1ZM9Z6rPS+WbFRPRAFWV/bF g8NVrkY1eAE3itDiEE0aGbFh82DXnCYGwNCAVEFB9InkZi2h89PET4FN6iEgxXtQf0uv Tx1pit9Jd6xv3AdFKIWO7ZejWVHuRhkC878hAEFOiQFDje52U6ZlKNLeqXVPUoQX4T4e GB7+N4Vxwux1TDzFrN8dajdxWthW3Hz1N2MRMmG9WVU48aO+F4QH0DSedqbufQ+5ESWw ZkycrkFkAvLKMSlCKPX3yzohcyD9cGBxC439RRXOlwZ/WsIsfF6eXyxeDckOKQLJ9FRJ WJtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=F1vjzv7szM2SvYyH6cUhGI5pKgsWnnEULj32MB0yFS4=; b=BB14d8SyuMFwGhoajjNKDuiPWim1rAEeDZDpvIgcFSNy9BBXt1gN0KY8BticqwPm5q YS5QmpjD9FvwkaP+YVP5xaM4F8PPLAORGf++kXhmHk2OrUEFySZnpmxtFTySwV0XPpna K2uEKTRK+7kT2cYPsDSqfoRqYpg+nePLspO4LypWyz3s5EVMu0PMo7d6vonH5xueXsrI e+fwR0YV9vSk+g/kHr/+h0aCfCJ4gzzJ1sgO/drawwC1eqJWG2q3yEUN469rtrmyvIc3 3wA1m14/qUF1EOZMpSSrcBEHguTLLQ+ZsRveFkMT1KEYs0kPKUmc0lF63DvKOsDvfS7K W6jQ== X-Gm-Message-State: AOAM530MRXOy8JEtVMlYmXmdtQws+Pze+iWfC0RLSPAV1cZppN5SIUad ZomhbtDaBwcHEOXnGleicesgGxXZ X-Received: by 2002:a17:906:7ad3:: with SMTP id k19mr22505707ejo.464.1591101556221; Tue, 02 Jun 2020 05:39:16 -0700 (PDT) Received: from localhost (pd9e51079.dip0.t-ipconnect.de. [217.229.16.121]) by smtp.gmail.com with ESMTPSA id dc8sm1522400edb.10.2020.06.02.05.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 05:39:14 -0700 (PDT) Date: Tue, 2 Jun 2020 14:39:14 +0200 From: Thierry Reding To: Rasmus Villemoes Cc: Heiko Stuebner , David Wu , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pwm: rockchip: simplify rockchip_pwm_get_state() Message-ID: <20200602123914.GA3360525@ulmo> References: <20190919091728.24756-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: <20190919091728.24756-1-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.13.1 (2019-12-14) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 19, 2019 at 11:17:27AM +0200, Rasmus Villemoes wrote: > The way state->enabled is computed is rather convoluted and hard to > read - both branches of the if() actually do the exact same thing. So > remove the if(), and further simplify " ? true : > false" to "". >=20 > Signed-off-by: Rasmus Villemoes > --- > I stumbled on this while trying to understand how the pwm subsystem > works. This patch is a semantic no-op, but it's also possible that, > say, the first branch simply contains a "double negative" so either > the !=3D should be =3D=3D or the "false : true" should be "true : false". >=20 > drivers/pwm/pwm-rockchip.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) I've applied this. Irrespective of any feedback David would have this is correct and a nice simplification. Thierry --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl7WSHEACgkQ3SOs138+ s6EIvA//U+YBcRa/yOWyp3jhnv0UxhIHPIk4tcP1l5N4cNtnj23Y4VCdv7baJM4M k2OKqKanjnp0AROTYeu150CEqI+xXuND8W7PKRIcCTLkS2Gy7WBXh1ezlCRupzyH uYRPi+PY5ZkX/owSFRy+2Ii5o5ywzPc5aH6hqsLfKGzkUrJA/wFsTH85JfmEwwTu 8WOYkvO8zGqaA32B5Orx42x4jH020aa/PorZsl1WXjEnqN7zc0Ke5CZxZN/puoE+ YuTAqG9NDMFiZzkeN2vHbuafUyBk0zSRiz+/1KTkKPnubJ0bLncbCZRonghCCCNV 3hWEB8Fm5pP9mo5Ht4q6Z4or2JkuWbcu3IwyE9SrerLtcTbkbCqaU3kkvKFm72Gy QN2iUJiGHk4i7PYqNEAWfQ9i16U7+2nbb6rroHiHcKR8G1boWJcwyg6dwVto5uUN 47k4J8HTAZBsDysAH4GVavggIig9WwMMqprGhVRA7CLhMtp5i/g+9fyN6OmxmwAO 9N4Sxs/ScWdReU63b0DbWRdEQa9OVK0BWz13uoESETZcfeH9ggZpY2EDBQ96KRY5 cG9Ka88WfHJJ7qth/PcHsu94fFnbcPkZeca16guCWoYIi5SdCJeDuPVfbjV1xn9T Fu/bhyvbAecyGACpTbIwZb5DhtT4HYr0IX4Q4mJ8PfM8b0BdR4o= =OaiW -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--