* [PATCH] staging: vme_user: add missing includes @ 2025-05-15 19:40 Heikki Huttu 2025-05-21 11:43 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: Heikki Huttu @ 2025-05-15 19:40 UTC (permalink / raw) To: gregkh, linux-kernel, linux-staging, kernel-janitors Header files use u32, size_t, dma_addr_t, struct device, struct list_head. Add direct includes to make the headers self-contained. Signed-off-by: Heikki Huttu <heissendo88@gmail.com> --- drivers/staging/vme_user/vme.h | 5 +++++ drivers/staging/vme_user/vme_user.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/staging/vme_user/vme.h b/drivers/staging/vme_user/vme.h index 7753e736f9fd..55499b240dc3 100644 --- a/drivers/staging/vme_user/vme.h +++ b/drivers/staging/vme_user/vme.h @@ -3,6 +3,11 @@ #define _VME_H_ #include <linux/bitops.h> +#include <linux/types.h> +#include <linux/device.h> +#include <linux/list.h> +#include <linux/mm.h> +#include <linux/dma-mapping.h> /* Resource Type */ enum vme_resource_type { diff --git a/drivers/staging/vme_user/vme_user.h b/drivers/staging/vme_user/vme_user.h index 19ecb05781cc..297b25fab164 100644 --- a/drivers/staging/vme_user/vme_user.h +++ b/drivers/staging/vme_user/vme_user.h @@ -2,6 +2,8 @@ #ifndef _VME_USER_H_ #define _VME_USER_H_ +#include <linux/types.h> + #define VME_USER_BUS_MAX 1 /* -- 2.47.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vme_user: add missing includes 2025-05-15 19:40 [PATCH] staging: vme_user: add missing includes Heikki Huttu @ 2025-05-21 11:43 ` Greg KH 2025-05-24 16:09 ` Heikki Huttu 0 siblings, 1 reply; 4+ messages in thread From: Greg KH @ 2025-05-21 11:43 UTC (permalink / raw) To: Heikki Huttu; +Cc: linux-kernel, linux-staging, kernel-janitors On Thu, May 15, 2025 at 10:40:13PM +0300, Heikki Huttu wrote: > Header files use u32, size_t, dma_addr_t, struct device, struct list_head. > Add direct includes to make the headers self-contained. > > Signed-off-by: Heikki Huttu <heissendo88@gmail.com> > --- > drivers/staging/vme_user/vme.h | 5 +++++ > drivers/staging/vme_user/vme_user.h | 2 ++ > 2 files changed, 7 insertions(+) > > diff --git a/drivers/staging/vme_user/vme.h b/drivers/staging/vme_user/vme.h > index 7753e736f9fd..55499b240dc3 100644 > --- a/drivers/staging/vme_user/vme.h > +++ b/drivers/staging/vme_user/vme.h > @@ -3,6 +3,11 @@ > #define _VME_H_ > > #include <linux/bitops.h> > +#include <linux/types.h> > +#include <linux/device.h> > +#include <linux/list.h> > +#include <linux/mm.h> > +#include <linux/dma-mapping.h> If you are going to add these, please do so in a sorted way. But really, why is this needed at all? > > /* Resource Type */ > enum vme_resource_type { > diff --git a/drivers/staging/vme_user/vme_user.h b/drivers/staging/vme_user/vme_user.h > index 19ecb05781cc..297b25fab164 100644 > --- a/drivers/staging/vme_user/vme_user.h > +++ b/drivers/staging/vme_user/vme_user.h > @@ -2,6 +2,8 @@ > #ifndef _VME_USER_H_ > #define _VME_USER_H_ > > +#include <linux/types.h> Same here, are you sure this is needed? thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vme_user: add missing includes 2025-05-21 11:43 ` Greg KH @ 2025-05-24 16:09 ` Heikki Huttu 2025-05-24 16:17 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: Heikki Huttu @ 2025-05-24 16:09 UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel, linux-staging, kernel-janitors Wed, May 21, 2025 at 01:43:24PM +0200, Greg KH kirjoitti: > On Thu, May 15, 2025 at 10:40:13PM +0300, Heikki Huttu wrote: > > Header files use u32, size_t, dma_addr_t, struct device, struct list_head. > > Add direct includes to make the headers self-contained. > > > > Signed-off-by: Heikki Huttu <heissendo88@gmail.com> > > --- > > drivers/staging/vme_user/vme.h | 5 +++++ > > drivers/staging/vme_user/vme_user.h | 2 ++ > > 2 files changed, 7 insertions(+) > > > > diff --git a/drivers/staging/vme_user/vme.h b/drivers/staging/vme_user/vme.h > > index 7753e736f9fd..55499b240dc3 100644 > > --- a/drivers/staging/vme_user/vme.h > > +++ b/drivers/staging/vme_user/vme.h > > @@ -3,6 +3,11 @@ > > #define _VME_H_ > > > > #include <linux/bitops.h> > > +#include <linux/types.h> > > +#include <linux/device.h> > > +#include <linux/list.h> > > +#include <linux/mm.h> > > +#include <linux/dma-mapping.h> > > If you are going to add these, please do so in a sorted way. > > But really, why is this needed at all? > > > > > /* Resource Type */ > > enum vme_resource_type { > > diff --git a/drivers/staging/vme_user/vme_user.h b/drivers/staging/vme_user/vme_user.h > > index 19ecb05781cc..297b25fab164 100644 > > --- a/drivers/staging/vme_user/vme_user.h > > +++ b/drivers/staging/vme_user/vme_user.h > > @@ -2,6 +2,8 @@ > > #ifndef _VME_USER_H_ > > #define _VME_USER_H_ > > > > +#include <linux/types.h> > > Same here, are you sure this is needed? > > thanks, > > greg k-h Hi Greg, Thank you for the feedback. I was under the impression that it's generally preferred to use direct includes to make headers self-contained and avoid relying on transitive includes. If I was mistaken, apologies — feel free to disregard this. Best regards, Heikki ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vme_user: add missing includes 2025-05-24 16:09 ` Heikki Huttu @ 2025-05-24 16:17 ` Greg KH 0 siblings, 0 replies; 4+ messages in thread From: Greg KH @ 2025-05-24 16:17 UTC (permalink / raw) To: Heikki Huttu; +Cc: linux-kernel, linux-staging, kernel-janitors On Sat, May 24, 2025 at 07:09:46PM +0300, Heikki Huttu wrote: > Wed, May 21, 2025 at 01:43:24PM +0200, Greg KH kirjoitti: > > On Thu, May 15, 2025 at 10:40:13PM +0300, Heikki Huttu wrote: > > > Header files use u32, size_t, dma_addr_t, struct device, struct list_head. > > > Add direct includes to make the headers self-contained. > > > > > > Signed-off-by: Heikki Huttu <heissendo88@gmail.com> > > > --- > > > drivers/staging/vme_user/vme.h | 5 +++++ > > > drivers/staging/vme_user/vme_user.h | 2 ++ > > > 2 files changed, 7 insertions(+) > > > > > > diff --git a/drivers/staging/vme_user/vme.h b/drivers/staging/vme_user/vme.h > > > index 7753e736f9fd..55499b240dc3 100644 > > > --- a/drivers/staging/vme_user/vme.h > > > +++ b/drivers/staging/vme_user/vme.h > > > @@ -3,6 +3,11 @@ > > > #define _VME_H_ > > > > > > #include <linux/bitops.h> > > > +#include <linux/types.h> > > > +#include <linux/device.h> > > > +#include <linux/list.h> > > > +#include <linux/mm.h> > > > +#include <linux/dma-mapping.h> > > > > If you are going to add these, please do so in a sorted way. > > > > But really, why is this needed at all? > > > > > > > > /* Resource Type */ > > > enum vme_resource_type { > > > diff --git a/drivers/staging/vme_user/vme_user.h b/drivers/staging/vme_user/vme_user.h > > > index 19ecb05781cc..297b25fab164 100644 > > > --- a/drivers/staging/vme_user/vme_user.h > > > +++ b/drivers/staging/vme_user/vme_user.h > > > @@ -2,6 +2,8 @@ > > > #ifndef _VME_USER_H_ > > > #define _VME_USER_H_ > > > > > > +#include <linux/types.h> > > > > Same here, are you sure this is needed? > > > > thanks, > > > > greg k-h > > Hi Greg, > > Thank you for the feedback. > > I was under the impression that it's generally preferred to use direct includes to make headers self-contained and avoid relying on transitive includes. > If I was mistaken, apologies — feel free to disregard this. Generally, yes, it is a good idea, but if nothing is broken, adding additional .h files to other .h files is not a required change at all. Are you doing this for all of the staging driver files? Is this a goal to try to fix up more than just this one file? thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-24 16:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-15 19:40 [PATCH] staging: vme_user: add missing includes Heikki Huttu 2025-05-21 11:43 ` Greg KH 2025-05-24 16:09 ` Heikki Huttu 2025-05-24 16:17 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).