mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pravin Shedge <pravin.shedge4linux@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/45] drivers: media: remove duplicate includes
Date: Sun, 10 Dec 2017 23:03:29 +0530	[thread overview]
Message-ID: <CALSsfOC-mEzDbXZyO2iE-zedp8Fpb6DipWEbLogWcFKhHRG=aA@mail.gmail.com> (raw)
In-Reply-To: <20171207133522.yqgb532ftcgvw62d@valkosipuli.retiisi.org.uk>

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

  reply	other threads:[~2017-12-10 17:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 16:52 Pravin Shedge
2017-12-07 13:35 ` Sakari Ailus
2017-12-10 17:33   ` Pravin Shedge [this message]
2017-12-19 10:57     ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALSsfOC-mEzDbXZyO2iE-zedp8Fpb6DipWEbLogWcFKhHRG=aA@mail.gmail.com' \
    --to=pravin.shedge4linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®