On Tue, 2013-09-24 at 02:45 -0700, Jeff Kirsher wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
[]
quoted hunk ↗ jump to hunk
@@ -3339,9 +3345,7 @@ static u8 i40e_dcb_get_num_tc(struct i40e_dcbx_config *dcbcfg)
/* Traffic class index starts from zero so
* increment to return the actual count
*/
- num_tc++;
-
- return num_tc;
+ return num_tc++;
Ick. post_increment problem.
return ++num_tc;
There's nothing wrong with the original code
unless this is a bugfix which should be documented
better than "better return values".