Re: [PATCH 03/10] device property: Add fwnode_property_read_int_array()

From: Rob Herring
Date: Fri Apr 04 2025 - 10:13:20 EST


On Fri, Apr 4, 2025 at 6:00 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Thu, Apr 03, 2025 at 10:36:40PM +0200, Miguel Ojeda wrote:
> > On Thu, Apr 3, 2025 at 8:48 PM Rob Herring <robh@xxxxxxxxxx> wrote:
> > >
> > > Looks there are RUST_BINDGEN or __BINDGEN__ define which could be used
> > > here. Don't need a header, just wrap the declaration. No idea which
> > > one would be preferred as there's exactly 1 use of each. Miguel?
> >
> > If you mean bcachefs' `RUST_BINDGEN`, then I think that one comes from
> > bcachefs-tools, i.e. we don't define it.
>
> But is there a way to have a function that is not really exported to be used in
> Rust only code?

#ifdef __BINDGEN__
int fwnode_property_read_int_array(const struct fwnode_handle *fwnode,
const char *propname,
unsigned int elem_size, void *val, size_t nval);
#endif

Rob