From: Buday Csaba <buday.csaba@prolan.hu>
To: <netdev@vger.kernel.org>
Subject: [Question] Return value of mii_bus->write()
Date: Fri, 21 Nov 2025 07:31:48 +0100 [thread overview]
Message-ID: <aSAHVPsxrM60lRIj@debianbuilder> (raw)
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
next reply other threads:[~2025-11-21 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 6:31 Buday Csaba [this message]
2025-11-21 6:53 ` [Question] Return value of mii_bus->write() Heiner Kallweit
2025-11-21 7:15 ` Buday Csaba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSAHVPsxrM60lRIj@debianbuilder \
--to=buday.csaba@prolan.hu \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).