public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>
Cc: u-boot@lists.denx.de, "Marek Behún" <marek.behun@nic.cz>,
	"Vladimir Oltean" <vladimir.oltean@nxp.com>
Subject: [PATCH u-boot-net v4 01/14] net: mdio-uclass: fix type for phy_mode_str and phy_handle_str
Date: Thu,  7 Apr 2022 00:32:55 +0200	[thread overview]
Message-ID: <20220406223308.9833-2-kabel@kernel.org> (raw)
In-Reply-To: <20220406223308.9833-1-kabel@kernel.org>

From: Marek Behún <marek.behun@nic.cz>

These global variables should both have type
  static const char * const

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/mdio-uclass.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index e74e34f78f..5735afe49e 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -17,13 +17,14 @@
 
 /* DT node properties for MAC-PHY interface */
 #define PHY_MODE_STR_CNT	2
-static const char *phy_mode_str[PHY_MODE_STR_CNT] = { "phy-mode",
-						      "phy-connection-type" };
+static const char * const phy_mode_str[PHY_MODE_STR_CNT] = {
+	"phy-mode", "phy-connection-type"
+};
 /* DT node properties that reference a PHY node */
 #define PHY_HANDLE_STR_CNT	3
-const char *phy_handle_str[PHY_HANDLE_STR_CNT] = { "phy-handle",
-						   "phy",
-						   "phy-device" };
+static const char * const phy_handle_str[PHY_HANDLE_STR_CNT] = {
+	"phy-handle", "phy", "phy-device"
+};
 
 void dm_mdio_probe_devices(void)
 {
-- 
2.35.1


  reply	other threads:[~2022-04-06 22:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 22:32 [PATCH u-boot-net v4 00/14] u-boot-net refactors, fixes, cleanups Marek Behún
2022-04-06 22:32 ` Marek Behún [this message]
2022-04-06 22:32 ` [PATCH u-boot-net v4 02/14] net: mdio-uclass: use ARRAY_SIZE() Marek Behún
2022-04-06 22:32 ` [PATCH u-boot-net v4 03/14] net: introduce helpers to get PHY ofnode from MAC Marek Behún
2022-04-13 21:46   ` Tom Rini
2022-04-14 15:39     ` Tom Rini
2022-04-06 22:32 ` [PATCH u-boot-net v4 04/14] net: mdio-uclass: add wrappers for read/write/reset operations Marek Behún
2022-04-06 22:32 ` [PATCH u-boot-net v4 05/14] treewide: use dm_mdio_read/write/reset() wrappers Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 06/14] net: phy: fix parsing wrong property Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 07/14] net: introduce helpers to get PHY interface mode from a device/ofnode Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 08/14] treewide: Rename PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 09/14] treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 10/14] phy: Move PHY_INTERFACE_MODE_NA to the beginning of the enum definition Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 11/14] net: phy: xilinx: Check interface type in ->config(), not ->probe() Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 12/14] net: phy: use ->is_c45 instead of is_10g_interface() Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 13/14] bcmgenet, sun8i_emac: Don't connect PHY two times Marek Behún
2022-04-06 22:33 ` [PATCH u-boot-net v4 14/14] net: phy: don't require PHY interface mode during PHY creation Marek Behún
2022-04-10  5:02 ` [PATCH u-boot-net v4 00/14] u-boot-net refactors, fixes, cleanups Ramon Fried

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=20220406223308.9833-2-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=joe.hershberger@ni.com \
    --cc=marek.behun@nic.cz \
    --cc=rfried.dev@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.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