Skip to contentSkip to conversation

macb: rename platform data

PATCH In review Josh Cartwright 2 participants 7 messages Mar 19, 2013 – Apr 2, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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
index ada3bb0..07525b7 100644
@@ -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
index eec71bb..30aaae2 100644
@@ -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
index dc2976a..4e4a69d 100644
@@ -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
index 90fdbec..a731d58 100644
@@ -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
index 0ae7171..f32215d 100644
@@ -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
index df63a91..fe77b3a 100644
@@ -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
index 4e1e069..74cc7ab 100644
@@ -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
index 77ae46f..b33cd12 100644
@@ -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
index 1e6bbab..b7a94cc 100644
@@ -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
index 4afa095..ff405bd 100644
@@ -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
index 69c66d5..c3886bb 100644
@@ -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
index e96204a..56b51c2 100644
@@ -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
index d17e4c2..743b907 100644
@@ -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
index d5f1b3e..9900dd1 100644
@@ -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
index 5ea6c53..43c227b 100644
@@ -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
index 7ae9020..0c89d39 100644
@@ -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
index 82862d7..ee07848 100644
@@ -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
index 1c375ee..cff0d90 100644
@@ -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
index f47a5fe..a93220d 100644
@@ -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
index bde3429..68ed841 100644
@@ -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
index 9f211e3..d12ee57 100644
@@ -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
index 71267e1..3ecc603 100644
@@ -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
index 3e4531e..031168b 100644
@@ -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
index dad7815..25924cf 100644
@@ -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
index 8602437..524859c 100644
@@ -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
new file mode 100644
index 0000000..9d71863
@@ -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
index 21f4f7d..3a585cd 100644
@@ -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
#1 lore raw

On Fri, Mar 15, 2013 at 06:26:00PM -0500, Josh Cartwright wrote:
[..]

Quoted 5 lines
Quoted 1 line

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]

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 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 *)'

---
 include/param.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/param.h +1 -1
index 21f4f7d..3a585cd 100644
@@ -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

#2 lore raw

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 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]

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 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 *)'

---
 include/param.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/param.h +1 -1
index 21f4f7d..3a585cd 100644
@@ -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
#3 lore raw
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 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]

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

#4 lore raw
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 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]

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
#5 lore raw

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
index 21f4f7d..3a585cd 100644
@@ -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
Applied
#6 lore raw

Re: [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 the dev_add_param() function prototype in the !CONFIG_PARAMETER case.

Quoted 7 lines

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 *)'

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
index 21f4f7d..3a585cd 100644
@@ -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