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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aV5xv0PfUvdc5QFE@casper.infradead.org>
Date: Wed, 7 Jan 2026 14:46:23 +0000
From: Matthew Wilcox <willy@...radead.org>
To: alexs@...nel.org
Cc: "David S. Miller" <davem@...emloft.net>,
	Andreas Larsson <andreas@...sler.com>,
	"open list:SPARC + UltraSPARC (sparc/sparc64)" <sparclinux@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>,
	kernel test robot <lkp@...el.com>,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	Qi Zheng <zhengqi.arch@...edance.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>, Zi Yan <ziy@...dia.com>,
	Kevin Brodsky <kevin.brodsky@....com>,
	Mike Rapoport <rppt@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] arch/sparc: fix unused variable warning

On Wed, Jan 07, 2026 at 06:41:44PM +0800, alexs@...nel.org wrote:
> From: Alex Shi <alexs@...nel.org>
> 
>    arch/sparc/mm/init_64.c: In function 'arch_hugetlb_valid_size':
>    arch/sparc/mm/init_64.c:361:24: warning: variable 'hv_pgsz_idx' set but not used [-Wunused-but-set-variable]
>      361 |         unsigned short hv_pgsz_idx;
>          |                        ^~~~~~~~~~~

Looks like it's been unused since introduction in c7d9f77d33a7 ?

As such, why cc all these people who have absolutely nothing to do with
it?  Use your brain, not a stupid script.

> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Alex Shi <alexs@...nel.org>
> Cc: sparclinux@...r.kernel.org
> Cc: Matthew Wilcox  <willy@...radead.org>
> Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Cc: Qi Zheng <zhengqi.arch@...edance.com>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: Zi Yan <ziy@...dia.com>
> Cc: Kevin Brodsky <kevin.brodsky@....com>
> Cc: Mike Rapoport  <rppt@...nel.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Andreas Larsson <andreas@...sler.com>
> Cc: David S. Miller <davem@...emloft.net>
> ---
>  arch/sparc/mm/init_64.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
> index df9f7c444c39..ba19d23d4040 100644
> --- a/arch/sparc/mm/init_64.c
> +++ b/arch/sparc/mm/init_64.c
> @@ -358,30 +358,24 @@ static void __init pud_huge_patch(void)
>  bool __init arch_hugetlb_valid_size(unsigned long size)
>  {
>  	unsigned int hugepage_shift = ilog2(size);
> -	unsigned short hv_pgsz_idx;
>  	unsigned int hv_pgsz_mask;
>  
>  	switch (hugepage_shift) {
>  	case HPAGE_16GB_SHIFT:
>  		hv_pgsz_mask = HV_PGSZ_MASK_16GB;
> -		hv_pgsz_idx = HV_PGSZ_IDX_16GB;
>  		pud_huge_patch();
>  		break;
>  	case HPAGE_2GB_SHIFT:
>  		hv_pgsz_mask = HV_PGSZ_MASK_2GB;
> -		hv_pgsz_idx = HV_PGSZ_IDX_2GB;
>  		break;
>  	case HPAGE_256MB_SHIFT:
>  		hv_pgsz_mask = HV_PGSZ_MASK_256MB;
> -		hv_pgsz_idx = HV_PGSZ_IDX_256MB;
>  		break;
>  	case HPAGE_SHIFT:
>  		hv_pgsz_mask = HV_PGSZ_MASK_4MB;
> -		hv_pgsz_idx = HV_PGSZ_IDX_4MB;
>  		break;
>  	case HPAGE_64K_SHIFT:
>  		hv_pgsz_mask = HV_PGSZ_MASK_64K;
> -		hv_pgsz_idx = HV_PGSZ_IDX_64K;
>  		break;
>  	default:
>  		hv_pgsz_mask = 0;
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ