From: Vinod Koul Date: Thu, 3 Sep 2020 11:44:58 +0000 (+0530) Subject: soundwire: slave: use SDW_DISCO_LINK_ID() X-Git-Tag: v5.10-rc1~124^2~82^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd6a024f21ceb37025dfd584f59cfeba850c8e02;p=thirdparty%2Flinux.git soundwire: slave: use SDW_DISCO_LINK_ID() use SDW_DISCO_LINK_ID() in slave code to extract field values instead of open coding masks and shift operations to extract link_id Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-4-vkoul@kernel.org Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index a762ee24e6fae..2191dd6e7aa49 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -106,7 +106,7 @@ static bool find_slave(struct sdw_bus *bus, } /* Extract link id from ADR, Bit 51 to 48 (included) */ - link_id = (addr >> 48) & GENMASK(3, 0); + link_id = SDW_DISCO_LINK_ID(addr); /* Check for link_id match */ if (link_id != bus->link_id)