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/20240423192529.3249134-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Alain Volmat <alain.volmat@foss.st.com> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Jernej Skrabec <jernej.skrabec@gmail.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Rob Herring <robh@kernel.org> Cc: Samuel Holland <samuel@sholland.org> Cc: Sean Wang <sean.wang@mediatek.com> Cc: Sean Young <sean@mess.org> Cc: Stefani Seibold <stefani@seibold.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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

+7-2
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
* Copyright (C) 2009/2010 Stefani Seibold <stefani@seibold.net>
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

+2-1
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)