cmd: itest: correct calculus for long format
PATCH 1/1 cmd: itest: correct calculus for long format
From: Sebastien Colleur <[email protected]>
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values.
--- cmd/itest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
cmd/itest.c +2 -1
@@ -80,7 +80,8 @@ static long evalexp(char *s, int w) l =simple_strtoul (s,NULL ,16 ); } -return l & ((1UL << (w *8 )) -1 ); +/* avoid overflow on mask calculus */ +return (w >=sizeof (long )) ? l : (l & ((1UL << (w *8 )) -1 )); }static char *evalstr (char *s)
Signature · 1 line
2.11.0
PATCH 1/1 cmd: itest: correct calculus for long format
Quoted 10 lines · Andy Shevchenko
From: Sebastien Colleur <[email protected]>
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values.
Signed-off-by Sebastien Colleur <[email protected]>--- cmd/itest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Seems reasonable to me.
PATCH 1/1 cmd: itest: correct calculus for long format
Quoted 9 lines · Simon Glass
Quoted 5 lines · Andy Shevchenko
From: Sebastien Colleur <[email protected]>
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values.
Reviewed-by Simon Glass <[email protected]>
Thanks!
To whom should I send this to get it applied? Or just wait when maintainers pick this up?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 cmd: itest: correct calculus for long format
Quoted 9 lines · Andy Shevchenko
Quoted 7 lines · Simon Glass
Quoted 5 lines · Andy Shevchenko
From: Sebastien Colleur <[email protected]>
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values.
Quoted 6 lines
Quoted 1 line
Reviewed-by Simon Glass <[email protected]>Thanks!
To whom should I send this to get it applied? Or just wait when maintainers pick this up?
As this patch doesn't fall into a special custodian responsibility, Tom usually keeps track of it and will apply it - most likely after the next release. But it's always a good idea to check from time to time, if such patches have been applied and "ping" again if not.
Thanks,
Stefan
PATCH 1/1 cmd: itest: correct calculus for long format
Quoted 9 lines · Stefan Roese
Quoted 2 lines · Andy Shevchenko
To whom should I send this to get it applied? Or just wait when maintainers pick this up?
As this patch doesn't fall into a special custodian responsibility, Tom usually keeps track of it and will apply it - most likely after the next release. But it's always a good idea to check from time to time, if such patches have been applied and "ping" again if not.
Okay, thanks for clarification.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 cmd: itest: correct calculus for long format
In reply to Stefan RoeseQuoted 13 lines · Stefan Roese
Quoted 12 lines · Andy Shevchenko
Quoted 8 lines · Simon Glass
Quoted 3 lines · Andy Shevchenko
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values.
Reviewed-by Simon Glass <[email protected]>Thanks!
Quoted 7 lines
Quoted 2 lines
To whom should I send this to get it applied? Or just wait when maintainers pick this up?
As this patch doesn't fall into a special custodian responsibility, Tom usually keeps track of it and will apply it - most likely after the next release. But it's always a good idea to check from time to time, if such patches have been applied and "ping" again if not.
Tom, there is no such in -rc3, please apply if no objections.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 cmd: itest: correct calculus for long format
In reply to Andy ShevchenkoQuoted 8 lines · Andy Shevchenko
From: Sebastien Colleur <[email protected]>
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values.
Signed-off-by Sebastien Colleur <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/2f2da1c3/attachment.sig>