From: Leon Romanovsky <leon@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: David Miller <davem@davemloft.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
abbotti@mev.co.uk, Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-rdma@vger.kernel.org, yishaih@mellanox.com,
tariqt@mellanox.com, netdev@vger.kernel.org
Subject: Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
Date: Sun, 8 Oct 2017 21:55:29 +0300 [thread overview]
Message-ID: <20171008185529.GG25829@mtr-leonro.local> (raw)
In-Reply-To: <CAK7LNAQ1BeSb14poieRU4uMsnsEHPNL2zSNtWi1TGN=YrK_8jA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]
On Mon, Oct 09, 2017 at 02:29:15AM +0900, Masahiro Yamada wrote:
> 2017-10-09 2:00 GMT+09:00 David Miller <davem@davemloft.net>:
> > From: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Date: Mon, 9 Oct 2017 01:10:11 +0900
> >
> >> The headers
> >> - include/linux/mlx4/device.h
> >> - drivers/net/ethernet/mellanox/mlx4/mlx4.h
> >> require the definition of struct radix_tree_root, but do not need to
> >> know anything about other radix tree stuff.
> >>
> >> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
> >> reduce the header dependency.
> >>
> >> While we are here, let's add missing <linux/radix-tree.h> where
> >> radix tree accessors are used.
> >>
> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >
> > Honestly this makes things more complicated.
>
>
> The idea is simple; include necessary headers explicitly.
>
> Putting everything into one common header
> means most of C files are forced to parse unnecessary headers.
It is neglected, only first caller will actually parse that header file,
other callers will check the #ifndef pragma without need to reparse the
whole file.
>
>
>
> > The driver was trying to consolidate all of the header needs
> > by including them all in one place, the main driver header.
> >
> > Now you're including headers in several different files.
> >
> > I really don't like the results of this change and would
> > ask you to reconsider.
> >
> > Just add both radix-tree-root.h _and_ radix-tree.h to mlx4.h
> > and leave the rest of the driver alone.
>
>
> If you do not like this, you can just throw it away.
>
> <linux/radix-tree.h> includes <linux/radix-tree-root.h>.
> You do not need to include both.
>
>
>
>
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-10-08 18:55 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 16:10 [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` [PATCH 01/12] radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 02/12] radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 03/12] irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 04/12] writeback: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 05/12] iocontext.h: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 06/12] fs: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 07/12] blkcg: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 08/12] fscache: include <linux-radix-tree.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 09/12] sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` [PATCH 10/12] net/mlx4: " Masahiro Yamada
2017-10-08 17:00 ` David Miller
2017-10-08 17:29 ` Masahiro Yamada
2017-10-08 17:32 ` Joe Perches
[not found] ` <1507483942.11434.4.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-10-09 5:55 ` Masahiro Yamada
2017-10-09 5:55 ` Masahiro Yamada
2017-10-09 12:02 ` Masahiro Yamada
2017-10-08 18:55 ` Leon Romanovsky [this message]
2017-10-09 5:56 ` Masahiro Yamada
[not found] ` <CAK7LNARAhAaO+YjqXyBbi=-udCu8zzGnLMsoVNdkSXtXPuMKsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-09 6:10 ` Leon Romanovsky
2017-10-09 6:10 ` Leon Romanovsky
2017-10-08 16:10 ` [PATCH 11/12] net/mlx5: " Masahiro Yamada
2017-10-08 17:00 ` David Miller
2017-10-08 16:10 ` [PATCH 12/12] drm/i915: " Masahiro Yamada
[not found] ` <1507479013-5207-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2017-10-08 18:52 ` [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h> Leon Romanovsky
2017-10-08 18:52 ` Leon Romanovsky
2017-10-08 18:52 ` Leon Romanovsky
2017-10-08 18:52 ` Leon Romanovsky
2017-10-09 5:58 ` Masahiro Yamada
2017-10-09 5:58 ` Masahiro Yamada
2017-10-09 5:58 ` Masahiro Yamada
2017-10-09 5:58 ` Masahiro Yamada
2017-10-09 6:05 ` Leon Romanovsky
2017-10-09 6:05 ` Leon Romanovsky
2017-10-09 6:05 ` Leon Romanovsky
2017-10-09 6:05 ` Leon Romanovsky
2017-10-10 12:18 ` Matthew Wilcox
2017-10-10 12:18 ` Matthew Wilcox
2017-10-10 12:18 ` Matthew Wilcox
2017-10-10 12:18 ` Matthew Wilcox
2017-10-10 12:56 ` Masahiro Yamada
2017-10-10 12:56 ` Masahiro Yamada
2017-10-10 12:56 ` Masahiro Yamada
2017-10-10 13:20 ` Matthew Wilcox
2017-10-10 13:20 ` Matthew Wilcox
2017-10-10 13:20 ` Matthew Wilcox
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=20171008185529.GG25829@mtr-leonro.local \
--to=leon@kernel.org \
--cc=abbotti@mev.co.uk \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yamada.masahiro@socionext.com \
--cc=yishaih@mellanox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.