RE: [PATCH] fs: fix local var type
From: David Laight
Date: Thu Aug 23 2018 - 07:22:03 EST
From: Michal Hocko
> Sent: 23 August 2018 12:14
> On Thu 23-08-18 01:59:14, Weikang Shi wrote:
> > In the seq_hex_dump function,the remaining variable is int, but it receive a type of size_t
> > So I change the type of remaining
> The changelog should explain _why_ we need this fix. Is any of the code
> path overflowing?
> Besides that I do not think this fix is complete. What about linelen?
> Why do we even need len to be size_t? Why it cannot be int as well. I
> strongly doubt we need more than 32b here.
Although you may well want 'unsigned int' to avoid the sign extension
instruction that gets added for x86_64 when a signed int is added
to a pointer.
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)