net/intel/e100: Make read-only param_range struct static const
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): CGME20260428102655eucas1p1786b9974056b896017eed056a1fbac91@eucas1p1.samsung.com
PATCH RESEND 1/1 net/intel/e100: Make read-only param_range struct static const
No need to use stack for single use read-only struct, just make it static const.
Signed-off-by Jakub Raczynski <[email protected]>
--- drivers/net/ethernet/intel/e100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/e100.c +2 -2
@@ -1034,8 +1034,8 @@ static inline int e100_phy_supports_mii(struct nic *nic)static void e100_get_defaults (struct nic *nic) { -struct param_range rfds = { .min =16 , .max =256 , .count =256 }; -struct param_range cbs = { .min =64 , .max =256 , .count =128 }; +static const struct param_range rfds = { .min =16 , .max =256 , .count =256 }; +static const struct param_range cbs = { .min =64 , .max =256 , .count =128 };/* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */ nic->mac = (nic->flags & ich) ? mac_82559_D101M : nic->pdev->revision;
Signature · 1 line
2.34.1