Masahiro Yamada
630f289b71
asm-generic: make more kernel-space headers mandatory
...
Change a header to mandatory-y if both of the following are met:
[1] At least one architecture (except um) specifies it as generic-y in
arch/*/include/asm/Kbuild
[2] Every architecture (except um) either has its own implementation
(arch/*/include/asm/*.h) or specifies it as generic-y in
arch/*/include/asm/Kbuild
This commit was generated by the following shell script.
----------------------------------->8-----------------------------------
arches=$(cd arch; ls -1 | sed -e '/Kconfig/d' -e '/um/d')
tmpfile=$(mktemp)
grep "^mandatory-y +=" include/asm-generic/Kbuild > $tmpfile
find arch -path 'arch/*/include/asm/Kbuild' |
xargs sed -n 's/^generic-y += \(.*\)/\1/p' | sort -u |
while read header
do
mandatory=yes
for arch in $arches
do
if ! grep -q "generic-y += $header" arch/$arch/include/asm/Kbuild &&
! [ -f arch/$arch/include/asm/$header ]; then
mandatory=no
break
fi
done
if [ "$mandatory" = yes ]; then
echo "mandatory-y += $header" >> $tmpfile
for arch in $arches
do
sed -i "/generic-y += $header/d" arch/$arch/include/asm/Kbuild
done
fi
done
sed -i '/^mandatory-y +=/d' include/asm-generic/Kbuild
LANG=C sort $tmpfile >> include/asm-generic/Kbuild
----------------------------------->8-----------------------------------
One obvious benefit is the diff stat:
25 files changed, 52 insertions(+), 557 deletions(-)
It is tedious to list generic-y for each arch that needs it.
So, mandatory-y works like a fallback default (by just wrapping
asm-generic one) when arch does not have a specific header
implementation.
See the following commits:
def3f7cefe
a1b39bae16
It is tedious to convert headers one by one, so I processed by a shell
script.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Cc: Michal Simek <michal.simek@xilinx.com >
Cc: Christoph Hellwig <hch@lst.de >
Cc: Arnd Bergmann <arnd@arndb.de >
Link: http://lkml.kernel.org/r/20200210175452.5030-1-masahiroy@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2020-04-02 09:35:25 -07:00
..
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2013-02-01 10:00:22 +01:00
2019-05-30 11:29:20 -07:00
2020-03-19 13:12:27 +01:00
2019-06-19 17:09:55 +02:00
2020-03-19 13:12:27 +01:00
2020-03-24 15:53:47 +01:00
2019-07-25 22:10:05 -07:00
2018-12-31 07:12:35 -08:00
2018-06-24 09:27:27 -07:00
2019-08-06 14:29:30 -07:00
2019-05-21 11:28:39 +02:00
2017-11-02 11:10:55 +01:00
2019-09-03 14:20:54 +01:00
2020-03-19 13:12:27 +01:00
2019-07-23 14:33:44 -07:00
2019-10-09 14:55:57 -07:00
2020-03-19 13:12:27 +01:00
2019-07-23 14:33:44 -07:00
2020-03-19 13:12:27 +01:00
2019-07-23 14:33:44 -07:00
2018-06-24 09:27:27 -07:00
2019-07-30 10:41:54 -07:00
2020-03-19 13:12:27 +01:00
2020-03-19 13:12:27 +01:00
2019-11-11 10:45:00 -08:00
2019-11-11 10:44:56 -08:00
2020-03-25 16:07:12 +01:00
2020-03-19 13:12:27 +01:00
2017-07-11 14:13:06 +02:00
2016-09-13 16:45:15 +02:00
2020-03-19 13:12:27 +01:00
2020-03-19 13:12:27 +01:00
2019-07-23 14:33:44 -07:00
2019-05-24 17:36:45 +02:00
2020-03-19 13:12:27 +01:00
2019-07-23 14:33:44 -07:00
2020-03-19 13:12:27 +01:00
2019-07-23 14:33:44 -07:00
2019-05-30 11:26:32 -07:00
2019-07-23 14:33:44 -07:00
2020-03-19 13:12:27 +01:00
2020-03-19 13:12:27 +01:00
2019-05-30 11:29:20 -07:00
2018-08-08 09:48:32 -07:00
2020-02-12 13:50:33 -08:00
2020-01-09 15:30:53 -08:00
2019-11-01 14:58:56 -07:00
2019-05-30 11:26:35 -07:00
2020-01-24 11:37:45 -08:00
2019-06-19 17:09:55 +02:00
2020-03-21 15:24:02 +01:00
2019-05-30 11:26:35 -07:00
2019-05-09 16:39:27 -07:00
2017-03-02 08:42:37 +01:00
2019-07-23 14:33:51 -07:00
2014-01-22 20:19:02 +01:00
2010-08-05 13:26:02 +01:00
2018-10-15 23:11:13 -07:00
2009-12-12 13:08:14 +01:00
2018-08-10 17:27:51 -07:00
2018-10-15 23:11:14 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-12-08 14:37:34 +01:00
2019-10-07 09:42:36 -07:00
2019-10-07 09:43:08 -07:00
2015-10-26 09:49:41 +01:00
2019-10-07 09:42:58 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-10-23 21:07:28 -07:00
2020-01-09 09:48:42 -08:00
2017-06-29 02:42:26 +02:00
2013-02-20 18:24:24 +01:00
2017-11-02 11:10:55 +01:00
2019-10-07 09:38:53 -07:00
2017-08-07 12:01:17 +02:00
2019-02-07 12:59:45 -08:00
2016-05-13 14:02:14 +02:00
2015-11-05 11:15:41 +01:00
2015-09-03 12:07:52 +02:00
2019-01-03 18:57:57 -08:00
2017-11-02 11:10:55 +01:00
2020-03-21 15:23:55 +01:00
2017-11-02 11:10:55 +01:00
2019-11-01 14:36:44 -07:00
2017-11-17 11:54:55 -08:00
2020-01-03 09:32:51 +01:00
2018-11-07 16:26:42 -08:00
2019-10-31 15:03:10 -07:00
2020-01-22 15:56:08 -08:00
2018-12-05 14:46:44 -08:00
2019-11-27 10:27:45 -08:00
2020-01-22 15:56:08 -08:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2012-10-16 22:20:03 +02:00
2009-05-14 13:50:29 +01:00
2018-09-20 09:01:15 +02:00
2019-11-20 20:31:40 +01:00
2019-02-13 19:12:33 +01:00
2017-11-02 11:10:55 +01:00
2020-03-23 15:44:05 +01:00
2019-05-21 11:28:39 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2018-11-09 10:23:19 -08:00
2020-03-19 13:09:33 +01:00
2012-10-09 09:47:14 +01:00
2014-08-26 02:18:56 +02:00
2012-03-28 18:30:02 +01:00
2017-11-02 11:10:55 +01:00
2008-10-11 16:18:52 +01:00
2019-11-22 10:51:22 -08:00
2017-08-30 00:57:29 +02:00
2014-11-07 15:07:36 +01:00
2019-05-30 11:29:20 -07:00
2019-05-30 11:26:32 -07:00
2014-10-24 02:38:33 +02:00
2020-03-27 23:58:51 -04:00
2019-05-22 18:45:52 -07:00
2020-01-13 10:55:40 -08:00
2019-05-30 11:29:20 -07:00
2009-09-17 20:07:48 +02:00
2020-01-23 10:26:48 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-26 16:26:34 -07:00
2011-07-26 16:49:47 -07:00
2020-03-25 10:56:43 +01:00
2008-10-11 16:18:52 +01:00
2017-11-02 11:10:55 +01:00
2013-05-09 17:55:20 +02:00
2020-01-06 09:45:59 +01:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:39 +02:00
2019-05-30 11:26:32 -07:00
2017-07-11 14:13:06 +02:00
2020-01-23 10:26:16 -08:00
2018-03-09 11:22:45 +00:00
2017-11-02 11:10:55 +01:00
2013-02-01 10:00:22 +01:00
2018-12-06 06:56:38 -08:00
2019-04-09 16:21:30 -07:00
2020-04-02 09:35:25 -07:00
2017-11-02 11:10:55 +01:00
2019-06-19 17:09:06 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-07-16 19:23:22 -07:00
2019-02-20 22:48:32 +01:00
2018-03-06 18:40:44 +01:00
2017-11-02 11:10:55 +01:00
2019-10-07 09:42:55 -07:00
2020-01-23 10:21:53 -08:00
2017-11-02 11:10:55 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2018-05-14 23:58:23 +01:00
2008-10-11 16:18:52 +01:00
2019-06-19 17:09:55 +02:00
2017-11-02 11:10:55 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-29 19:36:53 +08:00
2016-04-03 12:32:09 +02:00
2018-11-09 10:23:19 -08:00
2017-11-02 11:10:55 +01:00
2020-01-22 15:56:08 -08:00
2019-04-08 12:00:28 +01:00
2019-02-04 10:56:41 -08:00
2019-02-04 10:56:41 -08:00
2018-11-21 19:54:59 -08:00
2019-11-11 10:43:13 -08:00
2019-05-30 11:26:32 -07:00
2013-02-01 10:00:22 +01:00
2017-11-02 11:10:55 +01:00
2014-11-24 07:45:36 +01:00
2019-07-12 15:13:55 -07:00
2019-08-08 15:12:07 -05:00
2019-06-19 17:09:55 +02:00
2019-11-22 10:51:22 -08:00
2019-11-22 10:51:22 -08:00
2019-11-22 10:51:22 -08:00
2019-09-20 14:55:07 -07:00
2020-02-04 03:05:24 +00:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2009-03-11 21:11:07 +01:00
2020-03-31 08:51:45 -07:00
2019-06-19 17:09:55 +02:00
2019-07-01 17:51:40 +02:00
2012-08-17 10:57:28 +02:00
2019-10-31 15:03:10 -07:00
2008-10-11 16:18:52 +01:00
2014-08-02 00:06:38 +02:00
2013-02-01 10:00:22 +01:00
2014-01-22 20:19:02 +01:00
2017-11-02 11:10:55 +01:00
2018-07-17 09:40:17 -07:00
2019-10-23 21:10:34 -07:00
2019-10-09 14:55:51 -07:00
2013-02-01 10:00:22 +01:00
2014-06-26 10:48:18 +01:00
2016-08-06 09:13:11 -04:00
2018-08-01 13:20:15 -07:00
2019-05-30 11:26:32 -07:00
2019-02-19 12:46:03 -08:00
2018-09-22 10:31:50 -07:00
2020-03-05 16:47:35 +01:00
2012-10-09 09:47:14 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-04-08 12:00:28 +01:00
2017-11-02 11:10:55 +01:00
2018-11-09 10:23:19 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-10-09 12:48:05 -07:00
2019-06-03 11:49:37 +02:00
2020-02-15 12:44:03 -08:00
2019-08-11 21:44:30 -07:00
2019-01-03 18:57:57 -08:00
2020-01-02 16:41:16 -08:00
2019-05-30 11:26:32 -07:00
2014-05-30 18:21:30 +02:00
2019-04-03 10:32:54 +02:00
2015-09-03 12:07:45 +02:00
2018-08-10 17:27:53 -07:00
2019-02-04 10:56:24 -08:00
2017-11-02 11:10:55 +01:00
2017-08-30 00:57:26 +02:00
2019-05-30 11:26:32 -07:00
2015-06-21 21:52:50 +02:00
2008-10-11 16:18:52 +01:00
2013-02-01 10:00:22 +01:00
2014-11-24 22:47:31 +01:00
2019-03-04 10:50:14 -08:00
2019-03-19 15:26:06 -07:00
2019-10-02 14:06:41 -07:00
2019-10-10 14:01:47 -07:00
2016-10-07 18:46:30 -07:00
2019-07-25 21:45:05 -07:00
2017-11-02 11:10:55 +01:00
2019-12-10 10:12:55 +01:00
2015-08-26 15:23:40 +02:00
2019-07-23 14:33:44 -07:00
2016-05-09 12:00:02 +02:00
2008-10-11 16:18:52 +01:00
2019-05-30 11:26:32 -07:00