diff mbox series

clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static

Message ID 20230205030138.1723614-1-trix@redhat.com (mailing list archive)
State New, archived
Headers show
Series clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static | expand

Commit Message

Tom Rix Feb. 5, 2023, 3:01 a.m. UTC
smatch reports
drivers/clk/imx/clk-gpr-mux.c:73:22: warning: symbol 'imx_clk_gpr_mux_ops' was not declared. Should it be static?

imx_clk_gpr_mux_ops is only used in clk-gpr-mux.c, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/clk/imx/clk-gpr-mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Boyd Feb. 10, 2023, 9:58 p.m. UTC | #1
Quoting Tom Rix (2023-02-04 19:01:38)
> smatch reports
> drivers/clk/imx/clk-gpr-mux.c:73:22: warning: symbol 'imx_clk_gpr_mux_ops' was not declared. Should it be static?
> 
> imx_clk_gpr_mux_ops is only used in clk-gpr-mux.c, so it should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---

Applied to clk-next
Peng Fan (OSS) Feb. 13, 2023, 12:46 p.m. UTC | #2
On 2/5/2023 11:01 AM, Tom Rix wrote:
> smatch reports
> drivers/clk/imx/clk-gpr-mux.c:73:22: warning: symbol 'imx_clk_gpr_mux_ops' was not declared. Should it be static?
> 
> imx_clk_gpr_mux_ops is only used in clk-gpr-mux.c, so it should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> ---
>   drivers/clk/imx/clk-gpr-mux.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/imx/clk-gpr-mux.c b/drivers/clk/imx/clk-gpr-mux.c
> index 47a3e3cdcc82..c8d6090f15d6 100644
> --- a/drivers/clk/imx/clk-gpr-mux.c
> +++ b/drivers/clk/imx/clk-gpr-mux.c
> @@ -70,7 +70,7 @@ static int imx_clk_gpr_mux_determine_rate(struct clk_hw *hw,
>   	return clk_mux_determine_rate_flags(hw, req, 0);
>   }
>   
> -const struct clk_ops imx_clk_gpr_mux_ops = {
> +static const struct clk_ops imx_clk_gpr_mux_ops = {
>   	.get_parent = imx_clk_gpr_mux_get_parent,
>   	.set_parent = imx_clk_gpr_mux_set_parent,
>   	.determine_rate = imx_clk_gpr_mux_determine_rate,
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-gpr-mux.c b/drivers/clk/imx/clk-gpr-mux.c
index 47a3e3cdcc82..c8d6090f15d6 100644
--- a/drivers/clk/imx/clk-gpr-mux.c
+++ b/drivers/clk/imx/clk-gpr-mux.c
@@ -70,7 +70,7 @@  static int imx_clk_gpr_mux_determine_rate(struct clk_hw *hw,
 	return clk_mux_determine_rate_flags(hw, req, 0);
 }
 
-const struct clk_ops imx_clk_gpr_mux_ops = {
+static const struct clk_ops imx_clk_gpr_mux_ops = {
 	.get_parent = imx_clk_gpr_mux_get_parent,
 	.set_parent = imx_clk_gpr_mux_set_parent,
 	.determine_rate = imx_clk_gpr_mux_determine_rate,