mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: hexingwei001@208suo.com
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: page_io: Prefer 'unsigned int' to bare use of 'unsigned'
Date: Wed, 14 Jun 2023 15:23:44 +0800	[thread overview]
Message-ID: <1e132a6416d673e285af610ff185fa5f@208suo.com> (raw)
In-Reply-To: <20230614071804.13110-1-panzhiai@cdjrlc.com>

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();

       reply	other threads:[~2023-06-14  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230614071804.13110-1-panzhiai@cdjrlc.com>
2023-06-14  7:23 ` hexingwei001 [this message]
2023-06-14  8:41   ` David Hildenbrand
2023-06-14 18:09   ` Andrew Morton
2023-06-14 18:12     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e132a6416d673e285af610ff185fa5f@208suo.com \
    --to=hexingwei001@208suo.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®