lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 05 Apr 2023 12:39:35 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     David Yang <mmyangfl@...il.com>, linux-clk@...r.kernel.org
Cc:     David Yang <mmyangfl@...il.com>,
        Michael Turquette <mturquette@...libre.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/4] clk: hisilicon: Migrate devm APIs

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ