From patchwork Sun Jul 9 13:49:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: xuanzhenggang001@208suo.com X-Patchwork-Id: 13305828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D974EB64DC for ; Sun, 9 Jul 2023 13:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ovLb1QQuIAVRzthqPpkm8IyWGFnI6VSX0dHOTCyvDGA=; b=tTjXOXgw7GpCgRSAf1pPho4MeM txjksjrBP42gbFPw0wUzqlifWAXzGF4gTX/1KSeqJbraK/iigj0jvmfwwd2aC22+zBcbT8BsPLwLG q6s/c8NQ29wAYnqQspTIRA2t/8+BGAs+aU7pKI3sbZwQvj1sQoCVNp86yBbCZsrszLFka6cK2eC/8 FcWthLwefZyRt40r9pFY6Qsq5sC/09fLYy6c3UHSqRJjCUM1KLrRExA4lI7/xwlv+Aqt6p0XTMU1y +CtTB0GRcEcHkw/nV9IDg+Gh2ZD1sF308Ez/IhMG/TIVVZEsF4FkmMwrPnlmIYdhSrSyQjccfkAEM GZI+lUaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qIUn1-009BeE-2Y; Sun, 09 Jul 2023 13:49:27 +0000 Received: from [183.242.55.162] (helo=mail.208.org) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qIUmw-009BdV-0G for linux-arm-kernel@lists.infradead.org; Sun, 09 Jul 2023 13:49:26 +0000 Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4QzT5756lhzBRpqd for ; Sun, 9 Jul 2023 21:49:15 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1688910555; x=1691502556; bh=ZOH8K2/UuQKKcatgEp6FYAcgKm9 SgqIrMLy+hBWjlaY=; b=mvivnT+EXiX7IMr5hHUqHXIw0ouKDKAYUBGsXa07kfH 62SO6GPbrk8O+opn5Nk2ySN00Y+MxddklDZOX1ZEl3nYE6h55Oh6T1an+FBFrb/j HyvJEn9GocB4pW5zQBjy+LSkG6vCbzjm3BeDX3tO6dWGoMVvk74mkjLm2Uh+F8P0 HQiFvZjZMrouJi2qzQkktIzCvC74XZAAFkgL1dWVfLbWFW0sttZrAmt2xjRvd1mJ 9nXCCkFIEOhZebN/FZ4M7KRrDi611bFcqpvxvfIrfiupwK+eIk3a4I+0chNV3wpF TxoR6SU11BHmfFXVLK4BBCnny4tDFkirz9bz0hcu4QQ== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZzJujyG7orDa for ; Sun, 9 Jul 2023 21:49:15 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4QzT566hdMzBRL6L; Sun, 9 Jul 2023 21:49:14 +0800 (CST) MIME-Version: 1.0 Date: Sun, 09 Jul 2023 21:49:14 +0800 From: xuanzhenggang001@208suo.com To: linux@armlinux.org.uk, wangkefeng.wang@huawei.com, rmk+kernel@armlinux.org.uk Cc: linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: mm: prefer 'unsigned int' to bare use of 'unsigned' In-Reply-To: <20230709133846.39984-1-denghuilong@cdjrlc.com> References: <20230709133846.39984-1-denghuilong@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <9bdef764d257da49dbfdc44992903b86@208suo.com> X-Sender: xuanzhenggang001@208suo.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230709_064923_410374_AB6A0611 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 --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++) {