]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: OCTEON: warn only once if deprecated link status is being used
authorLadislav Michl <ladis@linux-mips.org>
Thu, 8 Dec 2022 11:25:57 +0000 (12:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:40:58 +0000 (11:40 +0100)
[ Upstream commit 4c587a982603d7e7e751b4925809a1512099a690 ]

Avoid flooding kernel log with warnings.

Fixes: 2ccd339ef4f6 ("MIPS: OCTEON: warn if deprecated link status is being used")
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/cavium-octeon/executive/cvmx-helper-board.c
arch/mips/cavium-octeon/executive/cvmx-helper.c

index 2e2d45bc850d88715a0917939b2f23a5252118bb..601afad60bfe9fd64cd2f98db84f38bef021f458 100644 (file)
@@ -211,7 +211,7 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port)
 {
        cvmx_helper_link_info_t result;
 
-       WARN(!octeon_is_simulation(),
+       WARN_ONCE(!octeon_is_simulation(),
             "Using deprecated link status - please update your DT");
 
        /* Unless we fix it later, all links are defaulted to down */
index de391541d6f7e922fdae619cd51663c34fed33be..89a397c73aa643d17d036c6f70e5230888b1ecf4 100644 (file)
@@ -1100,7 +1100,7 @@ cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
                if (index == 0)
                        result = __cvmx_helper_rgmii_link_get(ipd_port);
                else {
-                       WARN(1, "Using deprecated link status - please update your DT");
+                       WARN_ONCE(1, "Using deprecated link status - please update your DT");
                        result.s.full_duplex = 1;
                        result.s.link_up = 1;
                        result.s.speed = 1000;