diff mbox series

[net-next] net: phy: qt2025: simplify Result<()> in probe return

Message ID 20241118-simplify-result-qt2025-v1-1-f2d9cef17fca@iiitd.ac.in (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: phy: qt2025: simplify Result<()> in probe return | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 8 maintainers not CCed: bjorn3_gh@protonmail.com gary@garyguo.net alex.gaynor@gmail.com aliceryhl@google.com boqun.feng@gmail.com a.hindborg@kernel.org ojeda@kernel.org benno.lossin@proton.me
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust fail Link
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Manas via B4 Relay Nov. 18, 2024, 1:09 p.m. UTC
From: Manas <manas18244@iiitd.ac.in>

probe returns a `Result<()>` type, which can be simplified as `Result`,
due to default type parameters being unit `()` and `Error` types. This
maintains a consistent usage of `Result` throughout codebase.

Signed-off-by: Manas <manas18244@iiitd.ac.in>
---
 drivers/net/phy/qt2025.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
change-id: 20241118-simplify-result-qt2025-1bb99d8e53ec

Best regards,

Comments

Andrew Lunn Nov. 18, 2024, 2:15 p.m. UTC | #1
On Mon, Nov 18, 2024 at 06:39:34PM +0530, Manas via B4 Relay wrote:
> From: Manas <manas18244@iiitd.ac.in>
> 
> probe returns a `Result<()>` type, which can be simplified as `Result`,
> due to default type parameters being unit `()` and `Error` types. This
> maintains a consistent usage of `Result` throughout codebase.
> 
> Signed-off-by: Manas <manas18244@iiitd.ac.in>

Miguel has already pointed out, this is probably not sufficient for a
signed-off-by: You need a real name here, in order to keep the lawyers happy.

Also, each subsystem has its own way of doing things. Please take a
read of:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

    Andrew

---
pw-bot: cr
Manas Nov. 18, 2024, 2:28 p.m. UTC | #2
On 18.11.2024 15:15, Andrew Lunn wrote:
>On Mon, Nov 18, 2024 at 06:39:34PM +0530, Manas via B4 Relay wrote:
>> From: Manas <manas18244@iiitd.ac.in>
>>
>> probe returns a `Result<()>` type, which can be simplified as `Result`,
>> due to default type parameters being unit `()` and `Error` types. This
>> maintains a consistent usage of `Result` throughout codebase.
>>
>> Signed-off-by: Manas <manas18244@iiitd.ac.in>
>
>Miguel has already pointed out, this is probably not sufficient for a
>signed-off-by: You need a real name here, in order to keep the lawyers happy.
>
Hi Andrew, I did clarify that "Manas" is my real name, (as in what the official
documents have). It is not a pseudonym. I am unsure if I am missing something
here.

>Also, each subsystem has its own way of doing things. Please take a
>read of:
>
>https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
>
>    Andrew
>
>---
>pw-bot: cr
I did take a look at the subsystem docs. I added target tree `net-next` and
added all prefixes. I thought `Fixes:` tag wouldn't be appropriate here.

I missed the Link: and Suggested by: tags as I was moving from v1. I will add
those.
diff mbox series

Patch

diff --git a/drivers/net/phy/qt2025.rs b/drivers/net/phy/qt2025.rs
index 1ab065798175b4f54c5f2fd6c871ba2942c48bf1..25c12a02baa255d3d5952e729a890b3ccfe78606 100644
--- a/drivers/net/phy/qt2025.rs
+++ b/drivers/net/phy/qt2025.rs
@@ -39,7 +39,7 @@  impl Driver for PhyQT2025 {
     const NAME: &'static CStr = c_str!("QT2025 10Gpbs SFP+");
     const PHY_DEVICE_ID: phy::DeviceId = phy::DeviceId::new_with_exact_mask(0x0043a400);
 
-    fn probe(dev: &mut phy::Device) -> Result<()> {
+    fn probe(dev: &mut phy::Device) -> Result {
         // Check the hardware revision code.
         // Only 0x3b works with this driver and firmware.
         let hw_rev = dev.read(C45::new(Mmd::PMAPMD, 0xd001))?;