Patch "clk: ralink: mtmips: quiet unused variable warning" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clk: ralink: mtmips: quiet unused variable warning

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clk-ralink-mtmips-quiet-unused-variable-warning.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 59232fb655d7dab7af502f1d494619e98435cb73
Author: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
Date:   Sun Aug 27 04:39:32 2023 +0200

    clk: ralink: mtmips: quiet unused variable warning
    
    [ Upstream commit 619102313466eaf8a6ac188e711f5df749dac6d4 ]
    
    When CONFIG_OF is disabled then the matching table is not referenced and
    the following warning appears:
    
    drivers/clk/ralink/clk-mtmips.c:821:34: warning: unused variable 'mtmips_of_match' [-Wunused-const-variable]
    821 |   static const struct of_device_id mtmips_of_match[] = {
        |                          ^
    
    There are two match tables in the driver: one for the clock driver and the
    other for the reset driver. The only difference between them is that the
    clock driver uses 'data' and does not have 'ralink,rt2880-reset' compatible.
    Both just can be merged into a single one just by adding the compatible
    'ralink,rt2880-reset' entry to 'mtmips_of_match[]', which will allow it to
    be used for 'mtmips_clk_driver' (which doesn't use the data) as well as for
    'mtmips_clk_init()' (which doesn't need get called for 'ralink,rt2880-reset').
    
    Doing in this way ensures that 'CONFIG_OF' is not disabled anymore so the
    above warning disapears.
    
    Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs")
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Closes: https://lore.kernel.org/oe-kbuild-all/202307242310.CdOnd2py-lkp@xxxxxxxxx/
    Suggested-by: Arnd Bergmann <arnd@xxxxxxxxxx>
    Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230827023932.501102-1-sergio.paracuellos@xxxxxxxxx
    Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
    Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/ralink/clk-mtmips.c b/drivers/clk/ralink/clk-mtmips.c
index 1e7991439527a..50a443bf79ecd 100644
--- a/drivers/clk/ralink/clk-mtmips.c
+++ b/drivers/clk/ralink/clk-mtmips.c
@@ -821,6 +821,10 @@ static const struct mtmips_clk_data mt76x8_clk_data = {
 };
 
 static const struct of_device_id mtmips_of_match[] = {
+	{
+		.compatible = "ralink,rt2880-reset",
+		.data = NULL,
+	},
 	{
 		.compatible = "ralink,rt2880-sysc",
 		.data = &rt2880_clk_data,
@@ -1088,25 +1092,11 @@ static int mtmips_clk_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id mtmips_clk_of_match[] = {
-	{ .compatible = "ralink,rt2880-reset" },
-	{ .compatible = "ralink,rt2880-sysc" },
-	{ .compatible = "ralink,rt3050-sysc" },
-	{ .compatible = "ralink,rt3052-sysc" },
-	{ .compatible = "ralink,rt3352-sysc" },
-	{ .compatible = "ralink,rt3883-sysc" },
-	{ .compatible = "ralink,rt5350-sysc" },
-	{ .compatible = "ralink,mt7620-sysc" },
-	{ .compatible = "ralink,mt7628-sysc" },
-	{ .compatible = "ralink,mt7688-sysc" },
-	{}
-};
-
 static struct platform_driver mtmips_clk_driver = {
 	.probe = mtmips_clk_probe,
 	.driver = {
 		.name = "mtmips-clk",
-		.of_match_table = mtmips_clk_of_match,
+		.of_match_table = mtmips_of_match,
 	},
 };
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux