Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: Sasha Levin <sashal@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	Xuerui Wang <kernel@xen0n.name>,
	stable@vger.kernel.org, loongarch@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH for 6.1.y] LoongArch: Fix build error due to backport
Date: Mon, 5 May 2025 10:57:36 +0200	[thread overview]
Message-ID: <2025050531-video-reassure-e0f4@gregkh> (raw)
In-Reply-To: <20250504021054.783045-1-chenhuacai@loongson.cn>

On Sun, May 04, 2025 at 10:10:54AM +0800, Huacai Chen wrote:
> In 6.1 there is no pmdp_get() definition, so use *pmd directly, in order
> to avoid such build error due to a recently backport:
> 
> arch/loongarch/mm/hugetlbpage.c: In function 'huge_pte_offset':                                                                                                                
> arch/loongarch/mm/hugetlbpage.c:50:25: error: implicit declaration of
> function 'pmdp_get'; did you mean 'ptep_get'?
> [-Wimplicit-function-declaration]                          
>    50 |         return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;                                                                                                         
>       |                         ^~~~~~~~                                                                                                                                       
>       |                         ptep_get                            
> 
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  arch/loongarch/mm/hugetlbpage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/loongarch/mm/hugetlbpage.c b/arch/loongarch/mm/hugetlbpage.c
> index cf3b8785a921..70b4a51885c2 100644
> --- a/arch/loongarch/mm/hugetlbpage.c
> +++ b/arch/loongarch/mm/hugetlbpage.c
> @@ -47,7 +47,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
>  				pmd = pmd_offset(pud, addr);
>  		}
>  	}
> -	return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;
> +	return pmd_none(*pmd) ? NULL : (pte_t *) pmd;
>  }
>  
>  /*
> -- 
> 2.47.1
> 
> 

Thanks for the fix!

  reply	other threads:[~2025-05-05  8:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-04  2:10 [PATCH for 6.1.y] LoongArch: Fix build error due to backport Huacai Chen
2025-05-05  8:57 ` Greg Kroah-Hartman [this message]
2025-05-05 15:13 ` Sasha Levin

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=2025050531-video-reassure-e0f4@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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