Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-04-11 Thread Petr Mladek
On Mon 2018-02-19 17:24:22, Andy Shevchenko wrote:
> On Sun, 2018-02-18 at 13:58 +0100, Luc Van Oostenryck wrote:
> > On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
> > > Sparse complains that constant is so bit for unsigned long on 64-bit
> > > architecture.
> > > 
> > > lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so
> > > big it is unsigned long
> > > lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so
> > > big it is unsigned long
> > > 
> > > To satisfy everyone, mark the constant with ULL.
> > 
> > It should be 'UL' not 'ULL' since for architectures a pointer and
> > a unsigned long have the ame size while on 32bit archs, long long
> > are (or may?) 64bit.
> 
> Yes, UL works as well.

I have updated the patch and pushed it into printk.git,
branch for-4.18-vsprintf-cleanup.

Reviewed-by: Petr Mladek 

Best Regards,
Petr


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-04-11 Thread Petr Mladek
On Mon 2018-02-19 17:24:22, Andy Shevchenko wrote:
> On Sun, 2018-02-18 at 13:58 +0100, Luc Van Oostenryck wrote:
> > On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
> > > Sparse complains that constant is so bit for unsigned long on 64-bit
> > > architecture.
> > > 
> > > lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so
> > > big it is unsigned long
> > > lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so
> > > big it is unsigned long
> > > 
> > > To satisfy everyone, mark the constant with ULL.
> > 
> > It should be 'UL' not 'ULL' since for architectures a pointer and
> > a unsigned long have the ame size while on 32bit archs, long long
> > are (or may?) 64bit.
> 
> Yes, UL works as well.

I have updated the patch and pushed it into printk.git,
branch for-4.18-vsprintf-cleanup.

Reviewed-by: Petr Mladek 

Best Regards,
Petr


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-19 Thread Andy Shevchenko
On Sun, 2018-02-18 at 13:58 +0100, Luc Van Oostenryck wrote:
> On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
> > Sparse complains that constant is so bit for unsigned long on 64-bit
> > architecture.
> > 
> > lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so
> > big it is unsigned long
> > lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so
> > big it is unsigned long
> > 
> > To satisfy everyone, mark the constant with ULL.
> 
> It should be 'UL' not 'ULL' since for architectures a pointer and
> a unsigned long have the ame size while on 32bit archs, long long
> are (or may?) 64bit.

Yes, UL works as well.

Andrew, tell me if I need to send an update (followup) or a new version.

Btw, I ran test_printf suite on both 32- and 64-bit code, everything
passed. So, if anyone notices a regression, please, create a test case
that we may run.

-- 
Andy Shevchenko 
Intel Finland Oy


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-19 Thread Andy Shevchenko
On Sun, 2018-02-18 at 13:58 +0100, Luc Van Oostenryck wrote:
> On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
> > Sparse complains that constant is so bit for unsigned long on 64-bit
> > architecture.
> > 
> > lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so
> > big it is unsigned long
> > lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so
> > big it is unsigned long
> > 
> > To satisfy everyone, mark the constant with ULL.
> 
> It should be 'UL' not 'ULL' since for architectures a pointer and
> a unsigned long have the ame size while on 32bit archs, long long
> are (or may?) 64bit.

Yes, UL works as well.

Andrew, tell me if I need to send an update (followup) or a new version.

Btw, I ran test_printf suite on both 32- and 64-bit code, everything
passed. So, if anyone notices a regression, please, create a test case
that we may run.

-- 
Andy Shevchenko 
Intel Finland Oy


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Andy Shevchenko
On Sun, Feb 18, 2018 at 11:52 PM, Tobin C. Harding  wrote:
> On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:

> What tree does this set apply to please?  I tried mainline rc1 and
> next-20180216.  Happy to see some code duplication removal from
> vsprintf.c :)

IIRC latest next, i.e. 20180217.


-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Andy Shevchenko
On Sun, Feb 18, 2018 at 11:52 PM, Tobin C. Harding  wrote:
> On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:

> What tree does this set apply to please?  I tried mainline rc1 and
> next-20180216.  Happy to see some code duplication removal from
> vsprintf.c :)

IIRC latest next, i.e. 20180217.


-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Tobin C. Harding
On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
...

Hi Andy,

What tree does this set apply to please?  I tried mainline rc1 and
next-20180216.  Happy to see some code duplication removal from
vsprintf.c :)

thanks,
Tobin.


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Tobin C. Harding
On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
...

Hi Andy,

What tree does this set apply to please?  I tried mainline rc1 and
next-20180216.  Happy to see some code duplication removal from
vsprintf.c :)

thanks,
Tobin.


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Andy Shevchenko
On Sun, Feb 18, 2018 at 2:58 PM, Luc Van Oostenryck
 wrote:
> On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
>> Sparse complains that constant is so bit for unsigned long on 64-bit
>> architecture.
>>
>> lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so big it 
>> is unsigned long
>> lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so big it 
>> is unsigned long
>>
>> To satisfy everyone, mark the constant with ULL.
>
> It should be 'UL' not 'ULL' since for architectures a pointer and
> a unsigned long have the ame size while on 32bit archs, long long
> are (or may?) 64bit.

Perhaps, I'll try next week. Though ULL works fine as well.

-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Andy Shevchenko
On Sun, Feb 18, 2018 at 2:58 PM, Luc Van Oostenryck
 wrote:
> On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
>> Sparse complains that constant is so bit for unsigned long on 64-bit
>> architecture.
>>
>> lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so big it 
>> is unsigned long
>> lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so big it 
>> is unsigned long
>>
>> To satisfy everyone, mark the constant with ULL.
>
> It should be 'UL' not 'ULL' since for architectures a pointer and
> a unsigned long have the ame size while on 32bit archs, long long
> are (or may?) 64bit.

Perhaps, I'll try next week. Though ULL works fine as well.

-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Luc Van Oostenryck
On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
> Sparse complains that constant is so bit for unsigned long on 64-bit
> architecture.
> 
> lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so big it 
> is unsigned long
> lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so big it 
> is unsigned long
> 
> To satisfy everyone, mark the constant with ULL.

It should be 'UL' not 'ULL' since for architectures a pointer and
a unsigned long have the ame size while on 32bit archs, long long
are (or may?) 64bit.

-- Luc Van Oostenryck


Re: [PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-18 Thread Luc Van Oostenryck
On Fri, Feb 16, 2018 at 11:07:03PM +0200, Andy Shevchenko wrote:
> Sparse complains that constant is so bit for unsigned long on 64-bit
> architecture.
> 
> lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so big it 
> is unsigned long
> lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so big it 
> is unsigned long
> 
> To satisfy everyone, mark the constant with ULL.

It should be 'UL' not 'ULL' since for architectures a pointer and
a unsigned long have the ame size while on 32bit archs, long long
are (or may?) 64bit.

-- Luc Van Oostenryck


[PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-16 Thread Andy Shevchenko
Sparse complains that constant is so bit for unsigned long on 64-bit
architecture.

lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so big it is 
unsigned long
lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so big it is 
unsigned long

To satisfy everyone, mark the constant with ULL.

Signed-off-by: Andy Shevchenko 
---
 lib/test_printf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_printf.c b/lib/test_printf.c
index 71ebfa43ad05..309cf8d7e6d4 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -204,7 +204,7 @@ test_string(void)
 #if BITS_PER_LONG == 64
 
 #define PTR_WIDTH 16
-#define PTR ((void *)0x0123456789ab)
+#define PTR ((void *)0x0123456789abULL)
 #define PTR_STR "0123456789ab"
 #define ZEROS ""   /* hex 32 zero bits */
 
-- 
2.15.1



[PATCH v2 1/9] lib/test_printf: Mark big constant with ULL

2018-02-16 Thread Andy Shevchenko
Sparse complains that constant is so bit for unsigned long on 64-bit
architecture.

lib/test_printf.c:217:54: warning: constant 0x0123456789ab is so big it is 
unsigned long
lib/test_printf.c:246:54: warning: constant 0x0123456789ab is so big it is 
unsigned long

To satisfy everyone, mark the constant with ULL.

Signed-off-by: Andy Shevchenko 
---
 lib/test_printf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_printf.c b/lib/test_printf.c
index 71ebfa43ad05..309cf8d7e6d4 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -204,7 +204,7 @@ test_string(void)
 #if BITS_PER_LONG == 64
 
 #define PTR_WIDTH 16
-#define PTR ((void *)0x0123456789ab)
+#define PTR ((void *)0x0123456789abULL)
 #define PTR_STR "0123456789ab"
 #define ZEROS ""   /* hex 32 zero bits */
 
-- 
2.15.1