From: Randy Dunlap <rdunlap@infradead.org>
To: "Ma, Jianpeng" <jianpeng.ma@intel.com>,
Christoph Hellwig <hch@infradead.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: block: remove unused header includes.
Date: Sun, 26 Apr 2020 20:06:17 -0700 [thread overview]
Message-ID: <768e4398-1789-8dfa-5883-effb566b2f31@infradead.org> (raw)
In-Reply-To: <6AA21C22F0A5DA478922644AD2EC308C73C55940@SHSMSX101.ccr.corp.intel.com>
Hi,
On 4/26/20 7:56 PM, Ma, Jianpeng wrote:
> This used deheader(git@gitlab.com:esr/deheader.git) to produce.
>
> Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
> ---
> block/badblocks.c | 6 ------
> block/bfq-cgroup.c | 10 ----------
> block/bfq-iosched.c | 13 -------------
> block/bio-integrity.c | 6 ------
> block/bio.c | 14 --------------
> block/blk-cgroup.c | 10 ----------
> block/blk-core.c | 24 ------------------------
> block/blk-exec.c | 5 -----
> block/blk-flush.c | 10 ----------
> block/blk-integrity.c | 6 ------
> block/blk-ioc.c | 7 -------
> block/blk-lib.c | 5 -----
> block/blk-map.c | 4 ----
> block/blk-merge.c | 5 -----
> block/blk-mq-cpumap.c | 8 --------
> block/blk-mq-debugfs.c | 6 ------
> block/blk-mq-pci.c | 4 ----
> block/blk-mq-rdma.c | 1 -
> block/blk-mq-sched.c | 7 -------
> block/blk-mq-sysfs.c | 15 +--------------
> block/blk-mq-tag.c | 5 -----
> block/blk-mq-virtio.c | 4 ----
> block/blk-mq.c | 22 ----------------------
> block/blk-pm.c | 4 ----
> block/blk-settings.c | 8 --------
> block/blk-softirq.c | 6 ------
> block/blk-stat.c | 5 -----
> block/blk-sysfs.c | 9 ---------
> block/blk-throttle.c | 5 -----
> block/blk-timeout.c | 5 -----
> block/blk-wbt.c | 6 ------
> block/blk-zoned.c | 7 -------
> block/bounce.c | 15 ---------------
> block/bsg-lib.c | 5 -----
> block/bsg.c | 11 -----------
> block/cmdline-parser.c | 1 -
> block/elevator.c | 15 ---------------
> block/genhd.c | 14 --------------
> block/ioctl.c | 8 --------
> block/ioprio.c | 11 -----------
> block/kyber-iosched.c | 9 ---------
> block/mq-deadline.c | 14 --------------
> block/partitions/amiga.c | 1 -
> block/partitions/core.c | 4 ----
> block/partitions/efi.c | 3 ---
> block/partitions/karma.c | 1 -
> block/partitions/ldm.c | 4 ----
> block/partitions/mac.c | 1 -
> block/scsi_ioctl.c | 14 --------------
> block/sed-opal.c | 9 ---------
> block/t10-pi.c | 1 -
> fs/block_dev.c | 16 ----------------
> 52 files changed, 1 insertion(+), 408 deletions(-)
>
> diff --git a/block/badblocks.c b/block/badblocks.c
> index 2e5f5697db35..4e4eb0fc9eb9 100644
> --- a/block/badblocks.c
> +++ b/block/badblocks.c
> @@ -8,12 +8,6 @@
> */
>
> #include <linux/badblocks.h>
> -#include <linux/seqlock.h>
above is used by:
seq = read_seqbegin(&bb->lock);
> -#include <linux/device.h>
struct device is used in this source file.
> -#include <linux/kernel.h>
> -#include <linux/module.h>
> -#include <linux/stddef.h>
NULL is used in this source file.
> -#include <linux/types.h>
sector_t is used in this source file.
> #include <linux/slab.h>
>
> /**
Can you explain the criteria that 'deheader' use to decide that
a header file can be removed?
And are you aware of rule #1 in Documentation/process/submit-checklist.rst:
1) If you use a facility then #include the file that defines/declares
that facility. Don't depend on other header files pulling in ones
that you use.
--
~Randy
next prev parent reply other threads:[~2020-04-27 3:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 2:56 Ma, Jianpeng
2020-04-27 3:06 ` Randy Dunlap [this message]
2020-04-27 3:35 ` Ma, Jianpeng
2020-04-27 3:39 ` Randy Dunlap
2020-04-27 21:47 ` kbuild test robot
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=768e4398-1789-8dfa-5883-effb566b2f31@infradead.org \
--to=rdunlap@infradead.org \
--cc=axboe@kernel.dk \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=jianpeng.ma@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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®