> > { > > - struct src_obj obj =3D {}; > > - int err =3D 0, fd; > > + int fd, ret; > > > > - if (!OPTS_VALID(opts, bpf_linker_file_opts)) > > - return libbpf_err(-EINVAL); > > + LIBBPF_OPTS(bpf_linker_file_opts, opts); > > this is a variable declaration, no empty lines between variable declaration= > s I'd originally written it without the extra empty line but got complaints from checkpatch.pl. Is it ok to just ignore its warnings? > > +int bpf_linker__add_buf(struct bpf_linker *linker, const char *name, > > why is the buffer name passed as an argument instead of through > opts.filename? let's keep it simple and consistent > > and if user didn't care to pass opts.filename, just do some > "mem:%p+%zu", buf, buf_sz thing Just because memfd_create() requires a filename so I was treating it as a required argument for this function too. Happy to change it to this suggestion though. All other comments make sense and I'll address them in the next patch.