macb: rename platform data
PATCH 1/1 macb: rename platform data
The macb/gem core is used by the Zynq SoC. In preparation of sharing the macb driver between at91 and Zynq, rename the platform data to 'struct macb_platform_data', and move the definition to a common location.
--- arch/arm/boards/animeo_ip/init.c | 2 +- arch/arm/boards/at91rm9200ek/init.c | 2 +- arch/arm/boards/at91sam9260ek/init.c | 2 +- arch/arm/boards/at91sam9263ek/init.c | 2 +- arch/arm/boards/at91sam9m10g45ek/init.c | 2 +- arch/arm/boards/at91sam9m10ihd/init.c | 2 +- arch/arm/boards/at91sam9x5ek/init.c | 2 +- arch/arm/boards/dss11/init.c | 2 +- arch/arm/boards/mmccpu/init.c | 2 +- arch/arm/boards/pm9263/init.c | 2 +- arch/arm/boards/pm9g45/init.c | 2 +- arch/arm/boards/qil-a9260/init.c | 2 +- arch/arm/boards/sama5d3xek/init.c | 4 ++-- arch/arm/boards/telit-evk-pro3/init.c | 2 +- arch/arm/boards/tny-a926x/init.c | 2 +- arch/arm/boards/usb-a926x/init.c | 2 +- arch/arm/mach-at91/at91rm9200_devices.c | 4 ++-- arch/arm/mach-at91/at91sam9260_devices.c | 4 ++-- arch/arm/mach-at91/at91sam9263_devices.c | 4 ++-- arch/arm/mach-at91/at91sam9g45_devices.c | 4 ++-- arch/arm/mach-at91/at91sam9x5_devices.c | 4 ++-- arch/arm/mach-at91/include/mach/board.h | 11 ++--------- arch/arm/mach-at91/sama5d3_devices.c | 4 ++-- drivers/net/at91_ether.c | 2 +- drivers/net/macb.c | 4 ++-- include/platform_data/macb.h | 30 ++++++++++++++++++++++++++++++ 26 files changed, 64 insertions(+), 41 deletions(-) create mode 100644 include/platform_data/macb.h
arch/arm/boards/animeo_ip/init.c +1 -1
@@ -120,7 +120,7 @@ static void animeo_ip_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_addr =0 , };
arch/arm/boards/at91rm9200ek/init.c +1 -1
@@ -32,7 +32,7 @@#include <mach/io.h> #include <spi/spi.h> -static struct at91_ether_platform_data ether_pdata = { +static struct macb_platform_data ether_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/at91sam9260ek/init.c +1 -1
@@ -114,7 +114,7 @@ static void ek_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/at91sam9263ek/init.c +1 -1
@@ -82,7 +82,7 @@ static void ek_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/at91sam9m10g45ek/init.c +1 -1
@@ -105,7 +105,7 @@ static void ek_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/at91sam9m10ihd/init.c +1 -1
@@ -79,7 +79,7 @@ static void ek_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/at91sam9x5ek/init.c +1 -1
@@ -105,7 +105,7 @@ static void ek_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/dss11/init.c +1 -1
@@ -73,7 +73,7 @@ static void dss11_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_addr =0 , .flags =AT91SAM_ETX2_ETX3_ALTERNATIVE , };
arch/arm/boards/mmccpu/init.c +1 -1
@@ -33,7 +33,7 @@#include <mach/gpio.h> #include <mach/io.h> -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_flags =PHYLIB_FORCE_LINK , .phy_addr =4 , };
arch/arm/boards/pm9263/init.c +1 -1
@@ -88,7 +88,7 @@ static void pm_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =-1 , };
arch/arm/boards/pm9g45/init.c +1 -1
@@ -112,7 +112,7 @@ static void __init pm9g45_add_device_usbh(void)static void __init pm9g45_add_device_usbh (void ) {}#endif -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/qil-a9260/init.c +1 -1
@@ -79,7 +79,7 @@ static void qil_a9260_add_device_mci(void) {}#endif #ifdef CONFIG_CALAO_MB_QIL_A9260 -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =-1 , };
arch/arm/boards/sama5d3xek/init.c +2 -2
@@ -110,12 +110,12 @@ static void ek_add_device_nand(void) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -static struct at91_ether_platform_data gmac_pdata = { +static struct macb_platform_data gmac_pdata = { .phy_interface =PHY_INTERFACE_MODE_RGMII , .phy_addr =7 , }; -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/telit-evk-pro3/init.c +1 -1
@@ -62,7 +62,7 @@ static void evk_add_device_nand(void)at91_add_device_nand (&nand_pdata); } -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =0 , };
arch/arm/boards/tny-a926x/init.c +1 -1
@@ -112,7 +112,7 @@ static void tny_a9260_add_device_nand(void) }#ifdef CONFIG_DRIVER_NET_MACB -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =-1 , };
arch/arm/boards/usb-a926x/init.c +1 -1
@@ -117,7 +117,7 @@ static void usb_a9260_add_device_nand(void) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -static struct at91_ether_platform_data macb_pdata = { +static struct macb_platform_data macb_pdata = { .phy_interface =PHY_INTERFACE_MODE_RMII , .phy_addr =-1 , };
arch/arm/mach-at91/at91rm9200_devices.c +2 -2
@@ -86,7 +86,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}* -------------------------------------------------------------------- */ #if defined(CONFIG_DRIVER_NET_AT91_ETHER ) -void __init at91_add_device_eth (int id,struct at91_ether_platform_data *data) +void __init at91_add_device_eth (int id,struct macb_platform_data *data) {if (!data)return ;
@@ -118,7 +118,7 @@ void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data) IORESOURCE_MEM, data); }#else -void __init at91_add_device_eth (int id,struct at91_ether_platform_data *data) {} +void __init at91_add_device_eth (int id,struct macb_platform_data *data) {}#endif /* --------------------------------------------------------------------
arch/arm/mach-at91/at91sam9260_devices.c +2 -2
@@ -81,7 +81,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) +void at91_add_device_eth (int id,struct macb_platform_data *data) {if (!data)return ;
@@ -118,7 +118,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data) IORESOURCE_MEM, data); }#else -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) {} +void at91_add_device_eth (int id,struct macb_platform_data *data) {}#endif #if defined(CONFIG_NAND_ATMEL )
arch/arm/mach-at91/at91sam9263_devices.c +2 -2
@@ -81,7 +81,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) +void at91_add_device_eth (int id,struct macb_platform_data *data) {if (!data)return ;
@@ -112,7 +112,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data) IORESOURCE_MEM, data); }#else -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) {} +void at91_add_device_eth (int id,struct macb_platform_data *data) {}#endif #if defined(CONFIG_NAND_ATMEL )
arch/arm/mach-at91/at91sam9g45_devices.c +2 -2
@@ -82,7 +82,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) +void at91_add_device_eth (int id,struct macb_platform_data *data) {if (!data)return ;
@@ -114,7 +114,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data) IORESOURCE_MEM, data); }#else -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) {} +void at91_add_device_eth (int id,struct macb_platform_data *data) {}#endif #if defined(CONFIG_NAND_ATMEL )
arch/arm/mach-at91/at91sam9x5_devices.c +2 -2
@@ -83,7 +83,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) +void at91_add_device_eth (int id,struct macb_platform_data *data) {resource_size_t start;
@@ -147,7 +147,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data) IORESOURCE_MEM, data); }#else -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) {} +void at91_add_device_eth (int id,struct macb_platform_data *data) {}#endif #if defined(CONFIG_MCI_ATMEL )
arch/arm/mach-at91/include/mach/board.h +2 -9
@@ -28,6 +28,7 @@#include <video/atmel_lcdc.h> #include <mach/atmel_hlcdc.h> #include <linux/phy.h> +#include <platform_data/macb.h> /* USB Host */ struct at91_usbh_data {
@@ -72,15 +73,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);/* Ethernet (EMAC & MACB) */ #define AT91SAM_ETX2_ETX3_ALTERNATIVE (1 << 0) -struct at91_ether_platform_data { -unsigned int phy_flags; -unsigned int flags; -int phy_addr; -phy_interface_t phy_interface; -int (*get_ethaddr)(struct eth_device *,unsigned char *adr); -}; - -void at91_add_device_eth (int id,struct at91_ether_platform_data *data); +void at91_add_device_eth (int id,struct macb_platform_data *data);void at91_add_device_i2c (short i2c_id,struct i2c_board_info *devices,int nr_devices);
arch/arm/mach-at91/sama5d3_devices.c +2 -2
@@ -104,7 +104,7 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) {}#endif #if defined(CONFIG_DRIVER_NET_MACB ) -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) +void at91_add_device_eth (int id,struct macb_platform_data *data) {if (!data)return ;
@@ -204,7 +204,7 @@ void at91_add_device_eth(int id, struct at91_ether_platform_data *data) }#else -void at91_add_device_eth (int id,struct at91_ether_platform_data *data) {} +void at91_add_device_eth (int id,struct macb_platform_data *data) {}#endif #if defined(CONFIG_MCI_ATMEL )
drivers/net/at91_ether.c +1 -1
@@ -298,7 +298,7 @@ static int at91_ether_probe(struct device_d *dev)struct mii_bus *miibus;unsigned long ether_hz;struct clk *pclk; -struct at91_ether_platform_data *pdata; +struct macb_platform_data *pdata;if (!dev->platform_data) {printf ("at91_ether: no platform_data\n" );
drivers/net/macb.c +2 -2
@@ -43,7 +43,7 @@#include <init.h> #include <errno.h> #include <io.h> -#include <mach/board.h> +#include <platform_data/macb.h> #include <linux/clk.h> #include <linux/err.h> #include <asm/mmu.h>
@@ -585,7 +585,7 @@ static int macb_probe(struct device_d *dev)struct eth_device *edev;struct macb_device *macb;u32 ncfgr; -struct at91_ether_platform_data *pdata; +struct macb_platform_data *pdata;if (!dev->platform_data) {dev_err (dev,"macb: no platform_data\n" );
include/platform_data/macb.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* [origin Linux: arch/arm/mach-at91/include/mach/board.h] +* +* Copyright (C) 2005 HP Labs +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +*/ +#ifndef __MACB_H +#define __MACB_H + +#include <linux/phy.h> + +struct macb_platform_data { +unsigned int phy_flags; +unsigned int flags; +int phy_addr; +phy_interface_t phy_interface; +int (*get_ethaddr)(struct eth_device *,unsigned char *adr); +}; + +#endif
Signature · 23 lines
1.8.1.5 From 0d51dc731ff3934e22e78405a992658a8d3bf1de Mon Sep 17 00:00:00 2001 From: Josh Cartwright <[email protected]> Date: Tue, 19 Mar 2013 10:22:48 -0500 Subject: [PATCH] parameter: fix build warning when !CONFIG_PARAMETER To: [email protected] Commit 51f2ded17c35c146488f6f3b697764bb2953a156 ("param: make return value of param getter function const") made the parameter getter const, but neglected to change the dev_add_param() function prototype in the !CONFIG_PARAMETER case. Fixes the following warning with CONFIG_NAND and !CONFIG_PARAMETER: drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device': drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default] include/param.h:59:19: note: expected 'char * (*)(struct device_d *, struct param_d *)' but argument is of type 'const char * (*)(struct device_d *, struct param_d *)' Signed-off-by: Josh Cartwright <[email protected]> --- include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/param.h +1 -1
@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,static inline int dev_add_param (struct device_d *dev,char *name,int (*set)(struct device_d *dev,struct param_d *p,const char *val), -char *(*get)(struct device_d *,struct param_d *p), +const char *(*get)(struct device_d *,struct param_d *p),unsigned long flags) {return 0 ;
Signature · 7 lines
1.8.1.5 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
On Fri, Mar 15, 2013 at 06:26:00PM -0500, Josh Cartwright wrote:
[..]
Quoted 5 lines
Quoted 1 line
From
0d51dc731ff3934e22e78405a992658a8d3bf1deMon Sep 17 00:00:00 2001From: Josh Cartwright <[email protected]>
Date: Tue, 19 Mar 2013 10:22:48 -0500
Subject: [PATCH] parameter: fix build warning when !CONFIG_PARAMETER
To: [email protected]
Ugh, sorry that I butchered patch submission and this mail ended up with two patches together; should I resend?
Quoted 37 lines
Commit
51f2ded17c35c146488f6f3b697764bb2953a156("param: make return value of param getter function const") made the parameter getter const, but neglected to change thedev_add_param()function prototype in the !CONFIG_PARAMETER case.Fixes the following warning with
CONFIG_NANDand !CONFIG_PARAMETER:
drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device':drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default]include/param.h:59:19: note: expected 'char * (*)(structdevice_d*, structparam_d*)' but argument is of type 'const char * (*)(structdevice_d*, structparam_d*)'Signed-off-by Josh Cartwright <[email protected]>--- include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/param.h +1
-1@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,static inline int dev_add_param (struct device_d *dev,char *name,int (*set)(struct device_d *dev,struct param_d *p,const char *val), -char *(*get)(struct device_d *,struct param_d *p), +const char *(*get)(struct device_d *,struct param_d *p),unsigned long flags) {return 0 ;Signature · 7 lines
1.8.1.5 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Josh,
Quoted 10 lines · Josh Cartwright
On Fri, Mar 15, 2013 at 06:26:00PM -0500, Josh Cartwright wrote:
[..]Quoted 5 lines
Quoted 1 line
From
0d51dc731ff3934e22e78405a992658a8d3bf1deMon Sep 17 00:00:00 2001From: Josh Cartwright <[email protected]>
Date: Tue, 19 Mar 2013 10:22:48 -0500
Subject: [PATCH] parameter: fix build warning when !CONFIG_PARAMETER
To: [email protected]Ugh, sorry that I butchered patch submission and this mail ended up with two patches together; should I resend?
No, it's ok. I applied the macb pdata rename. If you wish to have the other one applied, please resend this one.
Sascha
Quoted 44 lines
Quoted 38 lines
Commit
51f2ded17c35c146488f6f3b697764bb2953a156("param: make return value of param getter function const") made the parameter getter const, but neglected to change thedev_add_param()function prototype in the !CONFIG_PARAMETER case.Fixes the following warning with
CONFIG_NANDand !CONFIG_PARAMETER:
drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device':drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default]include/param.h:59:19: note: expected 'char * (*)(structdevice_d*, structparam_d*)' but argument is of type 'const char * (*)(structdevice_d*, structparam_d*)'Signed-off-by Josh Cartwright <[email protected]>--- include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/param.h +1
-1@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,static inline int dev_add_param (struct device_d *dev,char *name,int (*set)(struct device_d *dev,struct param_d *p,const char *val), -char *(*get)(struct device_d *,struct param_d *p), +const char *(*get)(struct device_d *,struct param_d *p),unsigned long flags) {return 0 ;Signature · 7 lines
1.8.1.5 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 11 lines · Sascha Hauer
Hi Josh,
Quoted 8 lines · Josh Cartwright
On Fri, Mar 15, 2013 at 06:26:00PM -0500, Josh Cartwright wrote:
[..]Quoted 5 lines
Quoted 1 line
From
0d51dc731ff3934e22e78405a992658a8d3bf1deMon Sep 17 00:00:00 2001From: Josh Cartwright <[email protected]>
Date: Tue, 19 Mar 2013 10:22:48 -0500
Subject: [PATCH] parameter: fix build warning when !CONFIG_PARAMETER
To: [email protected]
Quoted 5 lines
Quoted 2 lines
Ugh, sorry that I butchered patch submission and this mail ended up with two patches together; should I resend?
No, it's ok. I applied the macb pdata rename. If you wish to have the other one applied, please resend this one.
It looks like what was applied to your tree was a squash of these two changes together, so no need to resend. I'll be more careful in the future.
Thanks,
Josh
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 12 lines · Josh Cartwright
Quoted 11 lines · Sascha Hauer
Hi Josh,
Quoted 8 lines · Josh Cartwright
On Fri, Mar 15, 2013 at 06:26:00PM -0500, Josh Cartwright wrote:
[..]Quoted 5 lines
Quoted 1 line
From
0d51dc731ff3934e22e78405a992658a8d3bf1deMon Sep 17 00:00:00 2001From: Josh Cartwright <[email protected]>
Date: Tue, 19 Mar 2013 10:22:48 -0500
Subject: [PATCH] parameter: fix build warning when !CONFIG_PARAMETER
To: [email protected]
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Ugh, sorry that I butchered patch submission and this mail ended up with two patches together; should I resend?
No, it's ok. I applied the macb pdata rename. If you wish to have the other one applied, please resend this one.
It looks like what was applied to your tree was a squash of these two changes together, so no need to resend.
Ups, this was not intentional. I removed the hunk which should really be a separate patch, so you indeed have to resend ;)
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH RESEND 1/1 parameter: fix build warning when !CONFIG_PARAMETER
Commit 51f2ded17c35c146488f6f3b697764bb2953a156 ("param: make return value of param getter function const") made the parameter getter const, but neglected to change the dev_add_param() function prototype in the !CONFIG_PARAMETER case.
Fixes the following warning with CONFIG_NAND and !CONFIG_PARAMETER:
drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device':drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default] include/param.h:59:19: note: expected 'char * (*)(struct device_d *, struct param_d *)' but argument is of type 'const char * (*)(struct device_d *, struct param_d *)'
---
Sorry again for then noise!
include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/param.h +1 -1
@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,static inline int dev_add_param (struct device_d *dev,char *name,int (*set)(struct device_d *dev,struct param_d *p,const char *val), -char *(*get)(struct device_d *,struct param_d *p), +const char *(*get)(struct device_d *,struct param_d *p),unsigned long flags) {return 0 ;
Signature · 7 lines
1.8.1.5 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedRe: [PATCH RESEND] parameter: fix build warning when !CONFIG_PARAMETER
Quoted 5 lines · Josh Cartwright
Commit
51f2ded17c35c146488f6f3b697764bb2953a156("param: make return value of param getter function const") made the parameter getter const, but neglected to change thedev_add_param()function prototype in the !CONFIG_PARAMETER case.
Quoted 7 lines
Fixes the following warning with
CONFIG_NANDand !CONFIG_PARAMETER:
drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device':drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default]include/param.h:59:19: note: expected 'char * (*)(structdevice_d*, structparam_d*)' but argument is of type 'const char * (*)(structdevice_d*, structparam_d*)'Signed-off-by Josh Cartwright <[email protected]>
Applied, thanks
Sascha
Quoted 23 lines
---
Sorry again for then noise!include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/param.h +1
-1@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,static inline int dev_add_param (struct device_d *dev,char *name,int (*set)(struct device_d *dev,struct param_d *p,const char *val), -char *(*get)(struct device_d *,struct param_d *p), +const char *(*get)(struct device_d *,struct param_d *p),unsigned long flags) {return 0 ;Signature · 1 line
1.8.1.5
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox