On Thu, 2024-11-28 at 01:23 +0000, Ihor Solodrai wrote: > From: Alan Maguire <alan.maguire@xxxxxxxxxx> > > Currently we have two modes of function encoding; one adds functions > based upon the first instance found and ignores inconsistent > representations. The second saves function representations and later > finds inconsistencies. The mode chosen is determined by > conf_load->skip_encoding_btf_inconsistent_proto. > > The knock-on effect is that we need to support two modes in > btf_encoder__add_func(); one for each case. Simplify by using > the "save function" approach for both cases; only difference is > that we allow inconsistent representations if > skip_encoding_btf_inconsistent_proto is not set (it is set by default > for upstream kernels and has been for a while). > > Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx> > Signed-off-by: Ihor Solodrai <ihor.solodrai@xxxxx> > --- Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx> [...]