On Tue, 26 Feb 2019 18:51:37 -0800 Ira Weiny <ira.weiny@xxxxxxxxx> wrote: > > Do a disassemble of both approaches to see what I mean. > > Right... However, this results in quite the chicken and the egg problem > because calling create_mad_addr_info() within the definition of > trace_event_raw_ib_mad_send_template results in errors that I'm > declaring the structure in the parameter list... Just adding: struct trace_event_raw_ib_mad_send_template; Before the macro should fix it. > > :-/ > > I've tried moving create_mad_addr_info() around a bit and a couple of things > with void pointers but the best I can get is that I'm dereferencing an > incomplete type because the output of the preprocessor always seems to put at > least 1 call of create_mad_addr_info() prior to the struct definition. > > Is there an example of this somewhere? This code is not that performance > critical but I am curious at this point. Not really, this is a unique case where you have a single function updating several parameters. -- Steve