From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Bruce Allan <bruce.w.allan@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 04/14] e1000e: cleanup: remove e1000_get_phy_cfg_done()
Date: Mon, 28 Jan 2013 01:04:19 -0800 [thread overview]
Message-ID: <1359363869-32391-5-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1359363869-32391-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Bruce Allan <bruce.w.allan@intel.com>
Remove the function e1000_get_phy_cfg_done() and replace the single call
to it with the same function pointer that it would call. The function
pointer is always set so there is no risk of a NULL pointer dereference.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/phy.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c
index 37a85d4..3cf627b 100644
--- a/drivers/net/ethernet/intel/e1000e/phy.c
+++ b/drivers/net/ethernet/intel/e1000e/phy.c
@@ -28,7 +28,6 @@
#include "e1000.h"
-static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw);
static s32 e1000_wait_autoneg(struct e1000_hw *hw);
static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
u16 *data, bool read, bool page_set);
@@ -2165,7 +2164,7 @@ s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw)
phy->ops.release(hw);
- return e1000_get_phy_cfg_done(hw);
+ return phy->ops.get_cfg_done(hw);
}
/**
@@ -2265,23 +2264,6 @@ s32 e1000e_phy_init_script_igp3(struct e1000_hw *hw)
return 0;
}
-/* Internal function pointers */
-
-/**
- * e1000_get_phy_cfg_done - Generic PHY configuration done
- * @hw: pointer to the HW structure
- *
- * Return success if silicon family did not implement a family specific
- * get_cfg_done function.
- **/
-static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw)
-{
- if (hw->phy.ops.get_cfg_done)
- return hw->phy.ops.get_cfg_done(hw);
-
- return 0;
-}
-
/**
* e1000e_get_phy_type_from_id - Get PHY type from id
* @phy_id: phy_id read from the phy
--
1.7.11.7
next prev parent reply other threads:[~2013-01-28 9:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 9:04 [net-next 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-01-28 9:04 ` [net-next 01/14] e1000e: cleanup: remove e1000_set_d0_lplu_state() Jeff Kirsher
2013-01-28 9:04 ` [net-next 02/14] e1000e: cleanup: remove e1000_force_speed_duplex() Jeff Kirsher
2013-01-28 9:04 ` [net-next 03/14] e1000e: cleanup: rename e1000_get_cfg_done() Jeff Kirsher
2013-01-28 9:04 ` Jeff Kirsher [this message]
2013-01-28 9:04 ` [net-next 05/14] e1000e: cleanup: remove e1000_get_cable_length() Jeff Kirsher
2013-01-28 9:04 ` [net-next 06/14] e1000e: cleanup: remove e1000e_commit_phy() Jeff Kirsher
2013-01-28 9:04 ` [net-next 07/14] e1000e: correct maximum frame size on 82579 Jeff Kirsher
2013-01-28 9:04 ` [net-next 08/14] e1000e: adjust PM QoS request Jeff Kirsher
2013-01-28 9:04 ` [net-next 09/14] e1000e: cleanup: remove unused #define Jeff Kirsher
2013-01-28 9:04 ` [net-next 10/14] e1000e: cleanup hw.h Jeff Kirsher
2013-01-28 9:04 ` [net-next 11/14] e1000e: cleanup: remove comments which are no longer applicable Jeff Kirsher
2013-01-28 9:04 ` [net-next 12/14] ixgbevf: Make sure link status and speed are fetched Jeff Kirsher
2013-01-28 9:04 ` [net-next 13/14] igb: Don't give VFs random MAC addresses Jeff Kirsher
2013-01-28 11:09 ` Stefan Assmann
2013-01-28 9:04 ` [net-next 14/14] igbvf: be sane about " Jeff Kirsher
2013-01-28 11:11 ` Stefan Assmann
2013-01-28 23:18 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359363869-32391-5-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).