linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/slab_common: Modify mismatched function name
@ 2024-03-28  2:07 Jiapeng Chong
  2024-04-02  7:40 ` Vlastimil Babka
  2024-04-04  1:23 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Jiapeng Chong @ 2024-03-28  2:07 UTC (permalink / raw)
  To: cl
  Cc: penberg, rientjes, iamjoonsoo.kim, akpm, vbabka, roman.gushchin,
	42.hyeyoo, linux-mm, linux-kernel, Jiapeng Chong, Abaci Robot

No functional modification involved.

mm/slab_common.c:1215: warning: expecting prototype for krealloc(). Prototype was for krealloc_noprof() instead.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8659
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 mm/slab_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/slab_common.c b/mm/slab_common.c
index 8664da88e843..8af45e9bd2b2 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1199,7 +1199,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
 }
 
 /**
- * krealloc - reallocate memory. The contents will remain unchanged.
+ * krealloc_noprof - reallocate memory. The contents will remain unchanged.
  * @p: object to reallocate memory for.
  * @new_size: how many bytes of memory are required.
  * @flags: the type of memory to allocate.
-- 
2.20.1.7.g153144c



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/slab_common: Modify mismatched function name
  2024-03-28  2:07 [PATCH] mm/slab_common: Modify mismatched function name Jiapeng Chong
@ 2024-04-02  7:40 ` Vlastimil Babka
  2024-04-04  1:23 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: Vlastimil Babka @ 2024-04-02  7:40 UTC (permalink / raw)
  To: Jiapeng Chong, cl, akpm
  Cc: penberg, rientjes, iamjoonsoo.kim, roman.gushchin, 42.hyeyoo,
	linux-mm, linux-kernel, Abaci Robot

On 3/28/24 3:07 AM, Jiapeng Chong wrote:
> No functional modification involved.
> 
> mm/slab_common.c:1215: warning: expecting prototype for krealloc(). Prototype was for krealloc_noprof() instead.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8659
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Seems like a fix-up for the alloc tagging series in mm.

> ---
>  mm/slab_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index 8664da88e843..8af45e9bd2b2 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -1199,7 +1199,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
>  }
>  
>  /**
> - * krealloc - reallocate memory. The contents will remain unchanged.
> + * krealloc_noprof - reallocate memory. The contents will remain unchanged.
>   * @p: object to reallocate memory for.
>   * @new_size: how many bytes of memory are required.
>   * @flags: the type of memory to allocate.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/slab_common: Modify mismatched function name
  2024-03-28  2:07 [PATCH] mm/slab_common: Modify mismatched function name Jiapeng Chong
  2024-04-02  7:40 ` Vlastimil Babka
@ 2024-04-04  1:23 ` Andrew Morton
  2024-04-04  1:50   ` Suren Baghdasaryan
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2024-04-04  1:23 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: cl, penberg, rientjes, iamjoonsoo.kim, vbabka, roman.gushchin,
	42.hyeyoo, linux-mm, linux-kernel, Abaci Robot,
	Suren Baghdasaryan, Kent Overstreet

On Thu, 28 Mar 2024 10:07:11 +0800 Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:

> No functional modification involved.
> 
> mm/slab_common.c:1215: warning: expecting prototype for krealloc(). Prototype was for krealloc_noprof() instead.
> 
> ...
>
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -1199,7 +1199,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
>  }
>  
>  /**
> - * krealloc - reallocate memory. The contents will remain unchanged.
> + * krealloc_noprof - reallocate memory. The contents will remain unchanged.
>   * @p: object to reallocate memory for.
>   * @new_size: how many bytes of memory are required.
>   * @flags: the type of memory to allocate.

Well ok, but krealloc_noprof() is just an internal implementation
detail.  I suggest this documentation be moved to the new krealloc()
wrapper site.  Because krealloc() remains the thing which people
actually call.

Presumably the same applies to more of the new _noprof functions.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/slab_common: Modify mismatched function name
  2024-04-04  1:23 ` Andrew Morton
@ 2024-04-04  1:50   ` Suren Baghdasaryan
  0 siblings, 0 replies; 4+ messages in thread
From: Suren Baghdasaryan @ 2024-04-04  1:50 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jiapeng Chong, cl, penberg, rientjes, iamjoonsoo.kim, vbabka,
	roman.gushchin, 42.hyeyoo, linux-mm, linux-kernel, Abaci Robot,
	Kent Overstreet, Randy Dunlap

On Wed, Apr 3, 2024 at 6:23 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 28 Mar 2024 10:07:11 +0800 Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
>
> > No functional modification involved.
> >
> > mm/slab_common.c:1215: warning: expecting prototype for krealloc(). Prototype was for krealloc_noprof() instead.
> >
> > ...
> >
> > --- a/mm/slab_common.c
> > +++ b/mm/slab_common.c
> > @@ -1199,7 +1199,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
> >  }
> >
> >  /**
> > - * krealloc - reallocate memory. The contents will remain unchanged.
> > + * krealloc_noprof - reallocate memory. The contents will remain unchanged.
> >   * @p: object to reallocate memory for.
> >   * @new_size: how many bytes of memory are required.
> >   * @flags: the type of memory to allocate.

Nack.

>
> Well ok, but krealloc_noprof() is just an internal implementation
> detail.  I suggest this documentation be moved to the new krealloc()
> wrapper site.  Because krealloc() remains the thing which people
> actually call.
>
> Presumably the same applies to more of the new _noprof functions.

We don't need this fixup. Randy Dunlap's change [1] should handle
_noprof suffixes correctly. The warning was likely generated because
his change was not yet picked up.

[1] https://lore.kernel.org/all/20240326054149.2121-1-rdunlap@infradead.org/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-04  1:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28  2:07 [PATCH] mm/slab_common: Modify mismatched function name Jiapeng Chong
2024-04-02  7:40 ` Vlastimil Babka
2024-04-04  1:23 ` Andrew Morton
2024-04-04  1:50   ` Suren Baghdasaryan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox