diff mbox series

hte: tegra-194: Use proper includes

Message ID 20230113094747.247427-1-linus.walleij@linaro.org
State New
Headers show
Series hte: tegra-194: Use proper includes | expand

Commit Message

Linus Walleij Jan. 13, 2023, 9:47 a.m. UTC
The test driver uses the gpiod consumer API so include the right
<linux/gpio/consumer.h> header. This may cause a problem with
struct of_device_id being implcitly pulled in by the legacy
header <linux/gpio.h> so include <linux/mod_device_table.h>
explicitly as well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/hte/hte-tegra194-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

kernel test robot Jan. 14, 2023, 11:24 a.m. UTC | #1
Hi Linus,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.2-rc3 next-20230113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Linus-Walleij/hte-tegra-194-Use-proper-includes/20230113-175333
patch link:    https://lore.kernel.org/r/20230113094747.247427-1-linus.walleij%40linaro.org
patch subject: [PATCH] hte: tegra-194: Use proper includes
config: arm64-defconfig
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/9ec0eb38cf8e783c9527d8799556313115839bb8
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Linus-Walleij/hte-tegra-194-Use-proper-includes/20230113-175333
        git checkout 9ec0eb38cf8e783c9527d8799556313115839bb8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/hte/hte-tegra194-test.c:9:10: fatal error: linux/mod_device_table.h: No such file or directory
       9 | #include <linux/mod_device_table.h>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.


vim +9 drivers/hte/hte-tegra194-test.c

   > 9	#include <linux/mod_device_table.h>
    10	#include <linux/module.h>
    11	#include <linux/moduleparam.h>
    12	#include <linux/interrupt.h>
    13	#include <linux/gpio/consumer.h>
    14	#include <linux/timer.h>
    15	#include <linux/platform_device.h>
    16	#include <linux/workqueue.h>
    17	#include <linux/hte.h>
    18
diff mbox series

Patch

diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c
index 5d776a185bd6..a255ec3f8e8d 100644
--- a/drivers/hte/hte-tegra194-test.c
+++ b/drivers/hte/hte-tegra194-test.c
@@ -6,10 +6,11 @@ 
  */
 
 #include <linux/err.h>
+#include <linux/mod_device_table.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/interrupt.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/timer.h>
 #include <linux/platform_device.h>
 #include <linux/workqueue.h>