Re: [PATCH] PAG support only

David Howells
2003-05-14T09:32:17Z

> David, please stick with Linus-style. That means commas
> after spaces and never, ever, ever:
>
> if (foo) bar

So you'd rather have:

long sys_setpag(pag_t pag)
{
if (pag > 0)
return vfs_join_pag(pag);
else if (pag == 0)
return vfs_leave_pag();
else if (pag == -1)
return vfs_new_pag();
else
return -EINVAL;
}

Than:

long sys_setpag(pag_t pag)
{
if (pag > 0) return vfs_join_pag(pag);
else if (pag == 0) return vfs_leave_pag();
else if (pag == -1) return vfs_new_pag();
else return -EINVAL;
}

When the former is _far_ less readable at a glance? And also consumes nearly
twice as many screen lines [see CodingStyle: "Thus, as the supply of new-lines
on your screen is not a renewable resource (think 25-line terminal screens
here), you have more empty lines to put comments on."].

> and syscalls should return long, not int.

Fair enough, but in arch/i386/kernel/process.c:

asmlinkage int sys_fork(struct pt_regs regs)
asmlinkage int sys_clone(struct pt_regs regs)
asmlinkage int sys_vfork(struct pt_regs regs)
asmlinkage int sys_execve(struct pt_regs regs)
etc...

Should these be fixed too (the i386 arch is referred to quite a lot)?

David