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

Wade Farnsworth wade_farnsworth at mentor.com
Fri Feb 24 10:47:36 EST 2012


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<stevenrwalter at gmail.com>
>> Signed-off-by: Wade Farnsworth<wade_farnsworth at mentor.com>
>> ---
>>   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



More information about the linux-arm-kernel mailing list