diff mbox series

MIPS: OCTEON: warn only once if deprecated link status is being used

Message ID Y5HJxeWqJFK0oWyS@lenoch (mailing list archive)
State Accepted
Commit 4c587a982603d7e7e751b4925809a1512099a690
Headers show
Series MIPS: OCTEON: warn only once if deprecated link status is being used | expand

Commit Message

Ladislav Michl Dec. 8, 2022, 11:25 a.m. UTC
From: Ladislav Michl <ladis@linux-mips.org>

Avoid flooding kernel log with warnings.

Fixes: 2c0756d306c2 ("MIPS: OCTEON: warn if deprecated link status is being used")
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 2 +-
 arch/mips/cavium-octeon/executive/cvmx-helper.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 8, 2022, 6:09 p.m. UTC | #1
On 8/12/22 12:25, Ladislav Michl wrote:
> From: Ladislav Michl <ladis@linux-mips.org>
> 
> Avoid flooding kernel log with warnings.
> 
> Fixes: 2c0756d306c2 ("MIPS: OCTEON: warn if deprecated link status is being used")
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>   arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 2 +-
>   arch/mips/cavium-octeon/executive/cvmx-helper.c       | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thomas Bogendoerfer Dec. 9, 2022, 10:41 p.m. UTC | #2
On Thu, Dec 08, 2022 at 12:25:57PM +0100, Ladislav Michl wrote:
> From: Ladislav Michl <ladis@linux-mips.org>
> 
> Avoid flooding kernel log with warnings.
> 
> Fixes: 2c0756d306c2 ("MIPS: OCTEON: warn if deprecated link status is being used")
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 2 +-
>  arch/mips/cavium-octeon/executive/cvmx-helper.c       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
index d09d0769f549..0fd9ac76eb74 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
@@ -211,7 +211,7 @@  union cvmx_helper_link_info __cvmx_helper_board_link_get(int ipd_port)
 {
 	union cvmx_helper_link_info 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 */
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 6f49fd9be1f3..9abfc4bf9bd8 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -1096,7 +1096,7 @@  union cvmx_helper_link_info 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;