Re: mmotm 2021-02-08-15-44 uploaded (mm-cma-print-region-name-on-failure.patch)

From: Randy Dunlap
Date: Mon Feb 08 2021 - 23:34:44 EST


On 2/8/21 3:45 PM, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> The mm-of-the-moment snapshot 2021-02-08-15-44 has been uploaded to
>
> https://www.ozlabs.org/~akpm/mmotm/
>
> mmotm-readme.txt says
>
> README for mm-of-the-moment:
>
> https://www.ozlabs.org/~akpm/mmotm/
>
> This is a snapshot of my -mm patch queue. Uploaded at random hopefully
> more than once a week.
>
> You will need quilt to apply these patches to the latest Linus release (5.x
> or 5.x-rcY). The series file is in broken-out.tar.gz and is duplicated in
> https://ozlabs.org/~akpm/mmotm/series
>
> The file broken-out.tar.gz contains two datestamp files: .DATE and
> .DATE-yyyy-mm-dd-hh-mm-ss. Both contain the string yyyy-mm-dd-hh-mm-ss,
> followed by the base kernel version against which this patch series is to
> be applied.
>
> This tree is partially included in linux-next. To see which patches are
> included in linux-next, consult the `series' file. Only the patches
> within the #NEXT_PATCHES_START/#NEXT_PATCHES_END markers are included in
> linux-next.

mm-cma-print-region-name-on-failure.patch:

This causes a printk format warning on i386 (these used to be readable):

In file included from ../include/linux/printk.h:7:0,
from ../include/linux/kernel.h:16,
from ../include/asm-generic/bug.h:20,
from ../arch/x86/include/asm/bug.h:93,
from ../include/linux/bug.h:5,
from ../include/linux/mmdebug.h:5,
from ../include/linux/mm.h:9,
from ../include/linux/memblock.h:13,
from ../mm/cma.c:24:
../mm/cma.c: In function ‘cma_alloc’:
../include/linux/kern_levels.h:5:18: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
../include/linux/kern_levels.h:11:18: note: in expansion of macro ‘KERN_SOH’
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
../include/linux/printk.h:343:9: note: in expansion of macro ‘KERN_ERR’
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
../mm/cma.c:503:3: note: in expansion of macro ‘pr_err’
pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
^~~~~~
../mm/cma.c:503:45: note: format string is defined here
pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
~~^
%lu

because the type of count is not the same as the type of cma->count.

Furthermore, are you sure that cma->count is the same value as count?
I'm not.


(also s/convienience/convenience/ in the patch description)

thanks.
--
~Randy