public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Emese Revfy <re.emese@gmail.com>
To: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com,
	bruce.w.allan@intel.com, peter.p.waskiewicz.jr@intel.com,
	john.ronciak@intel.com, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/31] Constify struct e1000_phy_operations for net-next-2.6 v1
Date: Sun, 06 Dec 2009 01:38:03 +0100	[thread overview]
Message-ID: <4B1AFCEB.5050103@gmail.com> (raw)
In-Reply-To: <4B198AE3.2040003@gmail.com>

From: Emese Revfy <re.emese@gmail.com>

Constify struct e1000_phy_operations with some exceptions.

Signed-off-by: Emese Revfy <re.emese@gmail.com>
---
 drivers/net/e1000e/82571.c    |    6 +++---
 drivers/net/e1000e/e1000.h    |    2 +-
 drivers/net/e1000e/es2lan.c   |    2 +-
 drivers/net/e1000e/hw.h       |    1 +
 drivers/net/e1000e/ich8lan.c  |    2 +-
 drivers/net/igb/e1000_82575.c |    2 +-
 drivers/net/igb/e1000_hw.h    |    3 ++-
 7 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
index c1a42cf..d51b8ca 100644
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -1712,7 +1712,7 @@ static struct e1000_mac_operations e82571_mac_ops = {
 	.setup_led		= e1000e_setup_led_generic,
 };
 
-static struct e1000_phy_operations e82_phy_ops_igp = {
+static const struct e1000_phy_operations e82_phy_ops_igp = {
 	.acquire		= e1000_get_hw_semaphore_82571,
 	.check_polarity		= e1000_check_polarity_igp,
 	.check_reset_block	= e1000e_check_reset_block_generic,
@@ -1730,7 +1730,7 @@ static struct e1000_phy_operations e82_phy_ops_igp = {
 	.cfg_on_link_up      	= NULL,
 };
 
-static struct e1000_phy_operations e82_phy_ops_m88 = {
+static const struct e1000_phy_operations e82_phy_ops_m88 = {
 	.acquire		= e1000_get_hw_semaphore_82571,
 	.check_polarity		= e1000_check_polarity_m88,
 	.check_reset_block	= e1000e_check_reset_block_generic,
@@ -1748,7 +1748,7 @@ static struct e1000_phy_operations e82_phy_ops_m88 = {
 	.cfg_on_link_up      	= NULL,
 };
 
-static struct e1000_phy_operations e82_phy_ops_bm = {
+static const struct e1000_phy_operations e82_phy_ops_bm = {
 	.acquire		= e1000_get_hw_semaphore_82571,
 	.check_polarity		= e1000_check_polarity_m88,
 	.check_reset_block	= e1000e_check_reset_block_generic,
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
index cebbd90..e6dada1 100644
--- a/drivers/net/e1000e/e1000.h
+++ b/drivers/net/e1000e/e1000.h
@@ -380,7 +380,7 @@ struct e1000_info {
 	u32			max_hw_frame_size;
 	s32			(*get_variants)(struct e1000_adapter *);
 	struct e1000_mac_operations *mac_ops;
-	struct e1000_phy_operations *phy_ops;
+	const struct e1000_phy_operations *phy_ops;
 	struct e1000_nvm_operations *nvm_ops;
 };
 
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c
index d2a1047..ce3049d 100644
--- a/drivers/net/e1000e/es2lan.c
+++ b/drivers/net/e1000e/es2lan.c
@@ -1389,7 +1389,7 @@ static struct e1000_mac_operations es2_mac_ops = {
 	.setup_led		= e1000e_setup_led_generic,
 };
 
-static struct e1000_phy_operations es2_phy_ops = {
+static const struct e1000_phy_operations es2_phy_ops = {
 	.acquire		= e1000_acquire_phy_80003es2lan,
 	.check_polarity		= e1000_check_polarity_m88,
 	.check_reset_block	= e1000e_check_reset_block_generic,
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
index a7d08da..8256b2f 100644
--- a/drivers/net/e1000e/hw.h
+++ b/drivers/net/e1000e/hw.h
@@ -827,6 +827,7 @@ struct e1000_mac_info {
 };
 
 struct e1000_phy_info {
+	/* cannot be const, see drivers/net/e1000e/82571.c:e1000_init_phy_params_82571 */
 	struct e1000_phy_operations ops;
 
 	enum e1000_phy_type type;
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 7b33be9..01d56dc 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -3309,7 +3309,7 @@ static struct e1000_mac_operations ich8_mac_ops = {
 	/* id_led_init dependent on mac type */
 };
 
-static struct e1000_phy_operations ich8_phy_ops = {
+static const struct e1000_phy_operations ich8_phy_ops = {
 	.acquire		= e1000_acquire_swflag_ich8lan,
 	.check_reset_block	= e1000_check_reset_block_ich8lan,
 	.commit			= NULL,
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index e8e9e91..0561e55 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -1593,7 +1593,7 @@ static struct e1000_mac_operations e1000_mac_ops_82575 = {
 	.get_speed_and_duplex = igb_get_speed_and_duplex_copper,
 };
 
-static struct e1000_phy_operations e1000_phy_ops_82575 = {
+static const struct e1000_phy_operations e1000_phy_ops_82575 = {
 	.acquire              = igb_acquire_phy_82575,
 	.get_cfg_done         = igb_get_cfg_done_82575,
 	.release              = igb_release_phy_82575,
diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
index dbaeb5f..3ae2bd5 100644
--- a/drivers/net/igb/e1000_hw.h
+++ b/drivers/net/igb/e1000_hw.h
@@ -325,7 +325,7 @@ struct e1000_nvm_operations {
 struct e1000_info {
 	s32 (*get_invariants)(struct e1000_hw *);
 	struct e1000_mac_operations *mac_ops;
-	struct e1000_phy_operations *phy_ops;
+	const struct e1000_phy_operations *phy_ops;
 	struct e1000_nvm_operations *nvm_ops;
 };
 
@@ -377,6 +377,7 @@ struct e1000_mac_info {
 };
 
 struct e1000_phy_info {
+	/* cannot be const, see drivers/net/igb/e1000_82575.c:igb_get_invariants_82575 */
 	struct e1000_phy_operations ops;
 
 	enum e1000_phy_type type;


  parent reply	other threads:[~2009-12-06  0:36 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 22:00 [PATCH 00/31] constify various _ops structures for 2.6.32 v1 Emese Revfy
2009-12-04 22:05 ` [PATCH 01/31] Constify struct acpi_dock_ops " Emese Revfy
2009-12-04 22:08 ` [PATCH 02/31] Constify struct address_space_operations " Emese Revfy
2009-12-05  0:08   ` Matthew Wilcox
2009-12-05  0:36     ` Emese Revfy
2009-12-05 14:27       ` Matthew Wilcox
2009-12-06  0:18         ` Emese Revfy
2009-12-04 22:09 ` [PATCH 03/31] Constify struct backlight_ops " Emese Revfy
2009-12-04 22:12 ` [PATCH 04/31] Constify struct block_device_operations " Emese Revfy
2009-12-04 22:14 ` [PATCH 05/31] Constify struct dma_map_ops " Emese Revfy
2009-12-05  0:59   ` Stephen Rothwell
2009-12-05  1:20     ` Stephen Rothwell
2009-12-05  2:00       ` Emese Revfy
2009-12-05  2:10         ` Stephen Rothwell
2009-12-05  2:25           ` Emese Revfy
2009-12-05  2:27             ` Stephen Rothwell
2009-12-05  2:52               ` Emese Revfy
2009-12-05  3:21                 ` Stephen Rothwell
2009-12-05 13:32                   ` Emese Revfy
2009-12-04 22:16 ` [PATCH 06/31] Constify struct e1000_mac_operations " Emese Revfy
2009-12-04 22:39   ` Waskiewicz Jr, Peter P
2009-12-05  0:03   ` Emese Revfy
2009-12-05  0:40     ` Stephen Rothwell
2009-12-05  1:18       ` Emese Revfy
2009-12-05  1:21         ` Jeff Kirsher
2009-12-06  0:37   ` [PATCH 06/31] Constify struct e1000_mac_operations for net-next-2.6 v1 Emese Revfy
2009-12-04 22:17 ` [PATCH 07/31] Constify struct e1000_nvm_operations for 2.6.32 v1 Emese Revfy
2009-12-04 22:40   ` Waskiewicz Jr, Peter P
2009-12-05  0:03   ` Emese Revfy
2009-12-06  0:38   ` [PATCH 07/31] Constify struct e1000_nvm_operations for net-next-2.6 v1 Emese Revfy
2009-12-04 22:19 ` [PATCH 08/31] Constify struct e1000_phy_operations for 2.6.32 v1 Emese Revfy
2009-12-04 22:40   ` Waskiewicz Jr, Peter P
2009-12-05  0:03   ` Emese Revfy
2009-12-06  0:38   ` Emese Revfy [this message]
2009-12-04 22:21 ` [PATCH 09/31] Constify struct extent_io_ops " Emese Revfy
2009-12-07 14:12   ` Chris Mason
2009-12-07 23:27     ` Emese Revfy
2009-12-04 22:22 ` [PATCH 10/31] Constify struct file_lock_operations " Emese Revfy
2009-12-04 22:25 ` [PATCH 11/31] Constify struct file_operations " Emese Revfy
2009-12-04 23:07   ` Emese Revfy
2009-12-05  0:02   ` Emese Revfy
2009-12-05  0:09     ` Greg KH
2009-12-05  2:50       ` Emese Revfy
2009-12-05  4:15         ` Greg KH
2009-12-06  1:47           ` Emese Revfy
2009-12-06 17:25             ` Greg KH
2009-12-07  0:45               ` Emese Revfy
2009-12-07 15:11                 ` Greg KH
2009-12-07 17:35                   ` Emese Revfy
2009-12-07 17:57                     ` Greg KH
2009-12-05 14:16     ` Jiri Slaby
2009-12-06  2:38       ` Emese Revfy
2009-12-06  9:23         ` Jiri Slaby
2009-12-04 22:26 ` [PATCH 12/31] Constify struct hv_ops " Emese Revfy
2009-12-04 22:28 ` [PATCH 13/31] Constify struct intel_dvo_dev_ops " Emese Revfy
2009-12-04 22:29 ` [PATCH 14/31] Constify struct item_operations " Emese Revfy
2009-12-04 22:31 ` [PATCH 15/31] Constify struct iwl_ops " Emese Revfy
2009-12-04 23:05   ` Emese Revfy
2009-12-05  0:02   ` Emese Revfy
2009-12-04 22:32 ` [PATCH 16/31] Constify struct kgdb_arch " Emese Revfy
2009-12-04 22:33 ` [PATCH 17/31] Constify struct kgdb_io " Emese Revfy
2009-12-04 22:35 ` [PATCH 18/31] Constify struct kset_uevent_ops " Emese Revfy
2009-12-04 22:36 ` [PATCH 19/31] Constify struct lock_manager_operations " Emese Revfy
2009-12-04 22:37 ` [PATCH 20/31] Constify struct microcode_ops " Emese Revfy
2009-12-04 22:38 ` [PATCH 21/31] Constify struct mtrr_ops " Emese Revfy
2009-12-07 18:40   ` H. Peter Anvin
2009-12-04 22:39 ` [PATCH 22/31] Constify struct neigh_ops " Emese Revfy
2009-12-04 23:02   ` Emese Revfy
2009-12-04 23:19     ` David Miller
2009-12-05  0:02   ` Emese Revfy
2009-12-04 22:40 ` [PATCH 23/31] Constify struct nlmsvc_binding " Emese Revfy
2009-12-04 22:41 ` [PATCH 24/31] Constify struct pci_raw_ops " Emese Revfy
2009-12-04 22:42 ` [PATCH 25/31] Constify struct platform_hibernation_ops " Emese Revfy
2009-12-04 22:43 ` [PATCH 26/31] Constify struct platform_suspend_ops " Emese Revfy
2009-12-04 22:44 ` [PATCH 27/31] Constify struct snd_ac97_build_ops " Emese Revfy
2009-12-04 22:47 ` [PATCH 28/31] Constify struct super_operations " Emese Revfy
2009-12-06  1:23   ` Al Viro
2009-12-06  1:41     ` Emese Revfy
2009-12-04 22:49 ` [PATCH 29/31] Constify struct sysfs_ops " Emese Revfy
2009-12-04 23:00   ` Emese Revfy
2009-12-04 23:57   ` Stephen Hemminger
2009-12-05  0:03   ` Emese Revfy
2009-12-05 21:15     ` Jens Axboe
2009-12-06  8:58       ` Pekka Enberg
2009-12-07  9:53     ` Hans J. Koch
2009-12-07 17:46   ` Matt Domsch
2009-12-07 20:09   ` David Teigland
2009-12-04 22:50 ` [PATCH 30/31] Constify struct usb_mon_operations " Emese Revfy
2009-12-04 22:51 ` [PATCH 31/31] Constify struct wd_ops " Emese Revfy

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=4B1AFCEB.5050103@gmail.com \
    --to=re.emese@gmail.com \
    --cc=bruce.w.allan@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=torvalds@linux-foundation.org \
    /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