lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9bdef764d257da49dbfdc44992903b86@208suo.com>
Date:   Sun, 09 Jul 2023 21:49:14 +0800
From:   xuanzhenggang001@...suo.com
To:     linux@...linux.org.uk, wangkefeng.wang@...wei.com,
        rmk+kernel@...linux.org.uk
Cc:     linus.walleij@...aro.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: mm: prefer 'unsigned int' to bare use of 'unsigned'

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@...rlc.com>
---
  arch/arm/mm/dump.c | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)

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++) {
          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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ