linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
       [not found] <20230614071804.13110-1-panzhiai@cdjrlc.com>
@ 2023-06-14  7:23 ` hexingwei001
  2023-06-14  8:41   ` David Hildenbrand
  2023-06-14 18:09   ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: hexingwei001 @ 2023-06-14  7:23 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel

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 <hexingwei001@208suo.com>
---
  mm/page_io.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/page_io.c b/mm/page_io.c
index 684cd3c7b59b..138f73386612 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -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();

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
  2023-06-14  7:23 ` [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned' hexingwei001
@ 2023-06-14  8:41   ` David Hildenbrand
  2023-06-14 18:09   ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2023-06-14  8:41 UTC (permalink / raw)
  To: hexingwei001, akpm; +Cc: linux-mm, linux-kernel

On 14.06.23 09:23, hexingwei001@208suo.com 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 <hexingwei001@208suo.com>
> ---
>    mm/page_io.c | 6 +++---
>    1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 684cd3c7b59b..138f73386612 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -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();
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
  2023-06-14  7:23 ` [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned' hexingwei001
  2023-06-14  8:41   ` David Hildenbrand
@ 2023-06-14 18:09   ` Andrew Morton
  2023-06-14 18:12     ` Matthew Wilcox
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2023-06-14 18:09 UTC (permalink / raw)
  To: hexingwei001; +Cc: linux-mm, linux-kernel

On Wed, 14 Jun 2023 15:23:44 +0800 hexingwei001@208suo.com 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
  2023-06-14 18:09   ` Andrew Morton
@ 2023-06-14 18:12     ` Matthew Wilcox
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2023-06-14 18:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: hexingwei001, linux-mm, linux-kernel

On Wed, Jun 14, 2023 at 11:09:23AM -0700, Andrew Morton wrote:
> On Wed, 14 Jun 2023 15:23:44 +0800 hexingwei001@208suo.com 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-14 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230614071804.13110-1-panzhiai@cdjrlc.com>
2023-06-14  7:23 ` [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned' hexingwei001
2023-06-14  8:41   ` David Hildenbrand
2023-06-14 18:09   ` Andrew Morton
2023-06-14 18:12     ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).