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.

rust: phy: use VTABLE_DEFAULT_ERROR

Since 6.8-rc1, using VTABLE_DEFAULT_ERROR for optional functions
(never called) in #[vtable] is the recommended way.

Note that no functional changes in this patch.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

FUJITA Tomonori and committed by
David S. Miller
599b75a3 1d4046b5

+8 -8
+8 -8
rust/kernel/net/phy.rs
··· 580 580 581 581 /// Issues a PHY software reset. 582 582 fn soft_reset(_dev: &mut Device) -> Result { 583 - Err(code::ENOTSUPP) 583 + kernel::build_error(VTABLE_DEFAULT_ERROR) 584 584 } 585 585 586 586 /// Probes the hardware to determine what abilities it has. 587 587 fn get_features(_dev: &mut Device) -> Result { 588 - Err(code::ENOTSUPP) 588 + kernel::build_error(VTABLE_DEFAULT_ERROR) 589 589 } 590 590 591 591 /// Returns true if this is a suitable driver for the given phydev. ··· 597 597 /// Configures the advertisement and resets auto-negotiation 598 598 /// if auto-negotiation is enabled. 599 599 fn config_aneg(_dev: &mut Device) -> Result { 600 - Err(code::ENOTSUPP) 600 + kernel::build_error(VTABLE_DEFAULT_ERROR) 601 601 } 602 602 603 603 /// Determines the negotiated speed and duplex. 604 604 fn read_status(_dev: &mut Device) -> Result<u16> { 605 - Err(code::ENOTSUPP) 605 + kernel::build_error(VTABLE_DEFAULT_ERROR) 606 606 } 607 607 608 608 /// Suspends the hardware, saving state if needed. 609 609 fn suspend(_dev: &mut Device) -> Result { 610 - Err(code::ENOTSUPP) 610 + kernel::build_error(VTABLE_DEFAULT_ERROR) 611 611 } 612 612 613 613 /// Resumes the hardware, restoring state if needed. 614 614 fn resume(_dev: &mut Device) -> Result { 615 - Err(code::ENOTSUPP) 615 + kernel::build_error(VTABLE_DEFAULT_ERROR) 616 616 } 617 617 618 618 /// Overrides the default MMD read function for reading a MMD register. 619 619 fn read_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16) -> Result<u16> { 620 - Err(code::ENOTSUPP) 620 + kernel::build_error(VTABLE_DEFAULT_ERROR) 621 621 } 622 622 623 623 /// Overrides the default MMD write function for writing a MMD register. 624 624 fn write_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16, _val: u16) -> Result { 625 - Err(code::ENOTSUPP) 625 + kernel::build_error(VTABLE_DEFAULT_ERROR) 626 626 } 627 627 628 628 /// Callback for notification of link change.