]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
resource: introduce is_type_match() helper and use it
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 25 Sep 2024 15:43:35 +0000 (18:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:55:11 +0000 (13:55 +0100)
commitd050ffbf22212cff6fc4acc06ba8eedcd0ca04a8
tree2a824a45d5930263186944f587e7c8841685932a
parent9a15982a2c099b25924b539e8727cfc39dbf1682
resource: introduce is_type_match() helper and use it

[ Upstream commit ba1eccc114ffc62c4495a5e15659190fa2c42308 ]

There are already a couple of places where we may replace a few lines of
code by calling a helper, which increases readability while deduplicating
the code.

Introduce is_type_match() helper and use it.

Link: https://lkml.kernel.org/r/20240925154355.1170859-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 6fb3acdebf65 ("Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/resource.c