lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aSAHVPsxrM60lRIj@debianbuilder>
Date: Fri, 21 Nov 2025 07:31:48 +0100
From: Buday Csaba <buday.csaba@...lan.hu>
To: <netdev@...r.kernel.org>
Subject: [Question] Return value of mii_bus->write()

I am preparing a patch to eliminate kernel-doc warnings in mdio_device.c
and mdio_bus.c

I have ran into an ambiguity: what is mii_bus->write() supposed to
return on success? Documentation/networking/phy.txt does not give any
information about it, neither does the kdoc in include/linux/phy.h.

It is clear that 0 is treated as success, and a negative indicates
failure. The reference implementation also follows this convention.
But the code in mdio_bus.c, for example: __mdiobus_modify_changed(),
seems to also expect positive return values from write().

Is there any other implementation that allows positive return
values for success? Should it be mentioned in kernel-doc?

Thanks,
Csaba


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ