public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <seakeel@gmail.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	alexs@kernel.org, "David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	"open list:SPARC + UltraSPARC (sparc/sparc64)"
	<sparclinux@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	Matthew Wilcox <willy@infradead.org>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Qi Zheng <zhengqi.arch@bytedance.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Zi Yan <ziy@nvidia.com>, Kevin Brodsky <kevin.brodsky@arm.com>,
	Mike Rapoport <rppt@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] arch/sparc: fix unused vaiable warning error
Date: Wed, 7 Jan 2026 17:36:34 +0800	[thread overview]
Message-ID: <753883ca-5c30-4169-9548-cac76a2de00a@gmail.com> (raw)
In-Reply-To: <072b8188e07208b995eaf5d499c51cd12a25954d.camel@physik.fu-berlin.de>



On 2026/1/7 16:42, John Paul Adrian Glaubitz wrote:
> Hi Alex,
> 
> On Wed, 2026-01-07 at 14:42 +0800,alexs@kernel.org wrote:
>> From: Alex Shi<alexs@kernel.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;
>>           |                        ^~~~~~~~~~~
>>
>> Reported-by: kernel test robot<lkp@intel.com>
>> Signed-off-by: Alex Shi<alexs@kernel.org>
>> Cc:sparclinux@vger.kernel.org
>> Cc: Matthew Wilcox<willy@infradead.org>
>> Cc: Lorenzo Stoakes<lorenzo.stoakes@oracle.com>
>> Cc: Qi Zheng<zhengqi.arch@bytedance.com>
>> Cc: Dave Hansen<dave.hansen@linux.intel.com>
>> Cc: Zi Yan<ziy@nvidia.com>
>> Cc: Kevin Brodsky<kevin.brodsky@arm.com>
>> Cc: Mike Rapoport<rppt@kernel.org>
>> Cc: Andrew Morton<akpm@linux-foundation.org>
>> Cc: Andreas Larsson<andreas@gaisler.com>
>> Cc: David S. Miller<davem@davemloft.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;
> Thanks for the patch! Could you fix the typo in the subject?

Thanks  a lot. I will update the subject and resend for v2.

Thanks
Alex

> 
> Thanks,
> Adrian
> 
> -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' 
> Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
> 

      reply	other threads:[~2026-01-07  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  6:42 [PATCH] arch/sparc: fix unused vaiable warning error alexs
2026-01-07  8:42 ` John Paul Adrian Glaubitz
2026-01-07  9:36   ` Alex Shi [this message]

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=753883ca-5c30-4169-9548-cac76a2de00a@gmail.com \
    --to=seakeel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexs@kernel.org \
    --cc=andreas@gaisler.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=kevin.brodsky@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=rppt@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=willy@infradead.org \
    --cc=zhengqi.arch@bytedance.com \
    --cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox