]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cam_periph: switch from negative logic to positive logic
authorWarner Losh <imp@FreeBSD.org>
Fri, 5 Nov 2021 14:56:22 +0000 (08:56 -0600)
committerWarner Losh <imp@FreeBSD.org>
Fri, 5 Nov 2021 14:56:22 +0000 (08:56 -0600)
commitbee0133fb937e519623324fd1ae7214d59a03aca
tree88099573e6ce5fc751e2e7a508236f66e0fffb6b
parent00f79c97a4f265f8d653a11fdb764cd999b7d0a9
cam_periph: switch from negative logic to positive logic

When scanning the resources that are wired for this driver, skip any
that whose number doesn't match newunit. They aren't relevant. Switch to
positive logic to break out of the loop (and thus go to the next unit)
if we find either a target resource or an at resource. This makes the
code easier to read and modify.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D32681
sys/cam/cam_periph.c