]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i3c: master: Replace hard code 2 with macro I3C_ADDR_SLOT_STATUS_BITS
authorFrank Li <Frank.Li@nxp.com>
Mon, 21 Oct 2024 15:45:06 +0000 (11:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:12 +0000 (20:03 +0100)
commit815d8f0e524f73ea58c3a332bdd583a491ea52b5
treeaaece8e1acfbaec9c0c1d67b6a832ca544fd092c
parent8e9fec7f79ad62bab021333bee1bfec74be6d978
i3c: master: Replace hard code 2 with macro I3C_ADDR_SLOT_STATUS_BITS

[ Upstream commit 16aed0a6520ba01b7d22c32e193fc1ec674f92d4 ]

Replace the hardcoded value 2, which indicates 2 bits for I3C address
status, with the predefined macro I3C_ADDR_SLOT_STATUS_BITS.

Improve maintainability and extensibility of the code.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20241021-i3c_dts_assign-v8-1-4098b8bde01e@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Stable-dep-of: 851bd21cdb55 ("i3c: master: Fix dynamic address leak when 'assigned-address' is present")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i3c/master.c
include/linux/i3c/master.h