diff mbox series

[net] net: dpaa: Fix dtsec check for PCS availability

Message ID 20230103065038.2174637-1-seanga2@gmail.com (mailing list archive)
State Accepted
Commit 7dc61838541928895abae6d2355258e02a251bba
Delegated to: Netdev Maintainers
Headers show
Series [net] net: dpaa: Fix dtsec check for PCS availability | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sean Anderson Jan. 3, 2023, 6:50 a.m. UTC
We want to fail if the PCS is not available, not if it is available. Fix
this condition.

Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
Reported-by: Christian Zigotzky <info@xenosoft.de>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiri Pirko Jan. 3, 2023, 9:15 a.m. UTC | #1
Tue, Jan 03, 2023 at 07:50:38AM CET, seanga2@gmail.com wrote:
>We want to fail if the PCS is not available, not if it is available. Fix

It is odd to read plural maiestaticus in patch desctiption :) Better to
stick with describing what code does wrong and then telling the codebase
what to do.


>this condition.
>
>Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
>Reported-by: Christian Zigotzky <info@xenosoft.de>
>Signed-off-by: Sean Anderson <seanga2@gmail.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Jan. 3, 2023, 9:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue,  3 Jan 2023 01:50:38 -0500 you wrote:
> We want to fail if the PCS is not available, not if it is available. Fix
> this condition.
> 
> Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
> Reported-by: Christian Zigotzky <info@xenosoft.de>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net] net: dpaa: Fix dtsec check for PCS availability
    https://git.kernel.org/netdev/net/c/7dc618385419

You are awesome, thank you!
Sean Anderson Jan. 3, 2023, 2:37 p.m. UTC | #3
On 1/3/23 04:15, Jiri Pirko wrote:
> Tue, Jan 03, 2023 at 07:50:38AM CET, seanga2@gmail.com wrote:
>> We want to fail if the PCS is not available, not if it is available. Fix
> 
> It is odd to read plural maiestaticus in patch desctiption :) Better to
> stick with describing what code does wrong and then telling the codebase
> what to do.

Writing a kernel is a collaborative effort :)

>> this condition.
>>
>> Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
>> Reported-by: Christian Zigotzky <info@xenosoft.de>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> 
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index 3c87820ca202..3462f2b78680 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -1431,7 +1431,7 @@  int dtsec_initialization(struct mac_device *mac_dev,
 	dtsec->dtsec_drv_param->tx_pad_crc = true;
 
 	phy_node = of_parse_phandle(mac_node, "tbi-handle", 0);
-	if (!phy_node || of_device_is_available(phy_node)) {
+	if (!phy_node || !of_device_is_available(phy_node)) {
 		of_node_put(phy_node);
 		err = -EINVAL;
 		dev_err_probe(mac_dev->dev, err,