mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
Fix the following checkpatch warning:
mm/page_io.c:87: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'. mm/page_io.c:89: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'. mm/page_io.c:109: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.
--- mm/page_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/page_io.c +3 -3
@@ -84,9 +84,9 @@ int generic_swapfile_activate(struct swap_info_struct *sis, {struct address_space *mapping = swap_file->f_mapping;struct inode *inode = mapping->host; -unsigned blocks_per_page; +unsigned int blocks_per_page;unsigned long page_no; -unsigned blkbits; +unsigned int blkbits;sector_t probe_block;sector_t last_block;sector_t lowest_block =-1 ;
@@ -106,7 +106,7 @@ int generic_swapfile_activate(struct swap_info_struct *sis, last_block =i_size_read (inode) >> blkbits;while ((probe_block + blocks_per_page) <= last_block && page_no < sis->max) { -unsigned block_in_page; +unsigned int block_in_page;sector_t first_block;cond_resched ();
Quoted 40 lines · On 14.06.23 09:23, [email protected] wrote:
Fix the following checkpatch warning:
mm/page_io.c:87: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.mm/page_io.c:89: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.mm/page_io.c:109: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.Signed-off-by Xingwei He <[email protected]>--- mm/page_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/page_io.c +2
-2@@ -84,9 +84,9 @@ int generic_swapfile_activate(struct swap_info_struct *sis, {struct address_space *mapping = swap_file->f_mapping;struct inode *inode = mapping->host; -unsigned blocks_per_page; +unsigned int blocks_per_page;unsigned long page_no; -unsigned blkbits; +unsigned int blkbits;sector_t probe_block;sector_t last_block;sector_t lowest_block = -1;mm/page_io.c +1
-1@@ -106,7 +106,7 @@ int generic_swapfile_activate(structswap_info_struct *sis, last_block =i_size_read (inode) >> blkbits;while ((probe_block + blocks_per_page) <= last_block && page_no < sis->max) { -unsigned block_in_page; +unsigned int block_in_page;sector_t first_block;
Quoted 2 lines
cond_resched();
Signature · 3 lines
Cheers, David / dhildenb
Andrew Morton
maintainerQuoted 8 lines · On Wed, 14 Jun 2023 15:23:44 +0800 [email protected] wrote:
Fix the following checkpatch warning:
mm/page_io.c:87: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.mm/page_io.c:89: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.mm/page_io.c:109: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.
I'm counting 55 of these in mm/*.c. If we're going to do this then it wouild be better to do all at once, plus the header files.
I don't believe that is worth the churn.
Quoted 1 line · Andrew Morton
On Wed, 14 Jun 2023 15:23:44 +0800 [email protected] wrote:
All the patches from 208suo.com should be discarded. From conversations I've seen elsewhere, they aren't compile tested, they're whitespace damaged and often they're just wrong.
<x> has anyone seen 208suo.com patches?
<x> so far all I've seen are either utterly wrong or won't even compile
<x> and a bunch of different email addresses/names from that domain, but all the patches coming at around the same time? it's very weird <x> and also all the same kind of patches
<x> "remove unneeded variable" - per coccicheck, which is just not smart enough about the macro constructions
<x> and of course 20 minutes after I ask them to stop, they send another broken patch