Subject: [PATCH 1/3] ARM: add support for the generic syscall.h interface

From: [email-masked] (Wade Farnsworth)
Date: Fri, 24 Feb 2012 08:47:36 -0700

Will Deacon wrote:
> Hi Wade,
>
> On Wed, Feb 22, 2012 at 02:45:36PM +0000, Wade Farnsworth wrote:
>> Supplying the asm-generic/syscall.h interface is a
>> pre-requisite for HAVE_ARCH_TRACEHOOK
>>
>> Signed-off-by: Steven Walter<[email-masked]>
>> Signed-off-by: Wade Farnsworth<[email-masked]>
>> ---
>>   arch/arm/include/asm/syscall.h |   93 ++++++++++++++++++++++++++++++++++++++++
>>   1 files changed, 93 insertions(+), 0 deletions(-)
>>   create mode 100644 arch/arm/include/asm/syscall.h
>
> [...]
>
>> +
>> +static inline void syscall_set_return_value(struct task_struct *task,
>> +					    struct pt_regs *regs,
>> +					    int error, long val)
>> +{
>> +	regs->ARM_r0 = (long) error ?: val;
>> +}
>
> This looks like far too much fun for kernel code, although I see that '?:'
> does appear elsewhere in the kernel. Usually in perl regexs though :)
>

OK, I'll change this to

regs->ARM_r0 = (long) error ? error : val;

That better? :)

Thanks,

-Wade