u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Rpi: Fix compilation error if CONFIG_USB is disabled
       [not found] <20190313110848.13762-1-akaher@vmware.com>
@ 2019-04-01 10:19 ` Ajay Kaher
  2019-04-01 14:36   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Ajay Kaher @ 2019-04-01 10:19 UTC (permalink / raw)
  To: u-boot


Few weeks ago sent patch (as in below mail) to include in U-Boot,
And still waiting for response and even not present in U-Boot mailing list.

As per checkpatch.pl, there is following CHECK. However it doesn't have
side-effects and similar to include/configs/rockchip-common.h: 

CHECK: Macro argument reuse 'func' - possible side-effects?
#43: FILE: include/configs/rpi.h:150:
+	#define BOOT_TARGET_MMC(func) \
+		func(MMC, mmc, 0) \
+		func(MMC, mmc, 1)

Please suggest if anything wrong I have done to submit the patch or anything
wrong in the patch or is it because of above CHECK.

- Ajay


On 13/03/19, 4:42 PM, "akaher" <akaher@vmware.com> wrote:

    This patch is to fix the following compilation error when
    disabling CONFIG_USB for Rpi3:
    
    include/config_distro_bootcmd.h:242:2: error: expected ‘}’
    before ‘BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB’
         BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
    
    After merging rpi.h changes as per this patch, still getting
    compilation error if CONFIG_CMD_USB is enabled, so CONFIG_CMD_USB
    should depends upon CONFIG_USB.
    Signed-off-by: Ajay Kaher <akaher@vmware.com>
    ---
     cmd/Kconfig           |  1 +
     include/configs/rpi.h | 36 +++++++++++++++++++++++++++++++-----
     2 files changed, 32 insertions(+), 5 deletions(-)
    
    diff --git a/cmd/Kconfig b/cmd/Kconfig
    index 4bcc5c4557..96e665a1c9 100644
    --- a/cmd/Kconfig
    +++ b/cmd/Kconfig
    @@ -1059,6 +1059,7 @@ config CMD_UNIVERSE
     config CMD_USB
     	bool "usb"
     	select HAVE_BLOCK_DEVICE
    +	depends on USB
     	help
     	  USB support.
     
    diff --git a/include/configs/rpi.h b/include/configs/rpi.h
    index 9ce41767a9..f76c7d18ef 100644
    --- a/include/configs/rpi.h
    +++ b/include/configs/rpi.h
    @@ -146,12 +146,38 @@
     	"fdt_addr_r=0x02600000\0" \
     	"ramdisk_addr_r=0x02700000\0"
     
    +#if CONFIG_IS_ENABLED(CMD_MMC)
    +	#define BOOT_TARGET_MMC(func) \
    +		func(MMC, mmc, 0) \
    +		func(MMC, mmc, 1)
    +#else
    +	#define BOOT_TARGET_MMC(func)
    +#endif
    +
    +#if CONFIG_IS_ENABLED(CMD_USB)
    +	#define BOOT_TARGET_USB(func) func(USB, usb, 0)
    +#else
    +	#define BOOT_TARGET_USB(func)
    +#endif
    +
    +#if CONFIG_IS_ENABLED(CMD_PXE)
    +	#define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
    +#else
    +	#define BOOT_TARGET_PXE(func)
    +#endif
    +
    +#if CONFIG_IS_ENABLED(CMD_DHCP)
    +	#define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
    +#else
    +	#define BOOT_TARGET_DHCP(func)
    +#endif
    +
     #define BOOT_TARGET_DEVICES(func) \
    -	func(MMC, mmc, 0) \
    -	func(MMC, mmc, 1) \
    -	func(USB, usb, 0) \
    -	func(PXE, pxe, na) \
    -	func(DHCP, dhcp, na)
    +	BOOT_TARGET_MMC(func) \
    +	BOOT_TARGET_USB(func) \
    +	BOOT_TARGET_PXE(func) \
    +	BOOT_TARGET_DHCP(func)
    +
     #include <config_distro_bootcmd.h>
     
     #define CONFIG_EXTRA_ENV_SETTINGS \
    -- 
    2.14.2
    
    

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Rpi: Fix compilation error if CONFIG_USB is disabled
  2019-04-01 10:19 ` [U-Boot] [PATCH] Rpi: Fix compilation error if CONFIG_USB is disabled Ajay Kaher
@ 2019-04-01 14:36   ` Tom Rini
  2019-04-09 17:03     ` Matthias Brugger
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2019-04-01 14:36 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 01, 2019 at 10:19:18AM +0000, Ajay Kaher wrote:

> Few weeks ago sent patch (as in below mail) to include in U-Boot,
> And still waiting for response and even not present in U-Boot mailing list.

Can you please re-send the patch and ensure to Cc the maintainer?
Thanks!

> 
> As per checkpatch.pl, there is following CHECK. However it doesn't have
> side-effects and similar to include/configs/rockchip-common.h: 
> 
> CHECK: Macro argument reuse 'func' - possible side-effects?
> #43: FILE: include/configs/rpi.h:150:
> +	#define BOOT_TARGET_MMC(func) \
> +		func(MMC, mmc, 0) \
> +		func(MMC, mmc, 1)
> 
> Please suggest if anything wrong I have done to submit the patch or anything
> wrong in the patch or is it because of above CHECK.
> 
> - Ajay
> 
> 
> On 13/03/19, 4:42 PM, "akaher" <akaher@vmware.com> wrote:
> 
>     This patch is to fix the following compilation error when
>     disabling CONFIG_USB for Rpi3:
>     
>     include/config_distro_bootcmd.h:242:2: error: expected ‘}’
>     before ‘BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB’
>          BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
>     
>     After merging rpi.h changes as per this patch, still getting
>     compilation error if CONFIG_CMD_USB is enabled, so CONFIG_CMD_USB
>     should depends upon CONFIG_USB.
>     Signed-off-by: Ajay Kaher <akaher@vmware.com>
>     ---
>      cmd/Kconfig           |  1 +
>      include/configs/rpi.h | 36 +++++++++++++++++++++++++++++++-----
>      2 files changed, 32 insertions(+), 5 deletions(-)
>     
>     diff --git a/cmd/Kconfig b/cmd/Kconfig
>     index 4bcc5c4557..96e665a1c9 100644
>     --- a/cmd/Kconfig
>     +++ b/cmd/Kconfig
>     @@ -1059,6 +1059,7 @@ config CMD_UNIVERSE
>      config CMD_USB
>      	bool "usb"
>      	select HAVE_BLOCK_DEVICE
>     +	depends on USB
>      	help
>      	  USB support.
>      
>     diff --git a/include/configs/rpi.h b/include/configs/rpi.h
>     index 9ce41767a9..f76c7d18ef 100644
>     --- a/include/configs/rpi.h
>     +++ b/include/configs/rpi.h
>     @@ -146,12 +146,38 @@
>      	"fdt_addr_r=0x02600000\0" \
>      	"ramdisk_addr_r=0x02700000\0"
>      
>     +#if CONFIG_IS_ENABLED(CMD_MMC)
>     +	#define BOOT_TARGET_MMC(func) \
>     +		func(MMC, mmc, 0) \
>     +		func(MMC, mmc, 1)
>     +#else
>     +	#define BOOT_TARGET_MMC(func)
>     +#endif
>     +
>     +#if CONFIG_IS_ENABLED(CMD_USB)
>     +	#define BOOT_TARGET_USB(func) func(USB, usb, 0)
>     +#else
>     +	#define BOOT_TARGET_USB(func)
>     +#endif
>     +
>     +#if CONFIG_IS_ENABLED(CMD_PXE)
>     +	#define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
>     +#else
>     +	#define BOOT_TARGET_PXE(func)
>     +#endif
>     +
>     +#if CONFIG_IS_ENABLED(CMD_DHCP)
>     +	#define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
>     +#else
>     +	#define BOOT_TARGET_DHCP(func)
>     +#endif
>     +
>      #define BOOT_TARGET_DEVICES(func) \
>     -	func(MMC, mmc, 0) \
>     -	func(MMC, mmc, 1) \
>     -	func(USB, usb, 0) \
>     -	func(PXE, pxe, na) \
>     -	func(DHCP, dhcp, na)
>     +	BOOT_TARGET_MMC(func) \
>     +	BOOT_TARGET_USB(func) \
>     +	BOOT_TARGET_PXE(func) \
>     +	BOOT_TARGET_DHCP(func)
>     +
>      #include <config_distro_bootcmd.h>
>      
>      #define CONFIG_EXTRA_ENV_SETTINGS \
>     -- 
>     2.14.2
>     
>     
> 

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/22a54194/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Rpi: Fix compilation error if CONFIG_USB is disabled
  2019-04-01 14:36   ` Tom Rini
@ 2019-04-09 17:03     ` Matthias Brugger
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2019-04-09 17:03 UTC (permalink / raw)
  To: u-boot



On 01/04/2019 16:36, Tom Rini wrote:
> On Mon, Apr 01, 2019 at 10:19:18AM +0000, Ajay Kaher wrote:
> 
>> Few weeks ago sent patch (as in below mail) to include in U-Boot, And
>> still waiting for response and even not present in U-Boot mailing list.
> 
> Can you please re-send the patch and ensure to Cc the maintainer? Thanks!
> 
>> 
>> As per checkpatch.pl, there is following CHECK. However it doesn't have 
>> side-effects and similar to include/configs/rockchip-common.h:
>> 
>> CHECK: Macro argument reuse 'func' - possible side-effects? #43: FILE:
>> include/configs/rpi.h:150: +	#define BOOT_TARGET_MMC(func) \ +		func(MMC,
>> mmc, 0) \ +		func(MMC, mmc, 1)
>> 
>> Please suggest if anything wrong I have done to submit the patch or
>> anything wrong in the patch or is it because of above CHECK.
>> 
>> - Ajay
>> 
>> 
>> On 13/03/19, 4:42 PM, "akaher" <akaher@vmware.com> wrote:
>> 
>> This patch is to fix the following compilation error when disabling
>> CONFIG_USB for Rpi3:
>> 
>> include/config_distro_bootcmd.h:242:2: error: expected ‘}’ before
>> ‘BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB’ 
>> BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
>> 
>> After merging rpi.h changes as per this patch, still getting compilation
>> error if CONFIG_CMD_USB is enabled, so CONFIG_CMD_USB should depends upon
>> CONFIG_USB.

That indicates to me that this is an independent patch.
You want to be able to enable CMD_USB only when USB is enabled. But that is
independent from RPi.

Regards,
Matthias

>> Signed-off-by: Ajay Kaher <akaher@vmware.com> --- cmd/Kconfig           |
>> 1 + include/configs/rpi.h | 36 +++++++++++++++++++++++++++++++----- 2
>> files changed, 32 insertions(+), 5 deletions(-)
>> 
>> diff --git a/cmd/Kconfig b/cmd/Kconfig index 4bcc5c4557..96e665a1c9
>> 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1059,6 +1059,7 @@ config
>> CMD_UNIVERSE config CMD_USB bool "usb" select HAVE_BLOCK_DEVICE +	depends
>> on USB help USB support.
>> 
>> diff --git a/include/configs/rpi.h b/include/configs/rpi.h index
>> 9ce41767a9..f76c7d18ef 100644 --- a/include/configs/rpi.h +++
>> b/include/configs/rpi.h @@ -146,12 +146,38 @@ "fdt_addr_r=0x02600000\0"
>> \ "ramdisk_addr_r=0x02700000\0"
>> 
>> +#if CONFIG_IS_ENABLED(CMD_MMC) +	#define BOOT_TARGET_MMC(func) \ +
>> func(MMC, mmc, 0) \ +		func(MMC, mmc, 1) +#else +	#define
>> BOOT_TARGET_MMC(func) +#endif + +#if CONFIG_IS_ENABLED(CMD_USB) +	#define
>> BOOT_TARGET_USB(func) func(USB, usb, 0) +#else +	#define
>> BOOT_TARGET_USB(func) +#endif + +#if CONFIG_IS_ENABLED(CMD_PXE) +	#define
>> BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +	#define
>> BOOT_TARGET_PXE(func) +#endif + +#if CONFIG_IS_ENABLED(CMD_DHCP) +
>> #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +#else +	#define
>> BOOT_TARGET_DHCP(func) +#endif + #define BOOT_TARGET_DEVICES(func) \ -
>> func(MMC, mmc, 0) \ -	func(MMC, mmc, 1) \ -	func(USB, usb, 0) \ -
>> func(PXE, pxe, na) \ -	func(DHCP, dhcp, na) +	BOOT_TARGET_MMC(func) \ +
>> BOOT_TARGET_USB(func) \ +	BOOT_TARGET_PXE(func) \ +
>> BOOT_TARGET_DHCP(func) + #include <config_distro_bootcmd.h>
>> 
>> #define CONFIG_EXTRA_ENV_SETTINGS \ -- 2.14.2
>> 
>> 
>> 
> 
> 
> _______________________________________________ U-Boot mailing list 
> U-Boot at lists.denx.de https://lists.denx.de/listinfo/u-boot
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-09 17:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190313110848.13762-1-akaher@vmware.com>
2019-04-01 10:19 ` [U-Boot] [PATCH] Rpi: Fix compilation error if CONFIG_USB is disabled Ajay Kaher
2019-04-01 14:36   ` Tom Rini
2019-04-09 17:03     ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).