RE: [PATCH] fs: fix local var type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> argument.
> > 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.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux