-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix signed/unsigned comparison for subsystem ID #77
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -434,16 +434,18 @@ static enum PHY_TYPE bdx_phy_init(struct bdx_priv *priv) | |
bdx_get_phy_by_id(pdev->vendor, pdev->device, | ||
pdev->subsystem_device); | ||
|
||
if (phy_type == PHY_TYPE_NA) | ||
if (phy_type == PHY_TYPE_NA){ | ||
dev_info(&priv->pdev->dev, "No PHY for subsystem_device [%4x:%4x:%4x]\n", pdev->vendor, pdev->device, pdev->subsystem_device); | ||
return PHY_TYPE_NA; /* NIC definition has no PHY. */ | ||
|
||
} | ||
bdx_mdio_set_speed(priv->pBdxRegs, MDIO_SPEED_1MHZ); | ||
|
||
phy_id = bdx_mdio_scan_phy_id(priv); /* set phy_mdio_port */ | ||
|
||
if (!priv->phy_mdio_port) | ||
if (!priv->phy_mdio_port){ | ||
dev_info(&priv->pdev->dev, "No PHY on MDIO bus\n"); | ||
return PHY_TYPE_NA; /* No PHY detected on MDIO bus. */ | ||
|
||
} | ||
/* register the PHY-specific callbacks */ | ||
priv->phy_type = bdx_phy_register(priv, phy_id, &desc); | ||
|
||
|
@@ -2857,7 +2859,7 @@ static int bdx_get_phy_by_id(int vendor, int device, int subsystem) | |
) | ||
return bdx_dev_tbl[i].phy_type; | ||
} | ||
return 0; | ||
return PHY_TYPE_NA; | ||
} | ||
Comment on lines
2860
to
2863
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change return type of the function to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the feedback. I did a commit to the same branch and it looks like that included it in the same pull request automatically. (still finding my way around git and github) Please let me know if there are other issues or comments. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, it looks good now. Another minor code style issue is a space before the first I don't have merge rights, so we'll have to wait until someone that has, comes around. |
||
|
||
static void __init bdx_init_net_device(struct net_device *ndev, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent with a hard tab to follow the codestyle in the rest of the file. Also one more occurance below. (minor, doesn't hinder merge)