Thu, Jun 26, 2025 at 04:39:07PM -0500, Ira Weiny kirjoitti:
> Andy Shevchenko wrote:

...


> > +#include <linux/ioport.h>
> 
> If we are going in this direction why include ioport vs forward declaring
> struct resource?


I don't know where I looked when added this. This should be io.h.
And yes, we need forward declarations for struct resource and struct kobject.

...


> > -#include <linux/spinlock.h>
> > -#include <linux/bio.h>
> 
> I'm leaning toward including bio, module, and sysfs rather than do the
> forward declarations.

Header already uses forward declarations.

> Are forward declarations preferred these days?

Always with the dependency hell we have. For example, if we go your way we
would need to include of.h which is yet another monsteur. I prefer to use
this patch as provided.


-- 
With Best Regards,
Andy Shevchenko



Reply via email to