Re: [PATCH] x86/microcode/intel: Use 64-bit arithmetic instead of 32-bit

2018-02-14 Thread Thomas Gleixner
On Tue, 13 Feb 2018, Alan Cox wrote: > > if (c->x86_cache_size >= 0) > > seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); > > > > which is silly, because that really can be done with: > > > > if (c->x86_cache_size) > > > > as there is no point in printing 'cache siz

Re: [PATCH] x86/microcode/intel: Use 64-bit arithmetic instead of 32-bit

2018-02-13 Thread Alan Cox
> if (c->x86_cache_size >= 0) > seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); > > which is silly, because that really can be done with: > > if (c->x86_cache_size) > > as there is no point in printing 'cache size 0KB', which means > x86_cache_size can be mad

Re: [PATCH] x86/microcode/intel: Use 64-bit arithmetic instead of 32-bit

2018-02-13 Thread Gustavo A. R. Silva
Hi Thomas, Quoting Thomas Gleixner : On Tue, 13 Feb 2018, Gustavo A. R. Silva wrote: Add suffix ULL to constant 1024 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type u64 (64

Re: [PATCH] x86/microcode/intel: Use 64-bit arithmetic instead of 32-bit

2018-02-13 Thread Thomas Gleixner
On Tue, 13 Feb 2018, Gustavo A. R. Silva wrote: > Add suffix ULL to constant 1024 in order to give the compiler complete > information about the proper arithmetic to use. Notice that this > constant is used in a context that expects an expression of type > u64 (64 bits, unsigned). > > The express

[PATCH] x86/microcode/intel: Use 64-bit arithmetic instead of 32-bit

2018-02-13 Thread Gustavo A. R. Silva
Add suffix ULL to constant 1024 in order to give the compiler complete information about the proper arithmetic to use. Notice that this constant is used in a context that expects an expression of type u64 (64 bits, unsigned). The expression c->x86_cache_size * 1024 is currently being evaluated usi