linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 09/45] drivers: media: remove duplicate includes
@ 2017-12-06 16:52 Pravin Shedge
  2017-12-07 13:35 ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Pravin Shedge @ 2017-12-06 16:52 UTC (permalink / raw)
  To: linux-media, mchehab; +Cc: linux-kernel, pravin.shedge4linux

These duplicate includes have been found with scripts/checkincludes.pl but
they have been removed manually to avoid removing false positives.

Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
---
 drivers/media/platform/pxa_camera.c | 1 -
 drivers/media/platform/ti-vpe/cal.c | 3 ---
 drivers/media/v4l2-core/v4l2-mc.c   | 2 --
 3 files changed, 6 deletions(-)

diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 9d3f0cb..2a9f02e 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -32,7 +32,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/dmaengine.h>
-#include <linux/dma-mapping.h>
 #include <linux/dma/pxa-dma.h>
 
 #include <media/v4l2-async.h>
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index 8b586c8..719ed1d 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -28,10 +28,7 @@
 #include <media/v4l2-device.h>
 #include <media/v4l2-event.h>
 #include <media/v4l2-ioctl.h>
-#include <media/v4l2-ctrls.h>
 #include <media/v4l2-fh.h>
-#include <media/v4l2-event.h>
-#include <media/v4l2-common.h>
 #include <media/videobuf2-core.h>
 #include <media/videobuf2-dma-contig.h>
 #include "cal_regs.h"
diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
index 303980b..1d550af 100644
--- a/drivers/media/v4l2-core/v4l2-mc.c
+++ b/drivers/media/v4l2-core/v4l2-mc.c
@@ -25,8 +25,6 @@
 #include <media/v4l2-fh.h>
 #include <media/v4l2-mc.h>
 #include <media/v4l2-subdev.h>
-#include <media/media-device.h>
-#include <media/v4l2-mc.h>
 #include <media/videobuf2-core.h>
 
 int v4l2_mc_create_media_graph(struct media_device *mdev)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/45] drivers: media: remove duplicate includes
  2017-12-06 16:52 [PATCH 09/45] drivers: media: remove duplicate includes Pravin Shedge
@ 2017-12-07 13:35 ` Sakari Ailus
  2017-12-10 17:33   ` Pravin Shedge
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2017-12-07 13:35 UTC (permalink / raw)
  To: Pravin Shedge; +Cc: linux-media, mchehab, linux-kernel

Hi Pravin,

On Wed, Dec 06, 2017 at 10:22:02PM +0530, Pravin Shedge wrote:
> These duplicate includes have been found with scripts/checkincludes.pl but
> they have been removed manually to avoid removing false positives.
> 
> Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>

While at it, how about ordering the headers alphabetically as well? Having
such a large number of headers there unordered may well be the reason why
they're included more than once...

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/45] drivers: media: remove duplicate includes
  2017-12-07 13:35 ` Sakari Ailus
@ 2017-12-10 17:33   ` Pravin Shedge
  2017-12-19 10:57     ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Pravin Shedge @ 2017-12-10 17:33 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, Mauro Carvalho Chehab, linux-kernel

On Thu, Dec 7, 2017 at 7:05 PM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> Hi Pravin,
>
> On Wed, Dec 06, 2017 at 10:22:02PM +0530, Pravin Shedge wrote:
>> These duplicate includes have been found with scripts/checkincludes.pl but
>> they have been removed manually to avoid removing false positives.
>>
>> Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
>
> While at it, how about ordering the headers alphabetically as well? Having
> such a large number of headers there unordered may well be the reason why
> they're included more than once...
>
> --
> Sakari Ailus
> e-mail: sakari.ailus@iki.fi


Hi Sakari,

Sorry for the late reply.

Ordering the header files alphabetically helps to avoid problems such
as inclusion of duplicate header files.
My personal preference is to go from local to global, each subsection
in alphabetical order.
Ideally, all header files should be self-contained, and inclusion
order should not matter.
Simple reordering the headers should not break build.

Reordering header files aways helpful for big projects like Linux-Kernel.
But this requires changes tree wide and modifies lots of files.
Such change requires huge audience to be participated in discussion &
take a final call.

With this patch I just handled inclusion of header file multiple times
to avoid code duplication after preprocessing.

Thanks & Regards,
   PraviN

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/45] drivers: media: remove duplicate includes
  2017-12-10 17:33   ` Pravin Shedge
@ 2017-12-19 10:57     ` Sakari Ailus
  0 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2017-12-19 10:57 UTC (permalink / raw)
  To: Pravin Shedge; +Cc: linux-media, Mauro Carvalho Chehab, linux-kernel

On Sun, Dec 10, 2017 at 11:03:29PM +0530, Pravin Shedge wrote:
> On Thu, Dec 7, 2017 at 7:05 PM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> > Hi Pravin,
> >
> > On Wed, Dec 06, 2017 at 10:22:02PM +0530, Pravin Shedge wrote:
> >> These duplicate includes have been found with scripts/checkincludes.pl but
> >> they have been removed manually to avoid removing false positives.
> >>
> >> Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
> >
> > While at it, how about ordering the headers alphabetically as well? Having
> > such a large number of headers there unordered may well be the reason why
> > they're included more than once...
> >
> > --
> > Sakari Ailus
> > e-mail: sakari.ailus@iki.fi
> 
> 
> Hi Sakari,
> 
> Sorry for the late reply.
> 
> Ordering the header files alphabetically helps to avoid problems such
> as inclusion of duplicate header files.
> My personal preference is to go from local to global, each subsection
> in alphabetical order.
> Ideally, all header files should be self-contained, and inclusion
> order should not matter.
> Simple reordering the headers should not break build.
> 
> Reordering header files aways helpful for big projects like Linux-Kernel.
> But this requires changes tree wide and modifies lots of files.
> Such change requires huge audience to be participated in discussion &
> take a final call.

Hmm. I'm not quite sure what do you mean. You're already changing the three
files, there's no need to arrange others at the same time.

> 
> With this patch I just handled inclusion of header file multiple times
> to avoid code duplication after preprocessing.
> 
> Thanks & Regards,
>    PraviN

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-19 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 16:52 [PATCH 09/45] drivers: media: remove duplicate includes Pravin Shedge
2017-12-07 13:35 ` Sakari Ailus
2017-12-10 17:33   ` Pravin Shedge
2017-12-19 10:57     ` Sakari Ailus

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).