From: Ralf Baechle <ralf@linux-mips.org>
To: "Steven J. Hill" <steven.hill@cavium.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH v3 02/11] MIPS: Remove unused variable 'lastpfn'
Date: Tue, 14 Nov 2017 16:40:59 +0100 [thread overview]
Message-ID: <20171114154059.GB16044@linux-mips.org> (raw)
In-Reply-To: <1510633827-23548-3-git-send-email-steven.hill@cavium.com>
On Mon, Nov 13, 2017 at 10:30:18PM -0600, Steven J. Hill wrote:
> Date: Mon, 13 Nov 2017 22:30:18 -0600
> From: "Steven J. Hill" <steven.hill@cavium.com>
> To: linux-mips@linux-mips.org
> Cc: "Steven J. Hill" <Steven.Hill@cavium.com>, ralf@linux-mips.org
> Subject: [PATCH v3 02/11] MIPS: Remove unused variable 'lastpfn'
> Content-Type: text/plain
>
> From: "Steven J. Hill" <Steven.Hill@cavium.com>
>
> 'lastpfn' is never used for anything. Remove it.
>
> Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
> Acked-by: David Daney <david.daney@cavium.com
> ---
> arch/mips/mm/init.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
> index 5f6ea7d..84b7b59 100644
> --- a/arch/mips/mm/init.c
> +++ b/arch/mips/mm/init.c
> @@ -402,7 +402,6 @@ int page_is_ram(unsigned long pagenr)
> void __init paging_init(void)
> {
> unsigned long max_zone_pfns[MAX_NR_ZONES];
> - unsigned long lastpfn __maybe_unused;
>
> pagetable_init();
>
> @@ -416,17 +415,14 @@ void __init paging_init(void)
> max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
> #endif
> max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
> - lastpfn = max_low_pfn;
> #ifdef CONFIG_HIGHMEM
> max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
> - lastpfn = highend_pfn;
>
> if (cpu_has_dc_aliases && max_low_pfn != highend_pfn) {
> printk(KERN_WARNING "This processor doesn't support highmem."
> " %ldk highmem ignored\n",
> (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10));
> max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn;
> - lastpfn = max_low_pfn;
> }
> #endif
This cleanup is an excellent demonstration for why __maybe_unused is a
less than great idea.
Ralf
next prev parent reply other threads:[~2017-11-14 15:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 4:30 [PATCH v3 00/11] Add Octeon Hotplug CPU Support Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 01/11] MIPS: Add nudges to writes for bit unlocks Steven J. Hill
2017-11-14 15:39 ` Ralf Baechle
2017-11-14 15:43 ` Ralf Baechle
2017-11-14 17:57 ` David Daney
2017-11-14 4:30 ` [PATCH v3 02/11] MIPS: Remove unused variable 'lastpfn' Steven J. Hill
2017-11-14 15:40 ` Ralf Baechle [this message]
2017-11-14 4:30 ` [PATCH v3 03/11] MIPS: Allow __cpu_number_map to be larger than NR_CPUS Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 04/11] MIPS: Octeon: Remove usage of cvmx_wait() everywhere Steven J. Hill
2017-11-14 19:08 ` Ralf Baechle
2017-11-14 20:30 ` James Hogan
2017-11-14 20:30 ` James Hogan
2017-11-14 20:45 ` Ralf Baechle
2017-11-27 18:56 ` David Daney
2017-11-28 11:04 ` James Hogan
2017-11-28 11:04 ` James Hogan
2017-11-28 18:44 ` David Daney
2017-11-14 4:30 ` [PATCH v3 05/11] MIPS: Octeon: Header and file cleaning Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 06/11] MIPS: Octeon: Update values for CVMX_CIU_FUSE register Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 07/11] MIPS: Octeon: Add Octeon III platforms for console output Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 08/11] MIPS: Octeon: Remove crufty KEXEC and CRASH_DUMP code Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 09/11] MIPS: Octeon: Populate kernel memory from cvmx_bootmem named blocks Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 10/11] MIPS: Add the concept of BOOT_MEM_KERNEL to boot_mem_map Steven J. Hill
2017-11-14 4:30 ` [PATCH v3 11/11] MIPS: Octeon: Add working hotplug CPU support Steven J. Hill
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=20171114154059.GB16044@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=steven.hill@cavium.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.