-----Original Message----- > Hi Lianbo, > > -----Original Message----- > > >> diff --git a/defs.h b/defs.h > > >> index 7d386d2..ed2f5ca 100644 > > >> --- a/defs.h > > >> +++ b/defs.h > > >> @@ -1768,6 +1768,8 @@ struct offset_table { /* stash of commonly-used offsets > */ > > >> long vcpu_struct_rq; > > >> long task_struct_sched_info; > > >> long sched_info_last_arrival; > > >> + long task_struct_sched_entity; > > >> + long se_exec_start; > > > > > > > > > This can be only appended to the end of the offset_table. > > > For more details, refer to the section "writing patches" in wiki: > > > https://github.com/crash-utility/crash/wiki > > Seeing this exchange and thought of something like this: > > --- a/defs.h > +++ b/defs.h > @@ -1215,8 +1215,8 @@ struct reference { > void *refp; > }; > > -struct offset_table { /* stash of commonly-used offsets */ > - long list_head_next; /* add new entries to end of table */ > +struct offset_table { /* NOTE: add new entries to end of table [1] */ > + long list_head_next; /* [1] https://github.com/crash-utility/crash/wiki */ > long list_head_prev; > long task_struct_pid; > long task_struct_state; > > > With this patch, a patch trying to add an entry to the middle of the table: > > diff --git a/defs.h b/defs.h > index 938e39ca4baf..c0814482abaa 100644 > --- a/defs.h > +++ b/defs.h > @@ -2007,6 +2007,7 @@ struct offset_table { /* NOTE: add new entries to end of table > [1] */ > long mm_struct_mm_count; > long task_struct_thread_reg29; > long task_struct_thread_reg31; > + long foo_bar; > long pt_regs_regs; > long pt_regs_cp0_badvaddr; > long address_space_page_tree; > > > Having this even only for the offset_table, size_table and array_table > might be effective to let developers notice that rule. > > > That might help, but it may still be ignored. Yes, just an small improvement in the current process we have. > > > > > What do you think? Attached a patch. > > > > Tried to add the contribution guidelines at the end of email, like this: > -- > Crash-utility mailing list > Crash-utility@xxxxxxxxxx <mailto:Crash-utility@xxxxxxxxxx> > https://listman.redhat.com/mailman/listinfo/crash-utility > Contribution Guidlines: https://github.com/crash-utility/crash/wiki This looks good, thanks. > > Or do we have a script to check the patch rules? Just like the checkpatch.pl <http://checkpatch.pl> in > the kernel? This also sounds good. It also may be missed, so an ideal would be an automated patch test running when a patch is posted.. Thanks, Kazu -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki