]> git.baikalelectronics.ru Git - kernel.git/commit
arch_topology: Check for non-negative value rather than -1 for IDs validity
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 10:15:58 +0000 (11:15 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 15:22:29 +0000 (16:22 +0100)
commit1d0aeb39015471167bf20cab1946465b4b4e8e5c
tree56ae2ad394ffabdee80fa6a2d11171c43c6b481f
parent9a273de091610b85446d33b8c86f252ab1bd4bf7
arch_topology: Check for non-negative value rather than -1 for IDs validity

Instead of just comparing the cpu topology IDs with -1 to check their
validity, improve that by checking for a valid non-negative value.

Link: https://lore.kernel.org/r/20220704101605.1318280-15-sudeep.holla@arm.com
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Ionela Voinescu <ionela.voinescu@arm.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/base/arch_topology.c