]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soundwire: intel_init: use FIELD_{GET|PREP}
authorVinod Koul <vkoul@kernel.org>
Thu, 3 Sep 2020 11:45:03 +0000 (17:15 +0530)
committerVinod Koul <vkoul@kernel.org>
Fri, 4 Sep 2020 09:16:42 +0000 (14:46 +0530)
use FIELD_{GET|PREP} in intel_init driver to get/set field values
instead of open coding masks and shift operations.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200903114504.1202143-9-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel_init.c

index 65d9b9bd2106f183f1efbfed673ef4a7c37abfab..cabdadb09a1bba00debf210e768cbdf32c3e796e 100644 (file)
@@ -383,7 +383,7 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
         * Name(_ADR, 0x40000000), with bits 31..28 representing the
         * SoundWire link so filter accordingly
         */
-       if ((adr & GENMASK(31, 28)) >> 28 != SDW_LINK_TYPE)
+       if (FIELD_GET(GENMASK(31, 28), adr) != SDW_LINK_TYPE)
                return AE_OK; /* keep going */
 
        /* device found, stop namespace walk */