Skip to content

Commit 6ddf12d

Browse files
committed
rpmsg: smd: Fix container_of macros
The container_of macros should not use the same name for the parameter as the member to use for lookup, as this will result in a compilation error unless the passed parameter has the same name as the member. Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 2bd9b43 commit 6ddf12d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/rpmsg/qcom_smd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ struct qcom_smd_endpoint {
167167
struct qcom_smd_channel *qsch;
168168
};
169169

170-
#define to_smd_device(_rpdev) container_of(_rpdev, struct qcom_smd_device, rpdev)
170+
#define to_smd_device(r) container_of(r, struct qcom_smd_device, rpdev)
171171
#define to_smd_edge(d) container_of(d, struct qcom_smd_edge, dev)
172-
#define to_smd_endpoint(ept) container_of(ept, struct qcom_smd_endpoint, ept)
172+
#define to_smd_endpoint(e) container_of(e, struct qcom_smd_endpoint, ept)
173173

174174
/**
175175
* struct qcom_smd_channel - smd channel struct

0 commit comments

Comments
 (0)