Skip to contentSkip to conversation

block:Remove including of the header file, linux/mm.h for the file, nvme-core.c

PATCH In review Nicholas Krause 3 participants 3 messages May 13, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block:Remove including of the header file, linux/mm.h for the file, nvme-core.c

This removes the include statement for including the header file, linux/mm.h in the file, nvme-core.c due this driver file never calling any functions from the header file, linux/mm.h and only adding bloat to this driver by including this unnessary header file.

Signed-off-by Nicholas Krause <xerofoify at gmail.com>
---
 drivers/block/nvme-core.c | 1 -
 1 file changed, 1 deletion(-)
drivers/block/nvme-core.c +0 -1
index 85b8036..8edf262 100644
@@ -29,7 +29,6 @@
 #include <linux/kdev_t.h>
 #include <linux/kthread.h>
 #include <linux/kernel.h>
-#include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/pci.h>
Signature · 1 line
2.1.4
#1 lore raw

Re: [PATCH] block:Remove including of the header file, linux/mm.h for the file,nvme-core.c

Quoted 5 lines · Nicholas Krause

This removes the include statement for including the header file, linux/mm.h in the file, nvme-core.c due this driver file never calling any functions from the header file, linux/mm.h and only adding bloat to this driver by including this unnessary header file.

Nick, I'm not going to apply this patch, simply because the effort of verifying that you haven't made a mistake is greater than the gain we might get from applying it. Your earlier patch shows that you haven't actually learned anything since I first heard about your patches. Please, continue learning before submitting more patches.

#2 lore raw

Re: [PATCH] block:Remove including of the header file, linux/mm.h for the file,nvme-core.c

Quoted 10 lines · Matthew Wilcox
Quoted 5 lines · Nicholas Krause

This removes the include statement for including the header file, linux/mm.h in the file, nvme-core.c due this driver file never calling any functions from the header file, linux/mm.h and only adding bloat to this driver by including this unnessary header file.

Nick, I'm not going to apply this patch, simply because the effort of verifying that you haven't made a mistake is greater than the gain we might get from applying it.

The driver does use functions defined in linux/mm.h: get_user_pages_fast is one of them. It compiles without including the header because another we include includes mm.h, but we don't want to depend on that!

Don't worry, I didn't waste time checking; I just happened to know that one off the top.