Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4746668rwb; Mon, 8 Aug 2022 06:28:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR6iGBeelbTAUgaJh0ctjUQNg1azXjcHeTJ+YfXfclrO53VMH3chkertW9PnEcZR6jlto+ps X-Received: by 2002:a17:902:70c7:b0:170:9030:2665 with SMTP id l7-20020a17090270c700b0017090302665mr9611282plt.73.1659965325645; Mon, 08 Aug 2022 06:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659965325; cv=none; d=google.com; s=arc-20160816; b=w2i+ENaLxvc92SgV6a7k0deJawTY9Agazjf3jStlTL3dlz0OTKcD4x29+WIwgTVo8C f2NLdwGcnlUv/Xlv+pP5lefrJ4CS6fdcDQ8chyL0N6nxPDXd80A8/BuRvCPnBwA7dxfz LctdxaWM5M4WQ0MKpK5hvNU0QBL0tNNWT29QHPOElW4X/gCrq4UsEGDTvPrz0SdcM9DA UYCvL2HY1hVcgTtF8NmpAY5K4FqOPL3lPZJt4cgGcISkYZix/bWvrlRy66ORBV9mYlNf 6ERN8s3yBsruD/yVnFvPv7NcLcj1dzaNcHkJ2nqrSi038YMGlumagXHCPOE2O3WFNJAE /YSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=meRd09E0AKKlJAFEfjj5eIMXKXIYV/KZi3AQDoPx6Fw=; b=v2bHDiYAV+dhX9DSkD9GZgHgPA9VPIOm9rcggvcD0BJMRZYCTbi8IXdd6jOphgh5Sp qkTcUzFY1ZRM03ZhagspAb8/iok+FQ3IdRpFPoUOJA8VC0rI2ZMRpLYIyLHyV1GoI9Dt OKoYz8qrZxib1LC/TQJzo0WDagWJfPX6QS1B0A3ae9tL2Q2NT5hdz6HURhiF8iUPqzCx 4f80SAdfcksoyuQrcTTUungUhP5Qgm1rxcUYGaui3lff4V1LWN+xOeKd/C61ZJwK9nRb zuic3iFQ0EzYN0cFK3usYnm9lJHbd5lbQnk8Jm+YJDy3PtbA+Izapxzb4ROgYv+kHXiR 25OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AzstylNM; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ms2-20020a17090b234200b001f4fc831538si9516067pjb.64.2022.08.08.06.28.32; Mon, 08 Aug 2022 06:28:45 -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=@kernel.org header.s=k20201202 header.b=AzstylNM; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242548AbiHHNC6 (ORCPT + 99 others); Mon, 8 Aug 2022 09:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237483AbiHHNC5 (ORCPT ); Mon, 8 Aug 2022 09:02:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7961C19 for ; Mon, 8 Aug 2022 06:02:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 90B28B80DDE for ; Mon, 8 Aug 2022 13:02:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9EB9C433C1; Mon, 8 Aug 2022 13:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659963774; bh=Y8bmsXXKij7lEy5S8s5wm5b84NlBl5gdqCpLIq6bWyk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AzstylNMSKuRv+IxerYMrCuB63ceyCVrf1n+hK0Wh6BNLdFb9yYqlLeD6rf7x99g6 +dC/KBPU4ATAzjCrzJ5mtC6vX72wWzygpxvvBVwbJS5o/9vmJVsv52FjnB+ZhzQSJv vj9qyffDOknaY6yZHE5Ya3jH9Ao4mMA9qg+eU8RMPuCNbO8xcNu1NYHMQU4H8rJlfF RlDwco+ThvSgHh3j2dyiZol52kx4hS7ZgQW61RS8t5+hD10cJQw8uU35l/GIPF5/C6 LR6QqOSy7Os8KW0KMlZWGKImoGHUeLTWZyLfeK9lz5o7zPN96xkMue94kPSF5ptmId Zetw+zsC4nt8Q== Date: Mon, 8 Aug 2022 14:02:49 +0100 From: Mark Brown To: Andy Shevchenko Cc: Aidan MacDonald , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: Re: [PATCH v1 2/5] regmap: mmio: Drop unneeded and duplicative checks around CLK calls Message-ID: References: <20220805205321.19452-1-andriy.shevchenko@linux.intel.com> <20220805205321.19452-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cMx/71A40yRPJXOW" Content-Disposition: inline In-Reply-To: <20220805205321.19452-2-andriy.shevchenko@linux.intel.com> X-Cookie: Are we running light with overbyte? X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 --cMx/71A40yRPJXOW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 05, 2022 at 11:53:18PM +0300, Andy Shevchenko wrote: > The commit 6b8e090ecc3d ("regmap: use IS_ERR() to check clk_get() > results") assumes that CLK calls return the error pointer when clock > is not found. However in the current code the described situation > is simply impossible, because the regmap won't be created with > missed clock if requested. The only way when it can be the case is > what the above mentioned commit introduced by itself, when clock is > not provided. > Taking above into consideration, effectively revert the commit > 6b8e090ecc3d and while at it, drop unneeded NULL checks since CLK > calls are NULL-aware. I don't understand the supposed benefit of this. Yes, the clk API does currently accept NULL as a valid clock and returns it as a dummy but explicitly taking advantage of that in the way that this does just feels more sloppy than the current behaviour. --cMx/71A40yRPJXOW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLxCXgACgkQJNaLcl1U h9DMOwf/eNFWkdchMn3cZkkl3lmpPaqIgqMyLV9N3izOdCxpfgwskCLw1iLwL9D6 jrVr/MMECyex1hR9ZyLn5FJh5NKH0Wban6igjr8Edj7KhqeL5fE6FmzBg4inkPq3 10r2wDq+DbS83GMFLyi+8TXSbHe75+fVBLvBddqObcoXMds//CbHU7v9YIWo6dZS d20Xb6dMHRIbel0Qh2NJOGrDgh+DEPQWkUH2VMiCPQsj/xObDp6oRSWE7nNwn/XK je/5TI9D6acRsfeil9L09QDqVX0DI8syrmxDCiiCll8CBtItWMuaj4fGWsc+0u2C 9q7TxR8oOl+03RxUZoRc9IGy33bqEg== =+Nfn -----END PGP SIGNATURE----- --cMx/71A40yRPJXOW--