io.h: drop unused headers
PATCH 1/1 io.h: drop unused headers
Drop unused headers and type declaration from io.h.
---
PS: I'm not very confident about this but thought I'd give it a try.
include/linux/io.h | 3 --- 1 file changed, 3 deletions(-)
include/linux/io.h +0 -3
@@ -9,13 +9,10 @@#include <linux/sizes.h> #include <linux/types.h> #include <linux/init.h> -#include <linux/bug.h> -#include <linux/err.h> #include <asm/io.h> #include <asm/page.h> struct device ; -struct resource ;#ifndef __iowrite32_copyvoid __iowrite32_copy (void __iomem *to,const void *from,size_t count);
base-commit: b16e9f8547a328b19af59afc213ce323124d11e9
Signature · 1 line
2.34.1
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Raag,
kernel test robot noticed the following build errors:
[auto build test ERROR on b16e9f8547a328b19af59afc213ce323124d11e9]
url: https://github.com/intel-lab-lkp/linux/commits/Raag-Jadav/io-h-drop-unused-headers/20250221-013530 base: b16e9f8547a328b19af59afc213ce323124d11e9 patch link: https://lore.kernel.org/r/20250220173305.2752125-1-raag.jadav%40intel.com patch subject: [PATCH v1] io.h: drop unused headers config: sparc-randconfig-001-20250221 (https://download.01.org/0day-ci/archive/20250221/[email protected]/config) compiler: sparc64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250221/[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/gpu/drm/drm_draw.c: In function 'drm_draw_color_from_xrgb8888':
>> drivers/gpu/drm/drm_draw.c:130:17: error: implicit declaration of function 'WARN_ONCE' [-Wimplicit-function-declaration]
130 | WARN_ONCE(1, "Can't convert to %p4cc\n", &format);
| ^~~~~~~~~vim +/WARN_ONCE +130 drivers/gpu/drm/drm_draw.c
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 93
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 94 /**
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 95 * drm_draw_color_from_xrgb8888 - convert one pixel from xrgb8888 to the desired format
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 96 * @color: input color, in xrgb8888 format
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 97 * @format: output format
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 98 *
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 99 * Returns:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 100 * Color in the format specified, casted to u32.
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 101 * Or 0 if the format is not supported.
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 102 */
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 103 u32 drm_draw_color_from_xrgb8888(u32 color, u32 format)
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 104 {
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 105 switch (format) {
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 106 case DRM_FORMAT_RGB565:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 107 return convert_xrgb8888_to_rgb565(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 108 case DRM_FORMAT_RGBA5551:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 109 return convert_xrgb8888_to_rgba5551(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 110 case DRM_FORMAT_XRGB1555:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 111 return convert_xrgb8888_to_xrgb1555(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 112 case DRM_FORMAT_ARGB1555:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 113 return convert_xrgb8888_to_argb1555(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 114 case DRM_FORMAT_RGB888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 115 case DRM_FORMAT_XRGB8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 116 return color;
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 117 case DRM_FORMAT_ARGB8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 118 return convert_xrgb8888_to_argb8888(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 119 case DRM_FORMAT_XBGR8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 120 return convert_xrgb8888_to_xbgr8888(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 121 case DRM_FORMAT_ABGR8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 122 return convert_xrgb8888_to_abgr8888(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 123 case DRM_FORMAT_XRGB2101010:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 124 return convert_xrgb8888_to_xrgb2101010(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 125 case DRM_FORMAT_ARGB2101010:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 126 return convert_xrgb8888_to_argb2101010(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 127 case DRM_FORMAT_ABGR2101010:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 128 return convert_xrgb8888_to_abgr2101010(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 129 default:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 @130 WARN_ONCE(1, "Can't convert to %p4cc\n", &format);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 131 return 0;
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 132 }
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 133 }
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 134 EXPORT_SYMBOL(drm_draw_color_from_xrgb8888);31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 135
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 19 lines · kernel test robot
Hi Raag,
kernel test robot noticed the following build errors:
[auto build test ERROR on
b16e9f8547a328b19af59afc213ce323124d11e9]url: https://github.com/intel-lab-lkp/linux/commits/Raag-Jadav/io-h-drop-unused-headers/20250221-013530 base: b16e9f8547a328b19af59afc213ce323124d11e9 patch link: https://lore.kernel.org/r/20250220173305.2752125-1-raag.jadav%40intel.com patch subject: [PATCH v1] io.h: drop unused headers config: sparc-randconfig-001-20250221 (https://download.01.org/0day-ci/archive/20250221/[email protected]/config) compiler: sparc64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250221/[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]/
Quoted 6 lines
All errors (new ones prefixed by >>):
drivers/gpu/drm/drm_draw.c: In function 'drm_draw_color_from_xrgb8888':Quoted 1 line
Quoted 1 line
drivers/gpu/drm/drm_draw.c:130:17: error: implicit declaration of function 'WARN_ONCE' [-Wimplicit-function-declaration]130 | WARN_ONCE(1, "Can't convert to %p4cc\n", &format); | ^~~~~~~~~
dwm_draw.c misses linux/bug.h.
Raag, please add it to your patch. But let's wait at least a week that CIs can collect more issues, if any, along with people, who want to test this change.
Signature · 2 lines
With Best Regards, Andy Shevchenko
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Raag,
kernel test robot noticed the following build errors:
[auto build test ERROR on b16e9f8547a328b19af59afc213ce323124d11e9]
url: https://github.com/intel-lab-lkp/linux/commits/Raag-Jadav/io-h-drop-unused-headers/20250221-013530 base: b16e9f8547a328b19af59afc213ce323124d11e9 patch link: https://lore.kernel.org/r/20250220173305.2752125-1-raag.jadav%40intel.com patch subject: [PATCH v1] io.h: drop unused headers config: nios2-randconfig-001-20250221 (https://download.01.org/0day-ci/archive/20250221/[email protected]/config) compiler: nios2-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250221/[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 error/warnings (new ones prefixed by >>):
drivers/gpu/drm/drm_draw.c: In function 'drm_draw_color_from_xrgb8888':
drivers/gpu/drm/drm_draw.c:130:17: error: implicit declaration of function 'WARN_ONCE' [-Wimplicit-function-declaration]
130 | WARN_ONCE(1, "Can't convert to %p4cc\n", &format);
| ^~~~~~~~~
drivers/gpu/drm/drm_draw.c: At top level:
>> drivers/gpu/drm/drm_draw.c:134:1: warning: data definition has no type or storage class
134 | EXPORT_SYMBOL(drm_draw_color_from_xrgb8888);
| ^~~~~~~~~~~~~
>> drivers/gpu/drm/drm_draw.c:134:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
>> drivers/gpu/drm/drm_draw.c:134:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:151:1: warning: data definition has no type or storage class
151 | EXPORT_SYMBOL(drm_draw_blit16);
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_draw.c:151:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/gpu/drm/drm_draw.c:151:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:173:1: warning: data definition has no type or storage class
173 | EXPORT_SYMBOL(drm_draw_blit24);
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_draw.c:173:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/gpu/drm/drm_draw.c:173:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:187:1: warning: data definition has no type or storage class
187 | EXPORT_SYMBOL(drm_draw_blit32);
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_draw.c:187:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/gpu/drm/drm_draw.c:187:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:202:1: warning: data definition has no type or storage class
202 | EXPORT_SYMBOL(drm_draw_fill16);
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_draw.c:202:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/gpu/drm/drm_draw.c:202:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:221:1: warning: data definition has no type or storage class
221 | EXPORT_SYMBOL(drm_draw_fill24);
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_draw.c:221:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/gpu/drm/drm_draw.c:221:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:233:1: warning: data definition has no type or storage class
233 | EXPORT_SYMBOL(drm_draw_fill32);
| ^~~~~~~~~~~~~ drivers/gpu/drm/drm_draw.c:233:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int] drivers/gpu/drm/drm_draw.c:233:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
vim +134 drivers/gpu/drm/drm_draw.c
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 93
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 94 /**
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 95 * drm_draw_color_from_xrgb8888 - convert one pixel from xrgb8888 to the desired format
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 96 * @color: input color, in xrgb8888 format
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 97 * @format: output format
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 98 *
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 99 * Returns:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 100 * Color in the format specified, casted to u32.
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 101 * Or 0 if the format is not supported.
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 102 */
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 103 u32 drm_draw_color_from_xrgb8888(u32 color, u32 format)
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 104 {
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 105 switch (format) {
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 106 case DRM_FORMAT_RGB565:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 107 return convert_xrgb8888_to_rgb565(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 108 case DRM_FORMAT_RGBA5551:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 109 return convert_xrgb8888_to_rgba5551(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 110 case DRM_FORMAT_XRGB1555:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 111 return convert_xrgb8888_to_xrgb1555(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 112 case DRM_FORMAT_ARGB1555:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 113 return convert_xrgb8888_to_argb1555(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 114 case DRM_FORMAT_RGB888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 115 case DRM_FORMAT_XRGB8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 116 return color;
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 117 case DRM_FORMAT_ARGB8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 118 return convert_xrgb8888_to_argb8888(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 119 case DRM_FORMAT_XBGR8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 120 return convert_xrgb8888_to_xbgr8888(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 121 case DRM_FORMAT_ABGR8888:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 122 return convert_xrgb8888_to_abgr8888(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 123 case DRM_FORMAT_XRGB2101010:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 124 return convert_xrgb8888_to_xrgb2101010(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 125 case DRM_FORMAT_ARGB2101010:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 126 return convert_xrgb8888_to_argb2101010(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 127 case DRM_FORMAT_ABGR2101010:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 128 return convert_xrgb8888_to_abgr2101010(color);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 129 default:
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 @130 WARN_ONCE(1, "Can't convert to %p4cc\n", &format);
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 131 return 0;
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 132 }
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 133 }
31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 @134 EXPORT_SYMBOL(drm_draw_color_from_xrgb8888);31fa2c1ca0b239 Jocelyn Falempe 2024-12-04 135
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 18 lines · kernel test robot
Hi Raag,
kernel test robot noticed the following build errors:
[auto build test ERROR on
b16e9f8547a328b19af59afc213ce323124d11e9]url: https://github.com/intel-lab-lkp/linux/commits/Raag-Jadav/io-h-drop-unused-headers/20250221-013530 base: b16e9f8547a328b19af59afc213ce323124d11e9 patch link: https://lore.kernel.org/r/20250220173305.2752125-1-raag.jadav%40intel.com patch subject: [PATCH v1] io.h: drop unused headers config: nios2-randconfig-001-20250221 (https://download.01.org/0day-ci/archive/20250221/[email protected]/config) compiler: nios2-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250221/[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]/
...
Quoted 9 lines
drivers/gpu/drm/drm_draw.c: At top level:Quoted 1 line
Quoted 1 line
drivers/gpu/drm/drm_draw.c:134:1: warning: data definition has no type or storage class134 | EXPORT_SYMBOL(drm_draw_color_from_xrgb8888); | ^~~~~~~~~~~~~Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/drm_draw.c:134:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]drivers/gpu/drm/drm_draw.c:134:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
drivers/gpu/drm/drm_draw.c:151:1: warning: data definition has no type or storage class151 | EXPORT_SYMBOL(drm_draw_blit16); | ^~~~~~~~~~~~~
I haven't looked deeply into this, but it might be the export.h is missing or it's just a followup of missing bug.h. In any case the io.h patch needs a prerequisite for dwm_draw.c to eliminate usage of "proxy" headers and follow IWYU principle. So, it will become a series of two. But as I said before, let's wait a bit longer.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 1 line · Raag Jadav
Drop unused headers and type declaration from
io.h.
FWIW,
...
Quoted 1 line
PS: I'm not very confident about this but thought I'd give it a try.
Sure, I like this change.
Signature · 2 lines
With Best Regards, Andy Shevchenko