Re: [PATCH 1/6] ftrace: define seq_file only for FMODE_READ

2020-10-07 Thread Wei Yang
On Tue, Oct 06, 2020 at 10:36:38AM -0400, Steven Rostedt wrote: >On Mon, 31 Aug 2020 11:10:59 +0800 >Wei Yang wrote: > >> The purpose of the operation is to get ftrace_iterator, which is embedded >> in file or seq_file for FMODE_WRITE/FMODE_READ respectively. Since we >> don't have a seq_file for

Re: [PATCH 1/6] ftrace: define seq_file only for FMODE_READ

2020-10-06 Thread Steven Rostedt
On Mon, 31 Aug 2020 11:10:59 +0800 Wei Yang wrote: > The purpose of the operation is to get ftrace_iterator, which is embedded > in file or seq_file for FMODE_WRITE/FMODE_READ respectively. Since we > don't have a seq_file for FMODE_WRITE case, it is meaningless to cast > file->private_data to se

[PATCH 1/6] ftrace: define seq_file only for FMODE_READ

2020-08-30 Thread Wei Yang
The purpose of the operation is to get ftrace_iterator, which is embedded in file or seq_file for FMODE_WRITE/FMODE_READ respectively. Since we don't have a seq_file for FMODE_WRITE case, it is meaningless to cast file->private_data to seq_file. Let's move the definition when there is a valid seq_