diff mbox series

ARM: mm: prefer 'unsigned int' to bare use of 'unsigned'

Message ID 9bdef764d257da49dbfdc44992903b86@208suo.com (mailing list archive)
State New, archived
Headers show
Series ARM: mm: prefer 'unsigned int' to bare use of 'unsigned' | expand

Commit Message

xuanzhenggang001@208suo.com July 9, 2023, 1:49 p.m. UTC
Fix the following warnings reported by checkpatch:

arch/arm/mm/dump.c:52: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:229: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:315: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:346: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:370: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:386: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:402: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'
arch/arm/mm/dump.c:429: WARNING: Prefer 'unsigned int' to bare use of 
'unsigned'

Signed-off-by: Huilong Deng <denghuilong@cdjrlc.com>
---
  arch/arm/mm/dump.c | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)

          const char *s;
@@ -312,7 +312,7 @@ static void walk_pte(struct pg_state *st, pmd_t 
*pmd, unsigned long start,
  {
      pte_t *pte = pte_offset_kernel(pmd, 0);
      unsigned long addr;
-    unsigned i;
+    unsigned int i;

      for (i = 0; i < PTRS_PER_PTE; i++, pte++) {
          addr = start + i * PAGE_SIZE;
@@ -343,7 +343,7 @@ static void walk_pmd(struct pg_state *st, pud_t 
*pud, unsigned long start)
  {
      pmd_t *pmd = pmd_offset(pud, 0);
      unsigned long addr;
-    unsigned i;
+    unsigned int i;
      const char *domain;

      for (i = 0; i < PTRS_PER_PMD; i++, pmd++) {
@@ -367,7 +367,7 @@ static void walk_pud(struct pg_state *st, p4d_t 
*p4d, unsigned long start)
  {
      pud_t *pud = pud_offset(p4d, 0);
      unsigned long addr;
-    unsigned i;
+    unsigned int i;

      for (i = 0; i < PTRS_PER_PUD; i++, pud++) {
          addr = start + i * PUD_SIZE;
@@ -383,7 +383,7 @@ static void walk_p4d(struct pg_state *st, pgd_t 
*pgd, unsigned long start)
  {
      p4d_t *p4d = p4d_offset(pgd, 0);
      unsigned long addr;
-    unsigned i;
+    unsigned int i;

      for (i = 0; i < PTRS_PER_P4D; i++, p4d++) {
          addr = start + i * P4D_SIZE;
@@ -399,7 +399,7 @@ static void walk_pgd(struct pg_state *st, struct 
mm_struct *mm,
              unsigned long start)
  {
      pgd_t *pgd = pgd_offset(mm, 0UL);
-    unsigned i;
+    unsigned int i;
      unsigned long addr;

      for (i = 0; i < PTRS_PER_PGD; i++, pgd++) {
@@ -426,7 +426,7 @@ void ptdump_walk_pgd(struct seq_file *m, struct 
ptdump_info *info)

  static void __init ptdump_initialize(void)
  {
-    unsigned i, j;
+    unsigned int i, j;

      for (i = 0; i < ARRAY_SIZE(pg_level); i++)
          if (pg_level[i].bits)
diff mbox series

Patch

diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c
index a9381095ab36..d73e8d8a08d6 100644
--- a/arch/arm/mm/dump.c
+++ b/arch/arm/mm/dump.c
@@ -49,7 +49,7 @@  struct pg_state {
      struct seq_file *seq;
      const struct addr_marker *marker;
      unsigned long start_address;
-    unsigned level;
+    unsigned int level;
      u64 current_prot;
      bool check_wx;
      unsigned long wx_pages;
@@ -226,7 +226,7 @@  static struct pg_level pg_level[] = {

  static void dump_prot(struct pg_state *st, const struct prot_bits 
*bits, size_t num)
  {
-    unsigned i;
+    unsigned int i;

      for (i = 0; i < num; i++, bits++) {