Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: sfp-bus: constify link_modes to sfp_select_interface()

sfp_select_interface() does not modify its link_modes argument, so
make this a const pointer.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://lore.kernel.org/r/E1s15s0-00AHyq-8E@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Russell King (Oracle) and committed by
Paolo Abeni
5cd9fac3 8a3163b6

+3 -3
+1 -1
drivers/net/phy/sfp-bus.c
··· 355 355 * modes mask. 356 356 */ 357 357 phy_interface_t sfp_select_interface(struct sfp_bus *bus, 358 - unsigned long *link_modes) 358 + const unsigned long *link_modes) 359 359 { 360 360 if (phylink_test(link_modes, 25000baseCR_Full) || 361 361 phylink_test(link_modes, 25000baseKR_Full) ||
+2 -2
include/linux/sfp.h
··· 554 554 void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id, 555 555 unsigned long *support, unsigned long *interfaces); 556 556 phy_interface_t sfp_select_interface(struct sfp_bus *bus, 557 - unsigned long *link_modes); 557 + const unsigned long *link_modes); 558 558 559 559 int sfp_get_module_info(struct sfp_bus *bus, struct ethtool_modinfo *modinfo); 560 560 int sfp_get_module_eeprom(struct sfp_bus *bus, struct ethtool_eeprom *ee, ··· 593 593 } 594 594 595 595 static inline phy_interface_t sfp_select_interface(struct sfp_bus *bus, 596 - unsigned long *link_modes) 596 + const unsigned long *link_modes) 597 597 { 598 598 return PHY_INTERFACE_MODE_NA; 599 599 }