Re: [PATCH v8 1/2] drivers: export to_ext_attr()

From: Bartosz Golaszewski
Date: Thu Jun 13 2024 - 07:18:33 EST


On Thu, Jun 13, 2024 at 12:02 PM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Jun 13, 2024 at 11:28:29AM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> >
> > Make to_ext_attr() available to code that wants to reuse struct
> > dev_ext_attribute. While at it: make it into a static inline function.
>
> Please don't use this, why is it needed?
>
> thanks,
>
> greg k-h

I had a struct in the gpio-virtuser module that consisted of a
device_attribute and a void pointer. Andy suggested reusing struct
dev_ext_attribute for that but I need this macro to access it when
only having the embedded struct device_attribute address.

Bart