Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1160006rwl; Wed, 5 Apr 2023 12:41:38 -0700 (PDT) X-Google-Smtp-Source: AKy350aZ+wL8TSrsZD1a/FU4coTcVLuEfCAH4BzYYFCTq5aaw1tuArpqR/sI0UxL9jPsmueZMTPG X-Received: by 2002:a05:6a20:3a93:b0:da:3bce:75e2 with SMTP id d19-20020a056a203a9300b000da3bce75e2mr438627pzh.2.1680723698373; Wed, 05 Apr 2023 12:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680723698; cv=none; d=google.com; s=arc-20160816; b=YXHuw1IVcMXGC1+OR2iIW51CRhB1GHRqjNxpvvjlt0SVtbNgckcN68wacR+mHyo6us ciBmen5GCs5ZUs0GPh1JwNR3IncX0OwX5ZJbyfmFu2sSGUfBs5QksMUvt1vUYX4ak65b Bhn/D+X8O1qtVjgaP/qyQmRjtYzXosbWARcIb9ZzkRfuYhjnq4ZoDYuW43SeRR/L16i+ xiCzfBcJFFdLtYQ/+2OKniq6ULI/wGccfvutZuOBVp1HbDuyyCn4X3aKkbTN3EmkXoCr nz8d5IQ7qT161Bg89r1/5qazKpsKPeKbNsGoe13/VhpzFc6tNPZN5oh+sRBdhHcMzfZX lvpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=X5HrMUTjJ0+E9sCGIhIomBw0R+y9E87WANRwytD/cbc=; b=wP8l3JFE8V4KRgyt+D4MfdRBEP0FWBgkdWQNRIdqYLyW/OXjauETkqdy+0d9SIITEy Ka+ujoI6FkarRpSWog3JqUAsKflcS+ynejbRMuy2vubm8dnXQOUu9pJtpsBhttFNAu+g j8SFubWIuN7azRVv8A4udiAaxI7Z78JLx3ER2ThFzKP23wmyML3h0J+OPnHWqG6rX3h4 +l3CTmjmzDvGkNsHbkb0TXIr5dk1pfc0urRv4K4mS/PxxM9St0Ma0Yq5FtuIgafWDw1F igf/H9byBruhYDFCSlt8n1BIX+H28iJYCxJdqn7QBYCmUloXik6mL0pBHbjTltkM9RUO 56KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dUpRuEo2; 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 a4-20020a624d04000000b006280d8f703asi13312284pfb.164.2023.04.05.12.41.26; Wed, 05 Apr 2023 12:41:38 -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=dUpRuEo2; 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 S234120AbjDETlG (ORCPT + 99 others); Wed, 5 Apr 2023 15:41:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234126AbjDETlC (ORCPT ); Wed, 5 Apr 2023 15:41:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68EA17DA1; Wed, 5 Apr 2023 12:40:35 -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 dfw.source.kernel.org (Postfix) with ESMTPS id F2F4763FBA; Wed, 5 Apr 2023 19:39:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51CB0C433D2; Wed, 5 Apr 2023 19:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680723579; bh=cTudTj8Oo2+RcHiqiFkI4xEdSskDU+0x8+gt+YiMa1U=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=dUpRuEo2D1mabWQvXzJqRWoZmOJcNZXwbeYAHRTDQUFia1LQ30DnL5MVT17wgqc4b o8XcIvg3F/UEE3btoojmu9yMT55Lip4MsZL85VnqYoh4RfpvbfVRFkeiXjVvfCvZyF ZRjMzvkNIKhTuCLBdbGWr4kAB7xyKfDDvSgeMqLun2r+wa9wOD8t9o1jJnfi7Nacan 7yBa5x2r2+g3RVFcXkLRODsvzRN3FLM9CAFP3wT6XmO0g0GEWURTruNS4KtF1AQ8dq Z8rLoFoek5rfhF3xQqU4XR2g1YegMQGsOhNsoULUA0hJeQJcSHZDLuHreD3EKfDV1u nDz0i1UhjSPuA== Message-ID: <4088bcbba60790adebccde35270c792c.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230329075104.165176-1-mmyangfl@gmail.com> References: <20230329075104.165176-1-mmyangfl@gmail.com> Subject: Re: [PATCH v2 0/4] clk: hisilicon: Migrate devm APIs From: Stephen Boyd Cc: David Yang , Michael Turquette , linux-kernel@vger.kernel.org To: David Yang , linux-clk@vger.kernel.org Date: Wed, 05 Apr 2023 12:39:35 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Quoting David Yang (2023-03-29 00:50:49) > Migrate devm APIs for HiSilicon clock drivers and remove redundant codes. >=20 > This series is a partial improvement of [1] >=20 Run checkpatch.pl=20 WARNING: Macros with flow control statements should be avoided #591: FILE: drivers/clk/hisilicon/clk.c:146: +#define hisi_clk_register_fn(fn, type, stmt) \ +int fn(struct device *dev, const struct type *clks, \ + int num, struct hisi_clock_data *data) \ +{ \ + void __iomem *base =3D data->base; \ + int i; \ +\ + for (i =3D 0; i < num; i++) { \ + const struct type *p_clk =3D &clks[i]; \ + struct clk_hw *clk =3D stmt; \ +\ + if (IS_ERR(clk)) { \ + pr_err("%s: failed to register clock %s\n", \ + __func__, p_clk->name); \ + return PTR_ERR(clk); \ + } \ +\ + if (p_clk->alias) \ + clk_hw_register_clkdev(clk, p_clk->alias, NULL); \ +\ + data->clk_data->hws[p_clk->id] =3D clk; \ + } \ +\ + return 0; \ +} \ +EXPORT_SYMBOL_GPL(fn); WARNING: macros should not use a trailing semicolon #591: FILE: drivers/clk/hisilicon/clk.c:146: +#define hisi_clk_register_fn(fn, type, stmt) \ +int fn(struct device *dev, const struct type *clks, \ + int num, struct hisi_clock_data *data) \ +{ \ + void __iomem *base =3D data->base; \ + int i; \ +\ + for (i =3D 0; i < num; i++) { \ + const struct type *p_clk =3D &clks[i]; \ + struct clk_hw *clk =3D stmt; \ +\ + if (IS_ERR(clk)) { \ + pr_err("%s: failed to register clock %s\n", \ + __func__, p_clk->name); \ + return PTR_ERR(clk); \ + } \ +\ + if (p_clk->alias) \ + clk_hw_register_clkdev(clk, p_clk->alias, NULL); \ +\ + data->clk_data->hws[p_clk->id] =3D clk; \ + } \ +\ + return 0; \ +} \ +EXPORT_SYMBOL_GPL(fn); total: 0 errors, 2 warnings, 1019 lines checked in patch 'clk: hisilicon: Migrate devm APIs' (8d960cbef61a) WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cur= e the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") #627: FILE: drivers/clk/hisilicon/clk-hi6220.c:291: +MODULE_LICENSE("GPL v2"); WARNING: DT compatible string "hisilicon,hip04-clock" appears un-documented= -- check ./Documentation/devicetree/bindings/ #661: FILE: drivers/clk/hisilicon/clk-hip04.c:33: + { .compatible =3D "hisilicon,hip04-clock", WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cur= e the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") #842: FILE: drivers/clk/hisilicon/clk-hix5hd2.c:337: +MODULE_LICENSE("GPL v2"); total: 0 errors, 3 warnings, 779 lines checked in patch 'clk: hisilicon: Convert to platform driver' (2681347c2636) WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cur= e the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") #1044: FILE: drivers/clk/hisilicon/clk-hi3670.c:935: +MODULE_LICENSE("GPL v2"); total: 0 errors, 1 warnings, 1481 lines checked