2019-05-19 13:08:55 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 17:54:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-12 14:40:14 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-07-11 16:31:08 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-07 09:58:04 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-12 19:55:26 -04:00
|
|
|
|
2010-08-04 12:11:22 +10:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-21 13:06:38 +01:00
|
|
|
|
2018-07-12 15:30:08 +03:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2016-06-27 15:17:19 -04:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-04 12:11:22 +10:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-08 09:33:00 +08:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-27 11:09:38 +09:30
|
|
|
|
2010-08-04 12:11:22 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-21 13:32:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-03-22 12:53:08 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-23 20:17:58 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-06-23 20:17:58 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-16 15:54:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2013-03-16 15:54:43 -04:00
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2013-03-16 15:54:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2013-03-16 15:54:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-16 15:55:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2013-03-16 15:55:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2013-03-16 15:55:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-07-05 16:48:50 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2007-06-23 20:17:58 -04:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
|
|
|
|
|
2006-03-20 13:44:08 -05:00
|
|
|
|
|
|
|
|
|
2013-08-26 19:23:04 -04:00
|
|
|
|
2018-09-27 13:12:44 -04:00
|
|
|
|
|
|
|
|
|
2005-06-22 17:16:23 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-23 10:46:47 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-20 13:44:08 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-06-23 10:46:47 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-10-14 10:40:29 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2009-12-03 08:10:17 -05:00
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-06-21 20:52:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-09 15:41:42 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-09 15:41:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2007-06-09 15:41:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2007-06-09 15:41:42 -04:00
|
|
|
|
2008-04-14 18:13:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-28 10:18:14 +10:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-10-28 15:21:41 -04:00
|
|
|
|
2008-04-14 18:13:37 -04:00
|
|
|
|
2013-08-28 10:18:14 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-10-28 15:21:41 -04:00
|
|
|
|
|
|
|
|
|
2010-05-13 12:51:06 -04:00
|
|
|
|
|
|
|
|
|
2018-10-14 10:34:31 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-13 12:51:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-04 15:56:57 +03:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2008-10-28 15:21:41 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
|
|
|
|
|
2014-07-21 13:32:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2013-08-28 10:18:14 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2013-08-28 10:18:14 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2013-08-28 10:18:14 +10:00
|
|
|
|
|
|
|
|
|
2014-07-21 13:32:42 -04:00
|
|
|
|
2013-08-28 10:18:14 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-11 15:07:46 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2014-07-21 13:32:42 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-21 20:51:54 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
2008-03-12 14:40:14 -04:00
|
|
|
|
|
|
|
|
|
2016-09-29 10:44:41 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
hlist: drop the node parameter from iterators
I'm not sure why, but the hlist for each entry iterators were conceived
list_for_each_entry(pos, head, member)
The hlist ones were greedy and wanted an extra parameter:
hlist_for_each_entry(tpos, pos, head, member)
Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.
Besides the semantic patch, there was some manual work required:
- Fix up the actual hlist iterators in linux/list.h
- Fix up the declaration of other iterators based on the hlist ones.
- A very small amount of places were using the 'node' parameter, this
was modified to use 'obj->member' instead.
- Coccinelle didn't handle the hlist_for_each_entry_safe iterator
properly, so those had to be fixed up manually.
The semantic patch which is mostly the work of Peter Senna Tschudin is here:
@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
type T;
expression a,c,d,e;
identifier b;
statement S;
@@
-T b;
<+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
...+>
[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 17:06:00 -08:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-12 13:28:26 -04:00
|
|
|
|
|
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
2016-04-21 20:51:54 -04:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
hlist: drop the node parameter from iterators
I'm not sure why, but the hlist for each entry iterators were conceived
list_for_each_entry(pos, head, member)
The hlist ones were greedy and wanted an extra parameter:
hlist_for_each_entry(tpos, pos, head, member)
Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.
Besides the semantic patch, there was some manual work required:
- Fix up the actual hlist iterators in linux/list.h
- Fix up the declaration of other iterators based on the hlist ones.
- A very small amount of places were using the 'node' parameter, this
was modified to use 'obj->member' instead.
- Coccinelle didn't handle the hlist_for_each_entry_safe iterator
properly, so those had to be fixed up manually.
The semantic patch which is mostly the work of Peter Senna Tschudin is here:
@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
type T;
expression a,c,d,e;
identifier b;
statement S;
@@
-T b;
<+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
...+>
[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 17:06:00 -08:00
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-12 13:28:26 -04:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
2007-06-23 19:55:31 -04:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
2018-10-14 10:34:31 -04:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-24 15:57:57 -04:00
|
|
|
|
2014-07-21 13:32:42 -04:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
2009-11-29 16:55:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-01 12:19:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-24 15:55:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-02-01 12:18:36 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-11-14 10:39:18 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-11-14 10:39:18 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-11-14 10:39:18 +11:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
2006-02-01 12:18:36 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2014-06-12 15:02:32 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-23 19:55:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-23 19:45:36 -04:00
|
|
|
|
2018-10-14 10:34:31 -04:00
|
|
|
|
2007-06-23 19:55:31 -04:00
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
2007-06-23 19:55:31 -04:00
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
2007-06-23 19:55:31 -04:00
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2007-06-23 19:55:31 -04:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2009-09-15 13:32:13 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-27 14:29:04 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-03-07 10:41:44 +11:00
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-12 12:12:16 -04:00
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-07 10:41:44 +11:00
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2009-09-15 13:32:13 -04:00
|
|
|
|
2008-03-12 12:12:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
2009-09-15 13:32:13 -04:00
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-15 13:32:13 -04:00
|
|
|
|
|
|
|
|
|
2022-03-07 10:41:44 +11:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-07 10:41:44 +11:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2018-12-03 11:30:30 +11:00
|
|
|
|
|
|
|
|
|
2008-03-12 16:20:55 -04:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-16 17:42:42 -04:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-16 17:42:42 -04:00
|
|
|
|
|
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2018-10-14 10:34:31 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2018-10-14 10:34:31 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-14 10:34:31 -04:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
2009-12-03 08:10:17 -05:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
2009-12-03 08:10:17 -05:00
|
|
|
|
2018-10-11 16:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-07-14 15:39:59 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-14 14:59:18 +00:00
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
2010-12-14 14:59:18 +00:00
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
2010-12-14 14:59:18 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-06 16:05:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-14 14:59:29 +00:00
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
2010-12-14 14:59:29 +00:00
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
2010-12-14 14:59:29 +00:00
|
|
|
|
|
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-11 11:24:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-08-14 13:50:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-24 18:00:46 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-03 11:51:19 +00:00
|
|
|
|
2005-11-01 16:53:32 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2007-06-25 10:15:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:08 -04:00
|
|
|
|
2007-06-25 10:15:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2023-09-11 17:44:17 +08:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-11 17:44:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-03 11:30:31 +11:00
|
|
|
|
2023-09-11 17:44:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
|
|
|
|
|
2010-09-29 14:16:57 +10:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|
2010-07-31 14:29:07 -04:00
|
|
|
|
2023-09-11 17:44:17 +08:00
|
|
|
|
2007-06-25 17:11:20 -04:00
|
|
|
|