Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754092AbbF3E4J (ORCPT ); Tue, 30 Jun 2015 00:56:09 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:57229 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061AbbF3Ezy (ORCPT ); Tue, 30 Jun 2015 00:55:54 -0400 X-AuditID: cbfee690-f796f6d000005054-36-55922157a698 From: Maninder Singh To: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com, shannon.nelson@intel.com, carolyn.wyborny@intel.com, donald.c.skidmore@intel.com, matthew.vick@intel.com, john.ronciak@intel.com, mitch.a.williams@intel.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0]) Date: Tue, 30 Jun 2015 10:25:30 +0530 Message-id: <1435640130-1466-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsWyRsSkWjdccVKowfQXPBbNR78yWlxYdY3J 4v+t36wWJzbfZ7TY/3s2m8WsSVuYLC7vmsNmcXh+G4vFnrfHmSzmfRawOLZAzOLem61MFss/ 9LI58Hos3vOSyeNkc6lH35ZVjB6fN8kFsERx2aSk5mSWpRbp2yVwZUzacY+xYDZ3xZSpu9gb GE9xdjFycEgImEic7eLtYuQEMsUkLtxbz9bFyMUhJLCUUeLrwQVsEAkTiVeHepghEosYJR41 dLNCOD8ZJS587WQEqWIT0JNYtWsPC0hCRGAnk8SkJSuYQFYwCzhJTP+qB1IjLOAl8WgpSD0H B4uAqsSW/aEgYV4BN4mj3ScYIQ5SkJgzyQZkioTAInaJhQ1v2EFqWAQEJL5NPsQCUSMrsekA M8RtkhIHV9xgmcAouICRYRWjaGpBck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O403xmq4qO1DMJluBzTtErOzg3 OXE4hMR+33/gWlDDX8Uduq8vPWX2XFjiwP4rMjtcft6K1Obt1qZ7m1ZdL0oU6Nx++d2uHRa1 wa/ePZjOG1wgZ81Y+N/H5q+bjaXzcebJjQcNV0+7wnj4m0bnQ2uTa0osxRmJhlrMRcWJADe/ ZaO1AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1645 Lines: 40 Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0]) Signed-off-by: Maninder Singh Reviewed-by: Yogesh Narayan Gaur --- drivers/net/ethernet/intel/igb/e1000_phy.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c index c1bb64d..e399b3c 100644 --- a/drivers/net/ethernet/intel/igb/e1000_phy.c +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c @@ -37,8 +37,7 @@ static s32 igb_set_master_slave_mode(struct e1000_hw *hw); static const u16 e1000_m88_cable_length_table[] = { 0, 50, 80, 110, 140, 140, E1000_CABLE_LENGTH_UNDEFINED }; #define M88E1000_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_m88_cable_length_table) / \ - sizeof(e1000_m88_cable_length_table[0])) + ARRAY_SIZE(e1000_m88_cable_length_table) static const u16 e1000_igp_2_cable_length_table[] = { 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 8, 11, 13, 16, 18, 21, @@ -50,8 +49,7 @@ static const u16 e1000_igp_2_cable_length_table[] = { 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124, 104, 109, 114, 118, 121, 124}; #define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_igp_2_cable_length_table) / \ - sizeof(e1000_igp_2_cable_length_table[0])) + ARRAY_SIZE(e1000_igp_2_cable_length_table) /** * igb_check_reset_block - Check if PHY reset is blocked -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/