mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
@ 2012-03-19 19:57 Remy Bohmer
  2012-03-20  8:43 ` Michael Olbrich
  2012-03-20  8:57 ` Michael Olbrich
  0 siblings, 2 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 19:57 UTC (permalink / raw)
  To: ptxdist

This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not defined:
$ ptxdist get
expr: syntax error
make: Nothing to be done for `get'.

Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc
Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 rules/flashbench.make |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..b312979 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,8 +31,14 @@ FLASHBENCH_LICENSE	:= GPL v2
 
 FLASHBENCH_CONF_TOOL	:= NO
 FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
+
+ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE
+FLASHBENCH_MAX_BUFSIZE	:= $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)
+else
+FLASHBENCH_MAX_BUFSIZE	:= 1
+endif
 FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
-	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
+	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(FLASHBENCH_MAX_BUFSIZE))
 
 # ----------------------------------------------------------------------------
 # Install
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-19 19:57 [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
@ 2012-03-20  8:43 ` Michael Olbrich
  2012-03-20  8:47   ` Bernhard Walle
  2012-03-20  8:57 ` Michael Olbrich
  1 sibling, 1 reply; 17+ messages in thread
From: Michael Olbrich @ 2012-03-20  8:43 UTC (permalink / raw)
  To: ptxdist

On Mon, Mar 19, 2012 at 08:57:50PM +0100, Remy Bohmer wrote:
> This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not defined:
> $ ptxdist get
> expr: syntax error
> make: Nothing to be done for `get'.
> 
> Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
>  rules/flashbench.make |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..b312979 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,8 +31,14 @@ FLASHBENCH_LICENSE	:= GPL v2
>  
>  FLASHBENCH_CONF_TOOL	:= NO
>  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
> +
> +ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE
> +FLASHBENCH_MAX_BUFSIZE	:= $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)
> +else
> +FLASHBENCH_MAX_BUFSIZE	:= 1
> +endif

I think we should report an error here:

ifndef PTXCONF_FLASHBENCH_MAX_BUFSIZE
$(error some error message here)
endif

Michael

>  FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
> -	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
> +	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(FLASHBENCH_MAX_BUFSIZE))
>  
>  # ----------------------------------------------------------------------------
>  # Install
> -- 
> 1.7.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20  8:43 ` Michael Olbrich
@ 2012-03-20  8:47   ` Bernhard Walle
  2012-03-20  9:09     ` Juergen Beisert
  0 siblings, 1 reply; 17+ messages in thread
From: Bernhard Walle @ 2012-03-20  8:47 UTC (permalink / raw)
  To: ptxdist

Am 20.03.2012 09:43, schrieb Michael Olbrich:
> On Mon, Mar 19, 2012 at 08:57:50PM +0100, Remy Bohmer wrote:
>> This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not 
>> defined:
>> $ ptxdist get
>> expr: syntax error
>> make: Nothing to be done for `get'.
>>
>> Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc
>> Signed-off-by: Remy Bohmer <linux@bohmer.net>
>> ---
>>  rules/flashbench.make |    8 +++++++-
>>  1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/rules/flashbench.make b/rules/flashbench.make
>> index fcb669e..b312979 100644
>> --- a/rules/flashbench.make
>> +++ b/rules/flashbench.make
>> @@ -31,8 +31,14 @@ FLASHBENCH_LICENSE	:= GPL v2
>>
>>  FLASHBENCH_CONF_TOOL	:= NO
>>  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
>> +
>> +ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE
>> +FLASHBENCH_MAX_BUFSIZE	:= $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)
>> +else
>> +FLASHBENCH_MAX_BUFSIZE	:= 1
>> +endif
>
> I think we should report an error here:
>
> ifndef PTXCONF_FLASHBENCH_MAX_BUFSIZE
> $(error some error message here)
> endif

I think the problem is here that flashbench is not selected, so the 
PTXCONF_FLASHBENCH_MAX_BUFSIZE
option is unset.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-19 19:57 [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
  2012-03-20  8:43 ` Michael Olbrich
@ 2012-03-20  8:57 ` Michael Olbrich
  1 sibling, 0 replies; 17+ messages in thread
From: Michael Olbrich @ 2012-03-20  8:57 UTC (permalink / raw)
  To: ptxdist

On Mon, Mar 19, 2012 at 08:57:50PM +0100, Remy Bohmer wrote:
> This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not defined:
> $ ptxdist get
> expr: syntax error
> make: Nothing to be done for `get'.
> 
> Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
>  rules/flashbench.make |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..b312979 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,8 +31,14 @@ FLASHBENCH_LICENSE	:= GPL v2
>  
>  FLASHBENCH_CONF_TOOL	:= NO
>  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
> +
> +ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE
> +FLASHBENCH_MAX_BUFSIZE	:= $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)
> +else
> +FLASHBENCH_MAX_BUFSIZE	:= 1
> +endif

ifdef PTXCONF_FLASHBENCH

>  FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
> -	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
> +	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(FLASHBENCH_MAX_BUFSIZE))

endif

I think. Also

config FLASHBENCH_MAX_BUFSIZE
	int
	prompt "Maximum flashbench buffer size in megabytes"
	default 64

[...]

That way it will always be a number.

Michael

>  
>  # ----------------------------------------------------------------------------
>  # Install
> -- 
> 1.7.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20  8:47   ` Bernhard Walle
@ 2012-03-20  9:09     ` Juergen Beisert
  2012-03-20 19:02       ` Bernhard Walle
  2012-03-20 19:43       ` [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
  0 siblings, 2 replies; 17+ messages in thread
From: Juergen Beisert @ 2012-03-20  9:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Bernhard Walle

Bernhard Walle wrote:
> Am 20.03.2012 09:43, schrieb Michael Olbrich:
> > On Mon, Mar 19, 2012 at 08:57:50PM +0100, Remy Bohmer wrote:
> >> This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not
> >> defined:
> >> $ ptxdist get
> >> expr: syntax error
> >> make: Nothing to be done for `get'.
> >>
> >> Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc
> >> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> >> ---
> >>  rules/flashbench.make |    8 +++++++-
> >>  1 files changed, 7 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/rules/flashbench.make b/rules/flashbench.make
> >> index fcb669e..b312979 100644
> >> --- a/rules/flashbench.make
> >> +++ b/rules/flashbench.make
> >> @@ -31,8 +31,14 @@ FLASHBENCH_LICENSE	:= GPL v2
> >>
> >>  FLASHBENCH_CONF_TOOL	:= NO
> >>  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
> >> +
> >> +ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE
> >> +FLASHBENCH_MAX_BUFSIZE	:= $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)
> >> +else
> >> +FLASHBENCH_MAX_BUFSIZE	:= 1
> >> +endif
> >
> > I think we should report an error here:
> >
> > ifndef PTXCONF_FLASHBENCH_MAX_BUFSIZE
> > $(error some error message here)
> > endif
>
> I think the problem is here that flashbench is not selected, so the
> PTXCONF_FLASHBENCH_MAX_BUFSIZE
> option is unset.

Just delay the evaluation of the expression to the point of time when it is
really required.

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..0ef52d1 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2

 FLASHBENCH_CONF_TOOL   := NO
 FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
-FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
+FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
        EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20  9:09     ` Juergen Beisert
@ 2012-03-20 19:02       ` Bernhard Walle
  2012-03-20 19:28         ` Juergen Beisert
  2012-03-20 19:43       ` [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
  1 sibling, 1 reply; 17+ messages in thread
From: Bernhard Walle @ 2012-03-20 19:02 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: ptxdist

Hi Juergen,

* Juergen Beisert <jbe@pengutronix.de> [2012-03-20 10:09]:
> 
> Just delay the evaluation of the expression to the point of time when it is
> really required.
> 
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..0ef52d1 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
> 
>  FLASHBENCH_CONF_TOOL   := NO
>  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
>         EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
> 

Did you try it out? It doesn't work here.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20 19:02       ` Bernhard Walle
@ 2012-03-20 19:28         ` Juergen Beisert
  2012-03-20 19:35           ` Bernhard Walle
  2012-03-20 19:36           ` [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Bernhard Walle
  0 siblings, 2 replies; 17+ messages in thread
From: Juergen Beisert @ 2012-03-20 19:28 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: ptxdist

Hi Bernhard,

Bernhard Walle wrote:
> * Juergen Beisert <jbe@pengutronix.de> [2012-03-20 10:09]:
> > Just delay the evaluation of the expression to the point of time when it
> > is really required.
> >
> > diff --git a/rules/flashbench.make b/rules/flashbench.make
> > index fcb669e..0ef52d1 100644
> > --- a/rules/flashbench.make
> > +++ b/rules/flashbench.make
> > @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
> >
> >  FLASHBENCH_CONF_TOOL   := NO
> >  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> > -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> > +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
> >         EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
>
> Did you try it out? It doesn't work here.

Yes I did.

[jb@isonoe]> ptxdist --version
2012.03.0-00045-gbea40f0

[jb@isonoe]> ptxdist go
expr: syntax error
make: Nothing to be done for `world'.

Now with the change above:

[jb@isonoe]> ptxdist go
make: Nothing to be done for `world'.

all tests with a disabled 'flashbench' in the menu.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20 19:28         ` Juergen Beisert
@ 2012-03-20 19:35           ` Bernhard Walle
  2012-03-20 19:44             ` Remy Bohmer
  2012-03-20 19:36           ` [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Bernhard Walle
  1 sibling, 1 reply; 17+ messages in thread
From: Bernhard Walle @ 2012-03-20 19:35 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: ptxdist

Hi Juergen,

* Juergen Beisert <jbe@pengutronix.de> [2012-03-20 20:28]:
> Bernhard Walle wrote:
> > * Juergen Beisert <jbe@pengutronix.de> [2012-03-20 10:09]:
> > > Just delay the evaluation of the expression to the point of time when it
> > > is really required.
> > >
> > > diff --git a/rules/flashbench.make b/rules/flashbench.make
> > > index fcb669e..0ef52d1 100644
> > > --- a/rules/flashbench.make
> > > +++ b/rules/flashbench.make
> > > @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
> > >
> > >  FLASHBENCH_CONF_TOOL   := NO
> > >  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> > > -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> > > +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
> > >         EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
> >
> > Did you try it out? It doesn't work here.
> 
> Yes I did.

Sorry, I had the old (unpatched) flashbench.make in the rules directory
of the project...

Will send a patch that uses '=' instead of ':=' which is ready to be
applied.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-20 19:28         ` Juergen Beisert
  2012-03-20 19:35           ` Bernhard Walle
@ 2012-03-20 19:36           ` Bernhard Walle
  2012-03-20 19:46             ` Remy Bohmer
  2012-03-21 23:18             ` Michael Olbrich
  1 sibling, 2 replies; 17+ messages in thread
From: Bernhard Walle @ 2012-03-20 19:36 UTC (permalink / raw)
  To: ptxdist

When flashbench is not selected in "ptxdist menuconfig", then
$(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
call fails.

Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
it's really needed, i.e. when flashbench has been selected.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/flashbench.make |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..0ef52d1 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,7 +31,7 @@ FLASHBENCH_LICENSE	:= GPL v2
 
 FLASHBENCH_CONF_TOOL	:= NO
 FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
-FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
+FLASHBENCH_MAKE_OPT	= CC=$(CROSS_CC) \
 	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
 
 # ----------------------------------------------------------------------------
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20  9:09     ` Juergen Beisert
  2012-03-20 19:02       ` Bernhard Walle
@ 2012-03-20 19:43       ` Remy Bohmer
  1 sibling, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-20 19:43 UTC (permalink / raw)
  To: ptxdist; +Cc: Bernhard Walle

Hi,

2012/3/20 Juergen Beisert <jbe@pengutronix.de>:
> Just delay the evaluation of the expression to the point of time when it is
> really required.
>
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..0ef52d1 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
>
>  FLASHBENCH_CONF_TOOL   := NO
>  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
>        EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))

This works fine here as well.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined
  2012-03-20 19:35           ` Bernhard Walle
@ 2012-03-20 19:44             ` Remy Bohmer
  0 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-20 19:44 UTC (permalink / raw)
  To: ptxdist

Hi,

2012/3/20 Bernhard Walle <bernhard@bwalle.de>:
> Sorry, I had the old (unpatched) flashbench.make in the rules directory
> of the project...
>
> Will send a patch that uses '=' instead of ':=' which is ready to be
> applied.

In that case I will drop my patch. Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-20 19:36           ` [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Bernhard Walle
@ 2012-03-20 19:46             ` Remy Bohmer
  2012-03-21 23:18             ` Michael Olbrich
  1 sibling, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-20 19:46 UTC (permalink / raw)
  To: ptxdist

Hi,

2012/3/20 Bernhard Walle <bernhard@bwalle.de>:
> When flashbench is not selected in "ptxdist menuconfig", then
> $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
> call fails.
>
> Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
> it's really needed, i.e. when flashbench has been selected.
>
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
>  rules/flashbench.make |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..0ef52d1 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
>
>  FLASHBENCH_CONF_TOOL   := NO
>  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
>        EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))

Acked-by: Remy Bohmer <linux@bohmer.net>

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-20 19:36           ` [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Bernhard Walle
  2012-03-20 19:46             ` Remy Bohmer
@ 2012-03-21 23:18             ` Michael Olbrich
  2012-03-22  7:26               ` Juergen Beisert
  2012-03-22  8:17               ` Bernhard Walle
  1 sibling, 2 replies; 17+ messages in thread
From: Michael Olbrich @ 2012-03-21 23:18 UTC (permalink / raw)
  To: ptxdist

On Tue, Mar 20, 2012 at 08:36:47PM +0100, Bernhard Walle wrote:
> When flashbench is not selected in "ptxdist menuconfig", then
> $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
> call fails.
> 
> Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
> it's really needed, i.e. when flashbench has been selected.
> 
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
>  rules/flashbench.make |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..0ef52d1 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE	:= GPL v2
>  
>  FLASHBENCH_CONF_TOOL	:= NO
>  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
> -FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \

Please add a comment here. Otherwise it it not clear why this is needed.

Michael

> +FLASHBENCH_MAKE_OPT	= CC=$(CROSS_CC) \
>  	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
>  
>  # ----------------------------------------------------------------------------
> -- 
> 1.7.9.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-21 23:18             ` Michael Olbrich
@ 2012-03-22  7:26               ` Juergen Beisert
  2012-03-22  7:40                 ` Wolfram Sang
  2012-03-22  8:17               ` Bernhard Walle
  1 sibling, 1 reply; 17+ messages in thread
From: Juergen Beisert @ 2012-03-22  7:26 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

Michael Olbrich wrote:
> On Tue, Mar 20, 2012 at 08:36:47PM +0100, Bernhard Walle wrote:
> > When flashbench is not selected in "ptxdist menuconfig", then
> > $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
> > call fails.
> >
> > Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
> > it's really needed, i.e. when flashbench has been selected.
> >
> > Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> > ---
> >  rules/flashbench.make |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/rules/flashbench.make b/rules/flashbench.make
> > index fcb669e..0ef52d1 100644
> > --- a/rules/flashbench.make
> > +++ b/rules/flashbench.make
> > @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE	:= GPL v2
> >
> >  FLASHBENCH_CONF_TOOL	:= NO
> >  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
> > -FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
>
> Please add a comment here. Otherwise it it not clear why this is needed.

Then we should discuss about comments in the changed files or in the change 
itself.
In the Linux kernel for example I see more and more complex comments in the 
change itself and nothing in the changed file. What is better? What is read 
more often? The change itself or the changed file?

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-22  7:26               ` Juergen Beisert
@ 2012-03-22  7:40                 ` Wolfram Sang
  0 siblings, 0 replies; 17+ messages in thread
From: Wolfram Sang @ 2012-03-22  7:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich


[-- Attachment #1.1: Type: text/plain, Size: 727 bytes --]


> > >  FLASHBENCH_CONF_TOOL	:= NO
> > >  FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
> > > -FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
> >
> > Please add a comment here. Otherwise it it not clear why this is needed.
> 
> Then we should discuss about comments in the changed files or in the change 
> itself.

In a comment, you describe why it is _done_ that way. In a commit message, you
describe why it needs to be _changed_ that way. Those two can be quite similar,
but often are not.

When in doubt, redundancy is your friend here :)

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-21 23:18             ` Michael Olbrich
  2012-03-22  7:26               ` Juergen Beisert
@ 2012-03-22  8:17               ` Bernhard Walle
  2012-03-22  8:19                 ` Bernhard Walle
  1 sibling, 1 reply; 17+ messages in thread
From: Bernhard Walle @ 2012-03-22  8:17 UTC (permalink / raw)
  To: ptxdist; +Cc: Bernhard Walle

When flashbench is not selected in "ptxdist menuconfig", then
$(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
call fails.

Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
it's really needed, i.e. when flashbench has been selected.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Signed-off-by: Bernhard Walle <walle@corscience.de>
---
 rules/flashbench.make |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..39bdfb6 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,7 +31,10 @@ FLASHBENCH_LICENSE	:= GPL v2
 
 FLASHBENCH_CONF_TOOL	:= NO
 FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
-FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
+
+# Use '=' instaed of ':=' because $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is not defined
+# when flashbench is not selected to be built.
+FLASHBENCH_MAKE_OPT	= CC=$(CROSS_CC) \
 	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
 
 # ----------------------------------------------------------------------------
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected
  2012-03-22  8:17               ` Bernhard Walle
@ 2012-03-22  8:19                 ` Bernhard Walle
  0 siblings, 0 replies; 17+ messages in thread
From: Bernhard Walle @ 2012-03-22  8:19 UTC (permalink / raw)
  To: ptxdist

When flashbench is not selected in "ptxdist menuconfig", then
$(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
call fails.

Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
it's really needed, i.e. when flashbench has been selected.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
Don't sign off my own patch twice with multiple email addresses.

 rules/flashbench.make |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..39bdfb6 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,7 +31,10 @@ FLASHBENCH_LICENSE	:= GPL v2
 
 FLASHBENCH_CONF_TOOL	:= NO
 FLASHBENCH_MAKE_ENV	:= $(CROSS_ENV)
-FLASHBENCH_MAKE_OPT	:= CC=$(CROSS_CC) \
+
+# Use '=' instaed of ':=' because $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is not defined
+# when flashbench is not selected to be built.
+FLASHBENCH_MAKE_OPT	= CC=$(CROSS_CC) \
 	EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
 
 # ----------------------------------------------------------------------------
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2012-03-22  8:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 19:57 [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
2012-03-20  8:43 ` Michael Olbrich
2012-03-20  8:47   ` Bernhard Walle
2012-03-20  9:09     ` Juergen Beisert
2012-03-20 19:02       ` Bernhard Walle
2012-03-20 19:28         ` Juergen Beisert
2012-03-20 19:35           ` Bernhard Walle
2012-03-20 19:44             ` Remy Bohmer
2012-03-20 19:36           ` [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected Bernhard Walle
2012-03-20 19:46             ` Remy Bohmer
2012-03-21 23:18             ` Michael Olbrich
2012-03-22  7:26               ` Juergen Beisert
2012-03-22  7:40                 ` Wolfram Sang
2012-03-22  8:17               ` Bernhard Walle
2012-03-22  8:19                 ` Bernhard Walle
2012-03-20 19:43       ` [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined Remy Bohmer
2012-03-20  8:57 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox