* [PATCH] mm: remove unnecessary (void*) conversions.
@ 2022-03-22 12:13 liqiong
2022-03-22 13:36 ` HORIGUCHI NAOYA(堀口 直也)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: liqiong @ 2022-03-22 12:13 UTC (permalink / raw)
To: naoya.horiguchi, akpm
Cc: linux-mm, linux-kernel, kernel-janitors, yuzhe, renyu, liqiong
No need cast (void*) to (struct hwp_walk*).
Signed-off-by: liqiong <liqiong@nfschina.com>
---
mm/memory-failure.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 97a9ed8f87a9..4ed0dcf03659 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -630,7 +630,7 @@ static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
static int hwpoison_pte_range(pmd_t *pmdp, unsigned long addr,
unsigned long end, struct mm_walk *walk)
{
- struct hwp_walk *hwp = (struct hwp_walk *)walk->private;
+ struct hwp_walk *hwp = walk->private;
int ret = 0;
pte_t *ptep, *mapped_pte;
spinlock_t *ptl;
@@ -664,7 +664,7 @@ static int hwpoison_hugetlb_range(pte_t *ptep, unsigned long hmask,
unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
- struct hwp_walk *hwp = (struct hwp_walk *)walk->private;
+ struct hwp_walk *hwp = walk->private;
pte_t pte = huge_ptep_get(ptep);
struct hstate *h = hstate_vma(walk->vma);
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: remove unnecessary (void*) conversions.
2022-03-22 12:13 [PATCH] mm: remove unnecessary (void*) conversions liqiong
@ 2022-03-22 13:36 ` HORIGUCHI NAOYA(堀口 直也)
2022-03-22 13:44 ` [External] " Muchun Song
2022-03-22 14:28 ` liqiong
2 siblings, 0 replies; 4+ messages in thread
From: HORIGUCHI NAOYA(堀口 直也) @ 2022-03-22 13:36 UTC (permalink / raw)
To: liqiong; +Cc: akpm, linux-mm, linux-kernel, kernel-janitors, yuzhe, renyu
On Tue, Mar 22, 2022 at 08:13:38PM +0800, liqiong wrote:
> No need cast (void*) to (struct hwp_walk*).
>
> Signed-off-by: liqiong <liqiong@nfschina.com>
Thank you for sending the patch, looks good to me.
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> ---
> mm/memory-failure.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 97a9ed8f87a9..4ed0dcf03659 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -630,7 +630,7 @@ static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
> static int hwpoison_pte_range(pmd_t *pmdp, unsigned long addr,
> unsigned long end, struct mm_walk *walk)
> {
> - struct hwp_walk *hwp = (struct hwp_walk *)walk->private;
> + struct hwp_walk *hwp = walk->private;
> int ret = 0;
> pte_t *ptep, *mapped_pte;
> spinlock_t *ptl;
> @@ -664,7 +664,7 @@ static int hwpoison_hugetlb_range(pte_t *ptep, unsigned long hmask,
> unsigned long addr, unsigned long end,
> struct mm_walk *walk)
> {
> - struct hwp_walk *hwp = (struct hwp_walk *)walk->private;
> + struct hwp_walk *hwp = walk->private;
> pte_t pte = huge_ptep_get(ptep);
> struct hstate *h = hstate_vma(walk->vma);
>
> --
> 2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [External] [PATCH] mm: remove unnecessary (void*) conversions.
2022-03-22 12:13 [PATCH] mm: remove unnecessary (void*) conversions liqiong
2022-03-22 13:36 ` HORIGUCHI NAOYA(堀口 直也)
@ 2022-03-22 13:44 ` Muchun Song
2022-03-22 14:28 ` liqiong
2 siblings, 0 replies; 4+ messages in thread
From: Muchun Song @ 2022-03-22 13:44 UTC (permalink / raw)
To: liqiong
Cc: HORIGUCHI NAOYA(堀口 直也),
Andrew Morton, Linux Memory Management List, LKML,
kernel-janitors, yuzhe, renyu
On Tue, Mar 22, 2022 at 8:14 PM liqiong <liqiong@nfschina.com> wrote:
>
> No need cast (void*) to (struct hwp_walk*).
>
> Signed-off-by: liqiong <liqiong@nfschina.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mm: remove unnecessary (void*) conversions.
2022-03-22 12:13 [PATCH] mm: remove unnecessary (void*) conversions liqiong
2022-03-22 13:36 ` HORIGUCHI NAOYA(堀口 直也)
2022-03-22 13:44 ` [External] " Muchun Song
@ 2022-03-22 14:28 ` liqiong
2 siblings, 0 replies; 4+ messages in thread
From: liqiong @ 2022-03-22 14:28 UTC (permalink / raw)
To: naoya.horiguchi, akpm
Cc: linux-mm, linux-kernel, kernel-janitors, yuzhe, renyu, liqiong
No need cast (void*) to (struct hwp_walk*).
Signed-off-by: liqiong <liqiong@nfschina.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
---
mm/memory-failure.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 97a9ed8f87a9..4ed0dcf03659 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -630,7 +630,7 @@ static int check_hwpoisoned_pmd_entry(pmd_t *pmdp, unsigned long addr,
static int hwpoison_pte_range(pmd_t *pmdp, unsigned long addr,
unsigned long end, struct mm_walk *walk)
{
- struct hwp_walk *hwp = (struct hwp_walk *)walk->private;
+ struct hwp_walk *hwp = walk->private;
int ret = 0;
pte_t *ptep, *mapped_pte;
spinlock_t *ptl;
@@ -664,7 +664,7 @@ static int hwpoison_hugetlb_range(pte_t *ptep, unsigned long hmask,
unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
- struct hwp_walk *hwp = (struct hwp_walk *)walk->private;
+ struct hwp_walk *hwp = walk->private;
pte_t pte = huge_ptep_get(ptep);
struct hstate *h = hstate_vma(walk->vma);
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-22 14:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 12:13 [PATCH] mm: remove unnecessary (void*) conversions liqiong
2022-03-22 13:36 ` HORIGUCHI NAOYA(堀口 直也)
2022-03-22 13:44 ` [External] " Muchun Song
2022-03-22 14:28 ` liqiong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox