* [U-Boot] [PATCH] net: change the env name to use const
@ 2015-09-01 10:22 Josh Wu
2015-09-02 2:33 ` Simon Glass
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Josh Wu @ 2015-09-01 10:22 UTC (permalink / raw)
To: u-boot
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
include/net.h | 4 ++--
net/eth.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/net.h b/include/net.h
index d09bec9..133fee4 100644
--- a/include/net.h
+++ b/include/net.h
@@ -229,8 +229,8 @@ void eth_set_current(void); /* set nterface to ethcur var */
int eth_get_dev_index(void); /* get the device index */
void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
-int eth_getenv_enetaddr(char *name, uchar *enetaddr);
-int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
+int eth_getenv_enetaddr(const char *name, uchar *enetaddr);
+int eth_setenv_enetaddr(const char *name, const uchar *enetaddr);
/*
* Get the hardware address for an ethernet interface .
diff --git a/net/eth.c b/net/eth.c
index d3ec8d6..8e146d2 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -31,13 +31,13 @@ void eth_parse_enetaddr(const char *addr, uchar *enetaddr)
}
}
-int eth_getenv_enetaddr(char *name, uchar *enetaddr)
+int eth_getenv_enetaddr(const char *name, uchar *enetaddr)
{
eth_parse_enetaddr(getenv(name), enetaddr);
return is_valid_ethaddr(enetaddr);
}
-int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
+int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
{
char buf[20];
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] net: change the env name to use const
2015-09-01 10:22 [U-Boot] [PATCH] net: change the env name to use const Josh Wu
@ 2015-09-02 2:33 ` Simon Glass
2015-09-04 15:34 ` Joe Hershberger
2015-10-29 19:31 ` Joe Hershberger
2 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2015-09-02 2:33 UTC (permalink / raw)
To: u-boot
On 1 September 2015 at 04:22, Josh Wu <josh.wu@atmel.com> wrote:
> As we don't modify the 'name' parameter, so change it to const.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
>
> include/net.h | 4 ++--
> net/eth.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] net: change the env name to use const
2015-09-01 10:22 [U-Boot] [PATCH] net: change the env name to use const Josh Wu
2015-09-02 2:33 ` Simon Glass
@ 2015-09-04 15:34 ` Joe Hershberger
2015-10-16 3:19 ` Josh Wu
2015-10-29 19:31 ` Joe Hershberger
2 siblings, 1 reply; 5+ messages in thread
From: Joe Hershberger @ 2015-09-04 15:34 UTC (permalink / raw)
To: u-boot
On Tue, Sep 1, 2015 at 5:22 AM, Josh Wu <josh.wu@atmel.com> wrote:
> As we don't modify the 'name' parameter, so change it to const.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] net: change the env name to use const
2015-09-04 15:34 ` Joe Hershberger
@ 2015-10-16 3:19 ` Josh Wu
0 siblings, 0 replies; 5+ messages in thread
From: Josh Wu @ 2015-10-16 3:19 UTC (permalink / raw)
To: u-boot
Hi, Joe
On 9/4/2015 11:34 PM, Joe Hershberger wrote:
> On Tue, Sep 1, 2015 at 5:22 AM, Josh Wu <josh.wu@atmel.com> wrote:
>> As we don't modify the 'name' parameter, so change it to const.
>>
>> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Thanks for the Ack.
It seems I didn't see this patch in your git tree, or I missed something?
Best Regards,
Josh Wu
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] net: change the env name to use const
2015-09-01 10:22 [U-Boot] [PATCH] net: change the env name to use const Josh Wu
2015-09-02 2:33 ` Simon Glass
2015-09-04 15:34 ` Joe Hershberger
@ 2015-10-29 19:31 ` Joe Hershberger
2 siblings, 0 replies; 5+ messages in thread
From: Joe Hershberger @ 2015-10-29 19:31 UTC (permalink / raw)
To: u-boot
On Tue, Sep 1, 2015 at 5:22 AM, Josh Wu <josh.wu@atmel.com> wrote:
> As we don't modify the 'name' parameter, so change it to const.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
Applied to u-boot-net/master, thanks!
-Joe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-29 19:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-01 10:22 [U-Boot] [PATCH] net: change the env name to use const Josh Wu
2015-09-02 2:33 ` Simon Glass
2015-09-04 15:34 ` Joe Hershberger
2015-10-16 3:19 ` Josh Wu
2015-10-29 19:31 ` Joe Hershberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox