Re: [PATCH v10] mm: slub: move sysfs slab alloc/free interfaces to debugfs

Andy Shevchenko
2021-06-07T08:42:50Z

On Mon, Jun 7, 2021 at 5:40 AM Faiyaz Mohammed <faiyazm@codeaurora.org> wrote:
> On 6/7/2021 2:01 AM, Andy Shevchenko wrote:
> > On Sun, Jun 6, 2021 at 7:16 PM Faiyaz Mohammed <faiyazm@codeaurora.org> wrote:

...

> >> + if (l->sum_time != l->min_time) {
> >> + seq_printf(seq, " age=%ld/%ld/%ld",
> >> + l->min_time,
> >
> >> + (long)div_u64(l->sum_time, l->count),
> >
> > Hmm... Why is the cast needed here?
> >
> To avoid below warning while preparing build for arm/32 bit,
> "format ‘%ld’ expects argument of type ‘long int’, but argument 4 has
> type ‘u64 {aka long long unsigned int}" .

Perhaps use %llu?

> >> + l->max_time);
> >> + } else
> >> + seq_printf(seq, " age=%ld",
> >> + l->min_time);

--
With Best Regards,
Andy Shevchenko