All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] setexpr and memory access
@ 2010-02-24 13:14 Frans Meulenbroeks
  2010-02-24 23:03 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Frans Meulenbroeks @ 2010-02-24 13:14 UTC (permalink / raw)
  To: u-boot

I feel sometimes it could be convenient to use setexpr to use a memory
location as argument.
The code for that is pretty trivial but the question (and reason for
mailing this instead of just submitting the patch) is the syntax of
the command.

setexpr uses A op B and one of the possibilities for op is a *. If we
also allow a * to dereference things (like done in itest) we could get
something like
setexpr result *3 * *4
Not sure if that is a desirable syntax.

Your opinion on this extension and syntax is appreciated.

Frans

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

* [U-Boot] setexpr and memory access
  2010-02-24 13:14 [U-Boot] setexpr and memory access Frans Meulenbroeks
@ 2010-02-24 23:03 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2010-02-24 23:03 UTC (permalink / raw)
  To: u-boot

Dear Frans,

In message <ac9c93b11002240514w75d010ao8b3a52ca8ef015af@mail.gmail.com> you wrote:
> 
> setexpr uses A op B and one of the possibilities for op is a *. If we
> also allow a * to dereference things (like done in itest) we could get
> something like
> setexpr result *3 * *4
> Not sure if that is a desirable syntax.

Agreed it looks ugly, but it's the logical consequence of what we are
using so far. Any other solution would probably require changes in
some other areas.

Considering that, your suggestion looks fine to me.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Don't tell me how hard you work.  Tell me how much you get done.
- James J. Ling

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

end of thread, other threads:[~2010-02-24 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-24 13:14 [U-Boot] setexpr and memory access Frans Meulenbroeks
2010-02-24 23:03 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.