lkml.org 
[lkml]   [2020]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/10] kernel: entry: Expose helpers to migrate TIF to SYSCALL_WORK flags
Date
On Sat, Nov 14 2020 at 11:22, Christoph Hellwig wrote:
>> +#ifdef CONFIG_GENERIC_ENTRY
>> +static inline void __set_task_syscall_work(struct thread_info *ti, int flag)
>> +{
>> + set_bit(flag, (unsigned long *)&ti->syscall_work);
>> +}
>> +static inline int __test_task_syscall_work(struct thread_info *ti, int flag)
>> +{
>> + return test_bit(flag, (unsigned long *)&ti->syscall_work);
>> +}
>> +static inline void __clear_task_syscall_work(struct thread_info *ti, int flag)
>> +{
>> + return clear_bit(flag, (unsigned long *)&ti->syscall_work);
>
> The casts here look bogus.

Making sure that &(unsigned long) results in a pointer to unsigned long
is indeed silly.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-11-15 19:29    [W:0.070 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site