From: Stephen Boyd <sboyd@kernel.org>
To: David Yang <mmyangfl@gmail.com>, linux-clk@vger.kernel.org
Cc: David Yang <mmyangfl@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 00/13] clk: hisilicon: Migrate devm APIs
Date: Fri, 28 Jul 2023 12:59:07 -0700 [thread overview]
Message-ID: <35de4ce57cc5cde96495dc245cdf8382.sboyd@kernel.org> (raw)
In-Reply-To: <20230723162245.35033-1-mmyangfl@gmail.com>
Quoting David Yang (2023-07-23 09:22:25)
> Migrate devm APIs for HiSilicon clock drivers and remove redundant codes.
>
> This series is a partial improvement of [1]
>
Thanks for resending. Can you fix these checkpatch and compilation errors?
WARNING: Macros with flow control statements should be avoided
#581: FILE: drivers/clk/hisilicon/clk.c:165:
+#define hisi_clk_register_fn(fn, type, stmt) \
+int fn(struct device *dev, const struct type *clks, \
+ size_t num, struct hisi_clock_data *data) \
+{ \
+ void __iomem *base = data->base; \
+\
+ for (int i = 0; i < num; i++) { \
+ const struct type *p_clk = &clks[i]; \
+ struct clk_hw *clk = 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] = clk; \
+ } \
+\
+ return 0; \
+} \
+EXPORT_SYMBOL_GPL(fn);
WARNING: macros should not use a trailing semicolon
#581: FILE: drivers/clk/hisilicon/clk.c:165:
+#define hisi_clk_register_fn(fn, type, stmt) \
+int fn(struct device *dev, const struct type *clks, \
+ size_t num, struct hisi_clock_data *data) \
+{ \
+ void __iomem *base = data->base; \
+\
+ for (int i = 0; i < num; i++) { \
+ const struct type *p_clk = &clks[i]; \
+ struct clk_hw *clk = 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] = clk; \
+ } \
+\
+ return 0; \
+} \
+EXPORT_SYMBOL_GPL(fn);
These look like instead of macros just write the functions out.
total: 0 errors, 2 warnings, 1002 lines checked
in patch 'clk: hisilicon: Migrate devm APIs' (74cb486e14c6)
WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
#174: FILE: drivers/clk/hisilicon/clk-hix5hd2.c:337:
+MODULE_LICENSE("GPL v2");
total: 0 errors, 1 warnings, 150 lines checked
in patch 'clk: hisilicon: hix5hd2: Convert into platform driver module' (f40d4d59c265)
WARNING: DT compatible string "hisilicon,hip04-clock" appears un-documented -- check ./Documentation/devicetree/bindings/
#46: FILE: drivers/clk/hisilicon/clk-hip04.c:33:
+ { .compatible = "hisilicon,hip04-clock",
total: 0 errors, 1 warnings, 51 lines checked
in patch 'clk: hisilicon: hip04: Convert into platform driver module' (fc919e7f3f7b)
WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
#353: FILE: drivers/clk/hisilicon/clk-hi6220.c:299:
+MODULE_LICENSE("GPL v2");
total: 0 errors, 1 warnings, 324 lines checked
in patch 'clk: hisilicon: hi6220: Convert into platform driver module' (85c1694448a3)
WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
#298: FILE: drivers/clk/hisilicon/clk-hi3670.c:917:
+MODULE_LICENSE("GPL v2");
total: 0 errors, 1 warnings, 278 lines checked
in patch 'clk: hisilicon: hi3670: Convert into module' (934dee9208ea)
WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
#251: FILE: drivers/clk/hisilicon/clk-hi3660.c:550:
+MODULE_LICENSE("GPL v2");
total: 0 errors, 1 warnings, 231 lines checked
in patch 'clk: hisilicon: hi3660: Convert into module' (1ac1cef160ff)
drivers/clk/hisilicon/clk-hi3559a.c: In function ‘hi3559av100_shub_default_clk_set’:
drivers/clk/hisilicon/clk-hi3559a.c:628:53: error: ‘SZ_4K’ undeclared (first use in this function)
628 | crg_base = devm_ioremap(dev, CRG_BASE_ADDR, SZ_4K);
| ^~~~~
prev parent reply other threads:[~2023-07-28 19:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-23 16:22 David Yang
2023-07-23 16:22 ` [PATCH v5 01/13] clk: hisilicon: Add helper functions for platform driver David Yang
2023-07-23 16:22 ` [PATCH v5 02/13] clk: hisilicon: hi3516cv300: Use helper functions David Yang
2023-07-23 16:22 ` [PATCH v5 03/13] clk: hisilicon: hi3798cv200: " David Yang
2023-07-23 16:22 ` [PATCH v5 04/13] clk: hisilicon: Remove hisi_crg_funcs David Yang
2023-07-23 16:22 ` [PATCH v5 05/13] clk: hisilicon: hi3519: Use helper functions David Yang
2023-07-23 16:22 ` [PATCH v5 06/13] clk: hisilicon: hi3559a: " David Yang
2023-07-23 16:22 ` [PATCH v5 07/13] clk: hisilicon: hi3660: Convert into module David Yang
2023-07-23 16:22 ` [PATCH v5 08/13] clk: hisilicon: hi3670: " David Yang
2023-07-23 16:22 ` [PATCH v5 09/13] clk: hisilicon: hi3620: Convert into platform driver module David Yang
2023-07-23 16:22 ` [PATCH v5 10/13] clk: hisilicon: hi6220: " David Yang
2023-07-23 16:22 ` [PATCH v5 11/13] clk: hisilicon: hip04: " David Yang
2023-07-23 16:22 ` [PATCH v5 12/13] clk: hisilicon: hix5hd2: " David Yang
2023-07-23 16:22 ` [PATCH v5 13/13] clk: hisilicon: Migrate devm APIs David Yang
2023-07-28 19:59 ` Stephen Boyd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35de4ce57cc5cde96495dc245cdf8382.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=mturquette@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®