Re: [PATCH net-next v3 2/4] stmmac: loongson: Remove surplus loop

From: Yanteng Si
Date: Tue Feb 25 2025 - 21:00:13 EST



在 2/25/25 5:15 PM, Philipp Stanner 写道:
On Tue, 2025-02-25 at 17:06 +0800, Yanteng Si wrote:
在 2/24/25 9:53 PM, Philipp Stanner 写道:
loongson_dwmac_probe() contains a loop which doesn't have an
effect,
because it tries to call pcim_iomap_regions() with the same
parameters
several times. The break statement at the loop's end furthermore
ensures
that the loop only runs once anyways.

Remove the surplus loop.

Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
It seems that the fix-tag has been forgotten, next two patches as
well.
Not forgotten, I just think that patches 2-4 are code improvements, not
bug fixes.

The issue in patch 1 would cause actual misbehavior (a useless debug
information print in case of a resource collision), whereas 2-4 are
just ugly code, but not actual bugs: the loop always just runs once;
and unmapping the PCI resources manually is valid, but obviously
unnecessary.

Agreed?

You bet!


Thanks,

Yanteng