Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1660771
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Bhumika Goyal <bhumirks@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] drivers: net: emac: add const to mii_phy_ops structures |
| Date | Thu, 08 Jun 2017 08:10:01 +0200 |
| Message-ID | <tPYNP-vi-5@gated-at.bofh.it> (permalink) |
| References | <tPYNP-vi-3@gated-at.bofh.it> |
| X-Original-To | julia.lawall@lip6.fr, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jeffrey.t.kirsher@intel.com, davem@davemloft.net |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8YecZbkC1nUVhX77A200NEVTPjmtQU1ngJNkFpnYMuU=; b=RhAYfWi8ko0/cAY0r97UAY28LAGy3LjiMii3LdeTxPEt7zlKdfkwZ5HX3Ht66UFRH0 AApt3bynJmLZKiTqAffYVla1JJHwE8w4IdFCFBnmvwSRE+ucKJjP4GzBJ6BMj8xgKlq6 bFMxiotTGqXzuWjsYigUjNHsSrZWg2dYR+v3klhP0TX2iyee3ejZQMTUma9rIyWwAKWx h0cSFZaWsfHXZWggBYubV7bW2jmGbEWNEIfpzUccoIjZTstMvdQZvQBnlx5kRhHizwYR Di9S+jIefi8hjNcZVuuCoQyOMNTVaAdWWjOMy9Ncix9q1nhk48m/06gGNwTWP0rYVUiV p4XQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8YecZbkC1nUVhX77A200NEVTPjmtQU1ngJNkFpnYMuU=; b=fS2H3uKk3/Uzk0u3zREicnVhZ3xG/qGXpoh9o5Wx4sNL8/NWQbdrJSSUsEuPa43JSd d1Fw0+Deqi158rctyZBRYOF6z8LnjHZuM3jaBFwtZiGN+aW0cLXhhO9SnG8kO0dDP5qq HSCWZDTlft5g6WR9mzatLSIM4q5Xlzkg/Rxs6glMvRPh0FGoQJPDs88DLTLDCwGYtMQX kHI3dbsh9eYm1S4DtSfylhbyv/KSrSfoRtoGyeIIZk4fgn3kApqfoB5ACGcR5IY922G5 dKRmG3KXXioK54DlQ/EbRndukQGrMXJUkoQFhvItcaZbhCg60LKy8AJB6wFu/eR2xSx4 ecVA== |
| X-Gm-Message-State | AODbwcBKkSwZQx5jijrdcRehNrip/5Onkhi6n8XkUZzFaHx5Bmd0gZbo OhSPVh6HtYDMmQ== |
| X-Received | by 10.98.110.138 with SMTP id j132mr34758696pfc.51.1496901775750; Wed, 07 Jun 2017 23:02:55 -0700 (PDT) |
| X-Mailer | git-send-email 2.7.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 70 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Bhumika Goyal <bhumirks@gmail.com> |
| X-Original-Date | Thu, 8 Jun 2017 11:30:58 +0530 |
| X-Original-Message-ID | <1496901658-6476-3-git-send-email-bhumirks@gmail.com> |
| X-Original-References | <1496901658-6476-1-git-send-email-bhumirks@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1660771 |
Show key headers only | View raw
The object references of mii_phy_ops structures are only stored
in the ops field of a mii_phy_def structure. This ops field is of type
const. So, mii_phy_ops structures having similar properties can be
declared as const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/net/ethernet/ibm/emac/phy.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/ibm/emac/phy.c b/drivers/net/ethernet/ibm/emac/phy.c
index 5b88cc6..35865d0 100644
--- a/drivers/net/ethernet/ibm/emac/phy.c
+++ b/drivers/net/ethernet/ibm/emac/phy.c
@@ -276,7 +276,7 @@ static int genmii_read_link(struct mii_phy *phy)
}
/* Generic implementation for most 10/100/1000 PHYs */
-static struct mii_phy_ops generic_phy_ops = {
+static const struct mii_phy_ops generic_phy_ops = {
.setup_aneg = genmii_setup_aneg,
.setup_forced = genmii_setup_forced,
.poll_link = genmii_poll_link,
@@ -340,7 +340,7 @@ static int cis8201_init(struct mii_phy *phy)
return 0;
}
-static struct mii_phy_ops cis8201_phy_ops = {
+static const struct mii_phy_ops cis8201_phy_ops = {
.init = cis8201_init,
.setup_aneg = genmii_setup_aneg,
.setup_forced = genmii_setup_forced,
@@ -420,7 +420,7 @@ static int et1011c_init(struct mii_phy *phy)
return 0;
}
-static struct mii_phy_ops et1011c_phy_ops = {
+static const struct mii_phy_ops et1011c_phy_ops = {
.init = et1011c_init,
.setup_aneg = genmii_setup_aneg,
.setup_forced = genmii_setup_forced,
@@ -439,7 +439,7 @@ static struct mii_phy_def et1011c_phy_def = {
-static struct mii_phy_ops m88e1111_phy_ops = {
+static const struct mii_phy_ops m88e1111_phy_ops = {
.init = m88e1111_init,
.setup_aneg = genmii_setup_aneg,
.setup_forced = genmii_setup_forced,
@@ -455,7 +455,7 @@ static struct mii_phy_def m88e1111_phy_def = {
.ops = &m88e1111_phy_ops,
};
-static struct mii_phy_ops m88e1112_phy_ops = {
+static const struct mii_phy_ops m88e1112_phy_ops = {
.init = m88e1112_init,
.setup_aneg = genmii_setup_aneg,
.setup_forced = genmii_setup_forced,
@@ -480,7 +480,7 @@ static int ar8035_init(struct mii_phy *phy)
return 0;
}
-static struct mii_phy_ops ar8035_phy_ops = {
+static const struct mii_phy_ops ar8035_phy_ops = {
.init = ar8035_init,
.setup_aneg = genmii_setup_aneg,
.setup_forced = genmii_setup_forced,
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 2/2] drivers: net: emac: add const to mii_phy_ops structures Bhumika Goyal <bhumirks@gmail.com> - 2017-06-08 08:10 +0200
csiph-web