media: cec: include linux/debugfs.h and linux/seq_file.h where needed
Subsystems (2)
PATCH 1/1 media: cec: include linux/debugfs.h and linux/seq_file.h where needed
Having cec.h include linux/debugfs.h leads to all users of all cec headers include and depend on debugfs.h and its dependencies for no reason. Drop the include from cec.h, and include debugfs.h and seq_file.h where needed.
Sort all the modified include lists while at it.
---
Depends on commit ae19ba915eb7 ("drm/i915/display: include media/cec-notifier.h and linux/debugfs.h where needed")
--- drivers/media/cec/core/cec-adap.c | 5 +++-- drivers/media/cec/core/cec-core.c | 5 +++-- drivers/media/cec/core/cec-pin.c | 3 ++- include/media/cec.h | 1 - 4 files changed, 8 insertions(+), 6 deletions(-)
drivers/media/cec/core/cec-adap.c +3 -2
@@ -7,12 +7,13 @@#include <linux/errno.h> #include <linux/init.h> -#include <linux/module.h> #include <linux/kernel.h> #include <linux/kmod.h> #include <linux/ktime.h> -#include <linux/slab.h> #include <linux/mm.h> +#include <linux/module.h> +#include <linux/seq_file.h> +#include <linux/slab.h> #include <linux/string.h> #include <linux/types.h>
drivers/media/cec/core/cec-core.c +3 -2
@@ -5,13 +5,14 @@* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ +#include <linux/debugfs.h> #include <linux/errno.h> #include <linux/init.h> -#include <linux/module.h> #include <linux/kernel.h> #include <linux/kmod.h> -#include <linux/slab.h> #include <linux/mm.h> +#include <linux/module.h> +#include <linux/slab.h> #include <linux/string.h> #include <linux/types.h>
drivers/media/cec/core/cec-pin.c +2 -1
@@ -4,8 +4,9 @@*/ #include <linux/delay.h> -#include <linux/slab.h> #include <linux/sched/types.h> +#include <linux/seq_file.h> +#include <linux/slab.h> #include <media/cec-pin.h> #include "cec-pin-priv.h"
include/media/cec.h +0 -1
@@ -10,7 +10,6 @@#include <linux/poll.h> #include <linux/fs.h> -#include <linux/debugfs.h> #include <linux/device.h> #include <linux/cdev.h> #include <linux/kthread.h>
Signature · 1 line
2.39.5
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Jani,
kernel test robot noticed the following build errors:
[auto build test ERROR on linuxtv-media-pending/master]
[also build test ERROR on linus/master sailus-media-tree/streams sailus-media-tree/master v6.12 next-20241128] [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/Jani-Nikula/media-cec-include-linux-debugfs-h-and-linux-seq_file-h-where-needed/20241128-120741 base: https://git.linuxtv.org/media-ci/media-pending.git master patch link: https://lore.kernel.org/r/20241127095308.3149411-1-jani.nikula%40intel.com patch subject: [PATCH] media: cec: include linux/debugfs.h and linux/seq_file.h where needed config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20241128/[email protected]/config) compiler: alpha-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/media/cec/core/cec-pin-error-inj.c: In function 'cec_pin_show_cmd':
>> drivers/media/cec/core/cec-pin-error-inj.c:243:17: error: implicit declaration of function 'seq_puts' [-Wimplicit-function-declaration]
243 | seq_puts(sf, "any,");
| ^~~~~~~~
>> drivers/media/cec/core/cec-pin-error-inj.c:245:17: error: implicit declaration of function 'seq_printf'; did you mean 'bstr_printf'? [-Wimplicit-function-declaration]
245 | seq_printf(sf, "0x%02x,", cmd);
| ^~~~~~~~~~
| bstr_printfvim +/seq_puts +243 drivers/media/cec/core/cec-pin-error-inj.c
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 239
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 240 static void cec_pin_show_cmd(struct seq_file *sf, u32 cmd, u8 mode)
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 241 {
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 242 if (cmd == CEC_ERROR_INJ_OP_ANY)
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 @243 seq_puts(sf, "any,");
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 244 else
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 @245 seq_printf(sf, "0x%02x,", cmd);
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 246 switch (mode) {
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 247 case CEC_ERROR_INJ_MODE_ONCE:
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 248 seq_puts(sf, "once ");
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 249 break;
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 250 case CEC_ERROR_INJ_MODE_ALWAYS:
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 251 seq_puts(sf, "always ");
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 252 break;
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 253 case CEC_ERROR_INJ_MODE_TOGGLE:
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 254 seq_puts(sf, "toggle ");
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 255 break;
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 256 default:
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 257 seq_puts(sf, "off ");
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 258 break;
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 259 }
22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 260 }22712b389e40ae drivers/media/cec/cec-pin-error-inj.c Hans Verkuil 2017-10-31 261
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 7 lines · Jani Nikula
Having
cec.hincludelinux/debugfs.hleads to all users of all cec headers include and depend ondebugfs.hand its dependencies for no reason. Drop the include fromcec.h, and includedebugfs.handseq_file.hwhere needed.Sort all the modified include lists while at it.
Quoted 8 lines
Cc Hans Verkuil <[email protected]>Signed-off-by Jani Nikula <[email protected]>---
Depends on commit
ae19ba915eb7("drm/i915/display: includemedia/cec-notifier.handlinux/debugfs.hwhere needed")
I'll resend after -rc1 and some backmerges.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Quoted 9 lines · Jani Nikula
Quoted 8 lines · Jani Nikula
Having
cec.hincludelinux/debugfs.hleads to all users of all cec headers include and depend ondebugfs.hand its dependencies for no reason. Drop the include fromcec.h, and includedebugfs.handseq_file.hwhere needed.Sort all the modified include lists while at it.
Cc Hans Verkuil <[email protected]>
That email no longer exists. Just use [email protected] or [email protected], either works, but I prefer my private email.
Regards,
Hans
Quoted 13 lines
Quoted 7 lines
Signed-off-by Jani Nikula <[email protected]>---
Depends on commit
ae19ba915eb7("drm/i915/display: includemedia/cec-notifier.handlinux/debugfs.hwhere needed")I'll resend after -rc1 and some backmerges.
BR,
Jani.
Quoted 6 lines · Hans Verkuil
Quoted 2 lines · Jani Nikula
Quoted 1 line · Jani Nikula
Cc Hans Verkuil <[email protected]>That email no longer exists. Just use [email protected] or [email protected], either works, but I prefer my private email.
Sure. It's just that [email protected] is still all over the place in MAINTAINERS in Linus' master.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Quoted 10 lines · Jani Nikula
Quoted 6 lines · Hans Verkuil
Quoted 2 lines · Jani Nikula
Quoted 1 line · Jani Nikula
Cc Hans Verkuil <[email protected]>That email no longer exists. Just use [email protected] or [email protected], either works, but I prefer my private email.
Sure. It's just that [email protected] is still all over the place in
MAINTAINERSin Linus' master.
I'm very sorry, just disregard my email.
I got confused with [email protected], that work email no longer exists.
A few days before I wrote that reply to you I had posted a patch removing the references to that old work email, and so that was still in my head.
Regards,
Hans
Quoted 5 lines
BR,
Jani.