Re: mmotm 2020-01-21-13-28 uploaded (convert everything to struct proc_ops)

From: Randy Dunlap
Date: Tue Jan 21 2020 - 21:25:39 EST


On 1/21/20 1:29 PM, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> The mm-of-the-moment snapshot 2020-01-21-13-28 has been uploaded to
>
> http://www.ozlabs.org/~akpm/mmotm/
>
> mmotm-readme.txt says
>
> README for mm-of-the-moment:
>
> http://www.ozlabs.org/~akpm/mmotm/
>
> This is a snapshot of my -mm patch queue. Uploaded at random hopefully
> more than once a week.

NULL seems to be misspelled as NUL in the proc-convert-everything-to-struct-proc_ops.patch
patch for kernel/sched/psi.c:

static int __init psi_proc_init(void)
{
if (psi_enable) {
proc_mkdir("pressure", NULL);
- proc_create("pressure/io", 0, NULL, &psi_io_fops);
- proc_create("pressure/memory", 0, NULL, &psi_memory_fops);
- proc_create("pressure/cpu", 0, NULL, &psi_cpu_fops);
+ proc_create("pressure/io", 0, NULL, &psi_io_proc_ops);
+ proc_create("pressure/memory", 0, NUL, &psi_memory_proc_ops); <<<<<<<<<<
+ proc_create("pressure/cpu", 0, NULL &psi_cpu_proc_ops);

also missing a comma above...

}
return 0;


../kernel/sched/psi.c: In function âpsi_proc_initâ:
../kernel/sched/psi.c:1286:37: error: âNULâ undeclared (first use in this function); did you mean â_ULâ?
proc_create("pressure/memory", 0, NUL, &psi_memory_proc_ops);
^~~
_UL
../kernel/sched/psi.c:1286:37: note: each undeclared identifier is reported only once for each function it appears in
../kernel/sched/psi.c:1287:39: error: invalid operands to binary & (have âvoid *â and âconst struct proc_opsâ)
proc_create("pressure/cpu", 0, NULL &psi_cpu_proc_ops);
^
../kernel/sched/psi.c:1287:3: error: too few arguments to function âproc_createâ
proc_create("pressure/cpu", 0, NULL &psi_cpu_proc_ops);
^~~~~~~~~~~
In file included from ../kernel/sched/psi.c:133:0:
../include/linux/proc_fs.h:64:24: note: declared here
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
^~~~~~~~~~~


--
~Randy
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>