linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v2 0/4] clk: hisilicon: Migrate devm APIs
Date: Wed, 05 Apr 2023 12:39:35 -0700	[thread overview]
Message-ID: <4088bcbba60790adebccde35270c792c.sboyd@kernel.org> (raw)
In-Reply-To: <20230329075104.165176-1-mmyangfl@gmail.com>

Quoting David Yang (2023-03-29 00:50:49)
> Migrate devm APIs for HiSilicon clock drivers and remove redundant codes.
> 
> This series is a partial improvement of [1]
> 

Run checkpatch.pl 

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 = data->base; \
+       int i; \
+\
+       for (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
#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 = data->base; \
+       int i; \
+\
+       for (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);

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: Cure 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 = "hisilicon,hip04-clock",

WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure 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: Cure 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

      parent reply	other threads:[~2023-04-05 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29  7:50 [PATCH v2 0/4] clk: hisilicon: Migrate devm APIs David Yang
2023-03-29  7:50 ` [PATCH v2 1/4] clk: hisilicon: Add helper functions for platform driver David Yang
2023-04-05 19:51   ` Stephen Boyd
2023-03-29  7:50 ` [PATCH v2 2/4] clk: hisilicon: Use helper functions David Yang
2023-04-05 21:06   ` Stephen Boyd
2023-03-29  7:50 ` [PATCH v2 3/4] clk: hisilicon: Convert to platform driver David Yang
2023-04-05 21:08   ` Stephen Boyd
2023-03-29  7:50 ` [PATCH v2 4/4] clk: hisilicon: Migrate devm APIs David Yang
2023-04-05 19:39 ` 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=4088bcbba60790adebccde35270c792c.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;
as well as URLs for NNTP newsgroup(s).