]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rpmsg: smd: Fix container_of macros
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 27 Mar 2018 21:06:41 +0000 (14:06 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 28 Mar 2018 04:54:35 +0000 (21:54 -0700)
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>
drivers/rpmsg/qcom_smd.c

index b062e9d6e25fb26d534463cb0480649cfd56c99b..35089039a33550e5810fd2f9385debbc3abfb7ba 100644 (file)
@@ -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