On Mon, Apr 07, 2025 at 01:42:07PM -0600, Gustavo A. R. Silva wrote: > > > > > > + msg->command = EC_CMD_HANG_DETECT; > > > + msg->insize = (arg->req.command == EC_HANG_DETECT_CMD_GET_STATUS) ? > > > + sizeof(struct ec_response_hang_detect) : > > > + 0; > > > + msg->outsize = sizeof(struct ec_params_hang_detect); > > > + *(struct ec_params_hang_detect *)msg->data = arg->req; > > > + > > > + ret = cros_ec_cmd_xfer_status(cros_ec, msg); > > > if (ret < 0) > > > return ret; > > > - arg->resp = buf.data.resp; > > > + arg->resp = *(struct ec_response_hang_detect *)msg->data; > > > > msg->data used twice and a "sizeof()" earlier... might be nicer to have > > an explicit pointer? > > Those are two different pointers: > > *(struct ec_params_hang_detect *)msg->data = arg->req; > arg->resp = *(struct ec_response_hang_detect *)msg->data;
Argh. I did it again. I can't see "params" vs "response". q_q Sorry for the noise! Reviewed-by: Kees Cook <[email protected]> -- Kees Cook
