Re: [PATCH 4.19.y-cip 2/7] memory: add Renesas RPC-IF driver

Pavel Machek


+void rpcif_enable_rpm(struct rpcif *rpc)
+ pm_runtime_enable(rpc->dev);
+void rpcif_disable_rpm(struct rpcif *rpc)
+ pm_runtime_put_sync(rpc->dev);
Should these go to header as static inlines?
Would be nice will make them inline and squash it in the current
For this series, maybe squashing is not neccessary. It is pretty good

+static int wait_msg_xfer_end(struct rpcif *rpc)
+ u32 sts;
+ return regmap_read_poll_timeout(rpc->regmap, RPCIF_CMNSR, sts,
+ sts & RPCIF_CMNSR_TEND, 0,
This can't be right. sts is used uninitialized here.
Third parameter in regmap_read_poll_timeout() is the variable in which value is read and the fourth parameter condition has to be tied with the third parameter (there are similar instance in the kernel).
Okay, that's some rather evil code. It should really be
REGMAP_READ_POLL_TIMEOUT, because it is macro with weird semantics.

Best regards,
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Join to automatically receive all group messages.