]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: Unify firmware node type checks
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 8 Dec 2024 16:03:16 +0000 (18:03 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 9 Dec 2024 13:14:19 +0000 (13:14 +0000)
commitb6ffe0e6147915fe3d31705e14dfbbecb724fb81
treee1c6bd16784f727f9641240d0810829d8b95c6db
parente5fca61fdfcdd7d3cc43c0b4c3b959d4f2b06666
spi: Unify firmware node type checks

The few functions are using different approaches on how to check for
the type of firmware node. Unify them to use a modern way of it.

With that in place it becomes obvious that no need to have independent
conditionals when they are dependent and hence the code generation can
be improved a little bit (clang-18, x86_64):

  add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-46 (-30)
  Total: Before=49801, After=49771, chg -0.06%

Meanwhile no functional changes intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241208195635.1271656-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c