On Sun, Jun 23, 2024 at 11:11 AM Matthew Wilcox wrote:
>
> On Sun, Jun 23, 2024 at 10:29:30AM +0800, Yafang Shao wrote:
> > On Fri, Jun 21, 2024 at 9:57 PM Matthew Wilcox wrote:
> > >
> > > On Fri, Jun 21, 2024 at 10:29:54AM +0800, Yafang Shao wrote:
> > > > +++ b/mm/internal.h
> > >
> > > Why
On Sun, Jun 23, 2024 at 10:29:30AM +0800, Yafang Shao wrote:
> On Fri, Jun 21, 2024 at 9:57 PM Matthew Wilcox wrote:
> >
> > On Fri, Jun 21, 2024 at 10:29:54AM +0800, Yafang Shao wrote:
> > > +++ b/mm/internal.h
> >
> > Why are you putting __kstrndup in a header file when it's only used
> > in
On Fri, Jun 21, 2024 at 9:57 PM Matthew Wilcox wrote:
>
> On Fri, Jun 21, 2024 at 10:29:54AM +0800, Yafang Shao wrote:
> > +++ b/mm/internal.h
>
> Why are you putting __kstrndup in a header file when it's only used
> in util.c?
I want to make it always inlined. However, it is not recommended to
On Fri, Jun 21, 2024 at 9:51 PM Simon Horman wrote:
>
> On Fri, Jun 21, 2024 at 10:29:54AM +0800, Yafang Shao wrote:
> > These three functions follow the same pattern. To deduplicate the code,
> > let's introduce a common help __kstrndup().
> >
> > Suggested-by: Andrew Morton
> > Signed-off-by:
On Fri, Jun 21, 2024 at 10:29:54AM +0800, Yafang Shao wrote:
> +++ b/mm/internal.h
Why are you putting __kstrndup in a header file when it's only used
in util.c?
Also, I think this function is actually __kmemdup_nul(), not
__kstrndup().
On Fri, Jun 21, 2024 at 10:29:54AM +0800, Yafang Shao wrote:
> These three functions follow the same pattern. To deduplicate the code,
> let's introduce a common help __kstrndup().
>
> Suggested-by: Andrew Morton
> Signed-off-by: Yafang Shao
Hi Yafang Shao,
Some minor nits from my side.
>
These three functions follow the same pattern. To deduplicate the code,
let's introduce a common help __kstrndup().
Suggested-by: Andrew Morton
Signed-off-by: Yafang Shao
---
mm/internal.h | 24
mm/util.c | 27 ---
2 files changed, 28