From: Josua Mayer <josua@solid-run.com>
To: u-boot@lists.denx.de
Cc: Josua Mayer <josua@solid-run.com>, Stefan Roese <sr@denx.de>,
Baruch Siach <baruch@tkos.co.il>,
Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: [PATCH] cmd: tlv_eeprom: fix signature for populate_serial_number function
Date: Tue, 16 May 2023 11:27:34 +0300 [thread overview]
Message-ID: <20230516082734.13254-1-josua@solid-run.com> (raw)
populate_serial_number is not used internally for the tlv_eeprom
command, but rather provided as a library function for external use..
Remove the devnum that had recently been added by mistake, returning the
function to its original signature.
Instead place a 0-initialised member variable inside the function to
same purpose, along with a node that it only supports reading from the
first EEPROM in the system.
Fixes: dfda0c0 ("cmd: tlv_eeprom: remove use of global variable current_dev")
Signed-off-by: Josua Mayer <josua@solid-run.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
cmd/tlv_eeprom.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 79796394c5c..0ca4d714645 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -1100,11 +1100,12 @@ int mac_read_from_eeprom(void)
*
* This function must be called after relocation.
*/
-int populate_serial_number(int devnum)
+int populate_serial_number(void)
{
char serialstr[257];
int eeprom_index;
struct tlvinfo_tlv *eeprom_tlv;
+ int devnum = 0; // TODO: support multiple EEPROMs
if (env_get("serial#"))
return 0;
--
2.35.3
next reply other threads:[~2023-05-16 8:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 8:27 Josua Mayer [this message]
2023-05-16 11:21 ` [PATCH] cmd: tlv_eeprom: fix signature for populate_serial_number function Heinrich Schuchardt
2023-05-16 11:49 ` Josua Mayer
2023-05-16 12:16 ` Heinrich Schuchardt
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=20230516082734.13254-1-josua@solid-run.com \
--to=josua@solid-run.com \
--cc=baruch@tkos.co.il \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.