Skip to content

Commit fccf691

Browse files
XenuIsWatchingDevansh0210
authored andcommitted
drivers: i3c: cdns: use SIZEOF_FIELD
Use the SIZEOF_FIELD macro to make things look prettier. Signed-off-by: Ryan McClelland <[email protected]>
1 parent ad1ff45 commit fccf691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i3c/i3c_cdns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,9 +1804,9 @@ static void cdns_i3c_complete_transfer(const struct device *dev)
18041804
* time which will be returned.
18051805
*/
18061806
if ((*data->xfer.cmds[i].num_xfer !=
1807-
sizeof(((union i3c_ccc_getmxds *)0)->fmt1)) &&
1807+
SIZEOF_FIELD(union i3c_ccc_getmxds, fmt1)) &&
18081808
(*data->xfer.cmds[i].num_xfer !=
1809-
sizeof(((union i3c_ccc_getmxds *)0)->fmt2))) {
1809+
SIZEOF_FIELD(union i3c_ccc_getmxds, fmt2))) {
18101810
ret = -EIO;
18111811
}
18121812
} else if (ccc == I3C_CCC_GETCAPS) {

0 commit comments

Comments
 (0)