2022-11-20 03:21:20

by Liam Beguin

[permalink] [raw]
Subject: [PATCH v1 0/4] clk: lmk04832: fix minor warnings and syntax issues

This series addresses a few automated reports I missed since adding
initial support for the lmk04832.

There are no functional changes here.

Liam Beguin (4):
clk: lmk04832: declare variables as const when possible
clk: lmk04832: drop unnecessary semicolons
clk: lmk04832: drop superfluous #include
clk: lmk04832: fix kernel-doc warnings

drivers/clk/clk-lmk04832.c | 41 +++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 21 deletions(-)


base-commit: 77c51ba552a1c4f73228766e43ae37c4101b3758
--
2.37.1.223.g6a475b71f8c4



2022-11-20 03:45:23

by Liam Beguin

[permalink] [raw]
Subject: [PATCH v1 3/4] clk: lmk04832: drop superfluous #include

iwyu warnings: (new ones prefixed by >>)
>> drivers/clk/clk-lmk04832.c:15:1: iwyu: warning: superfluous #include <linux/debugfs.h>
>> drivers/clk/clk-lmk04832.c:20:1: iwyu: warning: superfluous #include <linux/uaccess.h>

Reported-by: kernel test robot <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Liam Beguin <[email protected]>
---
drivers/clk/clk-lmk04832.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index 3a5961fe604d..7e01370fb6d4 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -12,12 +12,10 @@
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/gcd.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
-#include <linux/uaccess.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>

--
2.37.1.223.g6a475b71f8c4


2022-11-20 03:55:51

by Liam Beguin

[permalink] [raw]
Subject: [PATCH v1 2/4] clk: lmk04832: drop unnecessary semicolons

Semicolons on the closing brace of a function definition are
unnecessary, remove them.

Signed-off-by: Liam Beguin <[email protected]>
---
drivers/clk/clk-lmk04832.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index 9d18fd23bea0..3a5961fe604d 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -282,7 +282,7 @@ static bool lmk04832_regmap_rd_regs(struct device *dev, unsigned int reg)
default:
return false;
};
-};
+}

static bool lmk04832_regmap_wr_regs(struct device *dev, unsigned int reg)
{
@@ -305,7 +305,7 @@ static bool lmk04832_regmap_wr_regs(struct device *dev, unsigned int reg)
default:
return false;
};
-};
+}

static const struct regmap_config regmap_config = {
.name = "lmk04832",
@@ -403,7 +403,7 @@ static unsigned long lmk04832_vco_recalc_rate(struct clk_hw *hw,
pll2_misc)) * pll2_n * pll2_p[p] / pll2_r;

return vco_rate;
-};
+}

/**
* lmk04832_check_vco_ranges - Check requested VCO frequency against VCO ranges
@@ -509,7 +509,7 @@ static long lmk04832_vco_round_rate(struct clk_hw *hw, unsigned long rate,
return -EINVAL;

return vco_rate;
-};
+}

static int lmk04832_vco_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long prate)
@@ -568,7 +568,7 @@ static int lmk04832_vco_set_rate(struct clk_hw *hw, unsigned long rate,

return regmap_write(lmk->regmap, LMK04832_REG_PLL2_N_2,
FIELD_GET(0x0000ff, n));
-};
+}

static const struct clk_ops lmk04832_vco_ops = {
.is_enabled = lmk04832_vco_is_enabled,
@@ -1063,7 +1063,7 @@ static unsigned long lmk04832_dclk_recalc_rate(struct clk_hw *hw,
rate = DIV_ROUND_CLOSEST(prate, dclk_div);

return rate;
-};
+}

static long lmk04832_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *prate)
@@ -1085,7 +1085,7 @@ static long lmk04832_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
return -EINVAL;

return dclk_rate;
-};
+}

static int lmk04832_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long prate)
@@ -1147,7 +1147,7 @@ static int lmk04832_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
dev_err(lmk->dev, "SYNC sequence failed\n");

return ret;
-};
+}

static const struct clk_ops lmk04832_dclk_ops = {
.is_enabled = lmk04832_dclk_is_enabled,
@@ -1551,6 +1551,7 @@ static void lmk04832_remove(struct spi_device *spi)
clk_disable_unprepare(lmk->oscin);
of_clk_del_provider(spi->dev.of_node);
}
+
static const struct spi_device_id lmk04832_id[] = {
{ "lmk04832", LMK04832 },
{}
--
2.37.1.223.g6a475b71f8c4


2022-12-09 01:24:27

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v1 2/4] clk: lmk04832: drop unnecessary semicolons

Quoting Liam Beguin (2022-11-19 19:02:55)
> Semicolons on the closing brace of a function definition are
> unnecessary, remove them.
>
> Signed-off-by: Liam Beguin <[email protected]>
> ---

Applied to clk-next

2022-12-09 01:24:30

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v1 3/4] clk: lmk04832: drop superfluous #include

Quoting Liam Beguin (2022-11-19 19:02:56)
> iwyu warnings: (new ones prefixed by >>)
> >> drivers/clk/clk-lmk04832.c:15:1: iwyu: warning: superfluous #include <linux/debugfs.h>
> >> drivers/clk/clk-lmk04832.c:20:1: iwyu: warning: superfluous #include <linux/uaccess.h>
>
> Reported-by: kernel test robot <[email protected]>
> Link: https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Liam Beguin <[email protected]>
> ---

Applied to clk-next