Skip to content

Commit

Permalink
MIPS: OCTEON: warn only once if deprecated link status is being used
Browse files Browse the repository at this point in the history
[ Upstream commit 4c587a9 ]

Avoid flooding kernel log with warnings.

Fixes: 2c0756d ("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>
  • Loading branch information
3x380V authored and gregkh committed Dec 31, 2022
1 parent 5e6d37a commit 318229b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/mips/cavium-octeon/executive/cvmx-helper-board.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/cavium-octeon/executive/cvmx-helper.c
Expand Up @@ -1100,7 +1100,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;
Expand Down

0 comments on commit 318229b

Please sign in to comment.