Messages in this thread | | | Subject | Re: [PATCH 1/5] coresight: Include required headers in C files | From | Stephen Boyd <> | Date | Tue, 28 Apr 2020 10:34:27 -0700 |
| |
Quoting Mathieu Poirier (2020-04-27 09:34:46) > On Sun, Apr 26, 2020 at 11:58:01AM -0700, Stephen Boyd wrote: > > diff --git a/drivers/hwtracing/coresight/coresight-cti.h b/drivers/hwtracing/coresight/coresight-cti.h > > index 004df3ab9dd0..d80123b905a8 100644 > > --- a/drivers/hwtracing/coresight/coresight-cti.h > > +++ b/drivers/hwtracing/coresight/coresight-cti.h > > @@ -7,8 +7,10 @@ > > #ifndef _CORESIGHT_CORESIGHT_CTI_H > > #define _CORESIGHT_CORESIGHT_CTI_H > > > > -#include <asm/local.h> > > +#include <linux/list.h> > > #include <linux/spinlock.h> > > +#include <linux/types.h> > > + > > #include "coresight-priv.h" > > > > /* > > @@ -52,6 +54,12 @@ > > */ > > #define CTIINOUTEN_MAX 32 > > > > +struct attribute; > > +struct attribute_group; > > +struct coresight_device; > > +struct device; > > +struct fwnode_handle; > > + > > I would prefer adding the headers rather than forward declarations, it scales > better. >
Ok. I'm worried that including too many headers when they're not necessary means it's easier to get into the problem that I'm trying to solve here where kcalloc() isn't defined. Anyway, I'll update the patch and resend!
| |