Skip to content

Commit 22bcc91

Browse files
andy-shevakpm00
authored andcommitted
kfifo: don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use) principle. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Cc: Alain Volmat <[email protected]> Cc: AngeloGioacchino Del Regno <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Hans Verkuil <[email protected]> Cc: Jernej Skrabec <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Rob Herring <[email protected]> Cc: Samuel Holland <[email protected]> Cc: Sean Wang <[email protected]> Cc: Sean Young <[email protected]> Cc: Stefani Seibold <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 495ae16 commit 22bcc91

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

include/linux/kfifo.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@
3636
* to lock the reader.
3737
*/
3838

39-
#include <linux/kernel.h>
39+
#include <linux/array_size.h>
4040
#include <linux/spinlock.h>
4141
#include <linux/stddef.h>
42-
#include <linux/scatterlist.h>
42+
#include <linux/types.h>
43+
44+
#include <asm/barrier.h>
45+
#include <asm/errno.h>
46+
47+
struct scatterlist;
4348

4449
struct __kfifo {
4550
unsigned int in;

lib/kfifo.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
* Copyright (C) 2009/2010 Stefani Seibold <[email protected]>
66
*/
77

8-
#include <linux/kernel.h>
9-
#include <linux/export.h>
10-
#include <linux/slab.h>
118
#include <linux/err.h>
9+
#include <linux/export.h>
10+
#include <linux/kfifo.h>
1211
#include <linux/log2.h>
12+
#include <linux/scatterlist.h>
13+
#include <linux/slab.h>
1314
#include <linux/uaccess.h>
14-
#include <linux/kfifo.h>
1515

1616
/*
1717
* internal helper to calculate the unused elements in a fifo

samples/kfifo/dma-example.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
*/
77

88
#include <linux/init.h>
9-
#include <linux/module.h>
109
#include <linux/kfifo.h>
10+
#include <linux/module.h>
11+
#include <linux/scatterlist.h>
1112

1213
/*
1314
* This module shows how to handle fifo dma operations.

0 commit comments

Comments
 (0)