Skip to content

Commit 7999096

Browse files
herbertxAl Viro
authored andcommitted
iov_iter: Move unnecessary inclusion of crypto/hash.h
The header file linux/uio.h includes crypto/hash.h which pulls in most of the Crypto API. Since linux/uio.h is used throughout the kernel this means that every tiny bit of change to the Crypto API causes the entire kernel to get rebuilt. This patch fixes this by moving it into lib/iov_iter.c instead where it is actually used. This patch also fixes the ifdef to use CRYPTO_HASH instead of just CRYPTO which does not guarantee the existence of ahash. Unfortunately a number of drivers were relying on linux/uio.h to provide access to linux/slab.h. This patch adds inclusions of linux/slab.h as detected by build failures. Also skbuff.h was relying on this to provide a declaration for ahash_request. This patch adds a forward declaration instead. Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 067c054 commit 7999096

File tree

14 files changed

+14
-2
lines changed

14 files changed

+14
-2
lines changed

arch/s390/lib/test_unwind.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/kallsyms.h>
1010
#include <linux/kthread.h>
1111
#include <linux/module.h>
12+
#include <linux/slab.h>
1213
#include <linux/string.h>
1314
#include <linux/kprobes.h>
1415
#include <linux/wait.h>

drivers/dma/sf-pdma/sf-pdma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/mod_devicetable.h>
2121
#include <linux/dma-mapping.h>
2222
#include <linux/of.h>
23+
#include <linux/slab.h>
2324

2425
#include "sf-pdma.h"
2526

drivers/dma/st_fdma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/platform_device.h>
1616
#include <linux/interrupt.h>
1717
#include <linux/remoteproc.h>
18+
#include <linux/slab.h>
1819

1920
#include "st_fdma.h"
2021

drivers/dma/uniphier-xdmac.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/of.h>
1313
#include <linux/of_dma.h>
1414
#include <linux/platform_device.h>
15+
#include <linux/slab.h>
1516

1617
#include "dmaengine.h"
1718
#include "virt-dma.h"

drivers/misc/uacce/uacce.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/iommu.h>
55
#include <linux/module.h>
66
#include <linux/poll.h>
7+
#include <linux/slab.h>
78
#include <linux/uacce.h>
89

910
static struct class *uacce_class;

drivers/mtd/mtdpstore.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/pstore_blk.h>
88
#include <linux/mtd/mtd.h>
99
#include <linux/bitops.h>
10+
#include <linux/slab.h>
1011

1112
static struct mtdpstore_context {
1213
int index;

drivers/mtd/nand/raw/cadence-nand-controller.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/mtd/rawnand.h>
1818
#include <linux/of_device.h>
1919
#include <linux/iopoll.h>
20+
#include <linux/slab.h>
2021

2122
/*
2223
* HPNFC can work in 3 modes:

drivers/remoteproc/qcom_q6v5_mss.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/reset.h>
2727
#include <linux/soc/qcom/mdt_loader.h>
2828
#include <linux/iopoll.h>
29+
#include <linux/slab.h>
2930

3031
#include "remoteproc_internal.h"
3132
#include "qcom_common.h"

drivers/soc/qcom/pdr_interface.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/kernel.h>
77
#include <linux/module.h>
8+
#include <linux/slab.h>
89
#include <linux/string.h>
910
#include <linux/workqueue.h>
1011

fs/btrfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (C) 2007 Oracle. All rights reserved.
44
*/
55

6+
#include <crypto/hash.h>
67
#include <linux/kernel.h>
78
#include <linux/bio.h>
89
#include <linux/buffer_head.h>

0 commit comments

Comments
 (0)