diff mbox

[1/1] ixgbe: add missing braces

Message ID 1344620114-6173-1-git-send-email-peter.p.waskiewicz.jr@intel.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Waskiewicz Jr, Peter P Aug. 10, 2012, 5:35 p.m. UTC
From: Emil Tantilov <emil.s.tantilov@intel.com>

This patch adds missing braces around the 10gig link check to include the check for  KR support.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reported-by: Sascha Wildner <saw@online.de>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

David Miller Aug. 10, 2012, 11:51 p.m. UTC | #1
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Date: Fri, 10 Aug 2012 10:35:14 -0700

> From: Emil Tantilov <emil.s.tantilov@intel.com>
> 
> This patch adds missing braces around the 10gig link check to include the check for  KR support.
> 
> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Reported-by: Sascha Wildner <saw@online.de>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches Aug. 11, 2012, 12:34 a.m. UTC | #2
On Fri, 2012-08-10 at 10:35 -0700, Peter P Waskiewicz Jr wrote:
> From: Emil Tantilov <emil.s.tantilov@intel.com>
[]
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
[]
> @@ -804,12 +804,13 @@ static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
>  	    link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) {
>  		/* Set KX4/KX/KR support according to speed requested */
>  		autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK | IXGBE_AUTOC_KR_SUPP);
> -		if (speed & IXGBE_LINK_SPEED_10GB_FULL)
> +		if (speed & IXGBE_LINK_SPEED_10GB_FULL) {
>  			if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
>  				autoc |= IXGBE_AUTOC_KX4_SUPP;
>  			if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
>  			    (hw->phy.smart_speed_active == false))

trivial and unrelated:

Testing booleans against true|false is not good style.

"value == false" is better written as "!value", etc...


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
index 50fc137..18bf08c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -804,12 +804,13 @@  static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
 	    link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) {
 		/* Set KX4/KX/KR support according to speed requested */
 		autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK | IXGBE_AUTOC_KR_SUPP);
-		if (speed & IXGBE_LINK_SPEED_10GB_FULL)
+		if (speed & IXGBE_LINK_SPEED_10GB_FULL) {
 			if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
 				autoc |= IXGBE_AUTOC_KX4_SUPP;
 			if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
 			    (hw->phy.smart_speed_active == false))
 				autoc |= IXGBE_AUTOC_KR_SUPP;
+		}
 		if (speed & IXGBE_LINK_SPEED_1GB_FULL)
 			autoc |= IXGBE_AUTOC_KX_SUPP;
 	} else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&