Re: [RFC 2/5] ia64/sn/hwperf: use seq_open_data

2018-03-02 Thread Rasmus Villemoes
On 2 March 2018 at 00:37, Rasmus Villemoes wrote: > This code should check the return value of seq_open(); if it failed, > file->private_data is NULL. But we can avoid the issue entirely and > simplify the code by letting seq_open_data() set the ->private member > to objbuf. > > if ((e = s

[RFC 2/5] ia64/sn/hwperf: use seq_open_data

2018-03-01 Thread Rasmus Villemoes
This code should check the return value of seq_open(); if it failed, file->private_data is NULL. But we can avoid the issue entirely and simplify the code by letting seq_open_data() set the ->private member to objbuf. Signed-off-by: Rasmus Villemoes --- arch/ia64/sn/kernel/sn2/sn_hwperf.c | 5 +-