On (03/12/19 10:18), Petr Mladek wrote:
> > >   * @max_reason:  filter for highest reason number that should be dumped
> > > - * @registered:  Flag that specifies if this is already registered
> > > + * @registered:  Flag that specifies if this is already registered 
> > > (private)
> > >   */
> > >  struct kmsg_dumper {
> > >   struct list_head list;
> > 
[..]
> This is another field in the same structure. There are 4 other fields
> that are described as private by extra comment. Thefore this patch
> might make it more consistent.

Well, no objections from my side. At the same time nothing in kmsg_dump.h
suggests that "(private)" stands for "protected by logbuf_lock". Even more,
that struct has another "private" members, which are protected by
logbuf_lock - cur_idx, next_idx, cur_srq, next_seq; except when they are
not (see kmsg_dump_get_line_nolock() and other _nolock() functions). So
"private" has conflicting meanings.

struct kmsg_dumper {
        struct list_head list;
        void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
        enum kmsg_dump_reason max_reason;
        bool active;
        bool registered;

        /* private state of the kmsg iterator */
        u32 cur_idx;
        u32 next_idx;
        u64 cur_seq;
        u64 next_seq;
};

> 
> Well, I am not sure if it is worth it. Andrew?
> 

Agreed.

        -ss

Reply via email to