• Kalle Valo's avatar
    wifi: ipw2x00: fix format-truncation warnings · c253e43e
    Kalle Valo authored
    On v6.6-rc4 with GCC 13.2 I see:
    
    drivers/net/wireless/intel/ipw2x00/ipw2100.c:5905:63: warning: '%s' directive output may be truncated writing up to 63 bytes into a region of size 32 [-Wformat-truncation=]
    drivers/net/wireless/intel/ipw2x00/ipw2100.c:5905:9: note: 'snprintf' output between 4 and 140 bytes into a destination of size 32
    drivers/net/wireless/intel/ipw2x00/ipw2200.c:10392:63: warning: '%s' directive output may be truncated writing up to 63 bytes into a region of size 32 [-Wformat-truncation=]
    drivers/net/wireless/intel/ipw2x00/ipw2200.c:10392:9: note: 'snprintf' output between 4 and 98 bytes into a destination of size 32
    
    Fix this by copying only the firmware version and not providing any extra
    information via ethtool. This is an ancient driver anyway and most likely
    removed soon so it doesn't really matter.
    
    Compile tested only.
    Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
    Link: https://lore.kernel.org/r/20231012135854.3473332-2-kvalo@kernel.org
    c253e43e
ipw2200.c 321 KB