Skip to content

Commit

Permalink
rpmsg: smd: Fix container_of macros
Browse files Browse the repository at this point in the history
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 <bjorn.andersson@linaro.org>
  • Loading branch information
Bjorn Andersson committed Mar 28, 2018
1 parent 2bd9b43 commit 6ddf12d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/rpmsg/qcom_smd.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ struct qcom_smd_endpoint {
struct qcom_smd_channel *qsch;
};

#define to_smd_device(_rpdev) container_of(_rpdev, struct qcom_smd_device, rpdev)
#define to_smd_device(r) container_of(r, struct qcom_smd_device, rpdev)
#define to_smd_edge(d) container_of(d, struct qcom_smd_edge, dev)
#define to_smd_endpoint(ept) container_of(ept, struct qcom_smd_endpoint, ept)
#define to_smd_endpoint(e) container_of(e, struct qcom_smd_endpoint, ept)

/**
* struct qcom_smd_channel - smd channel struct
Expand Down

0 comments on commit 6ddf12d

Please sign in to comment.