Re: [PATCH 2/3] mfd: cros_ec: add debugfs, console log file
From: Doug Anderson
Date: Wed Feb 22 2017 - 16:49:21 EST
Hi,
I'm not sure what happened to this patch, but I found it when making
sure that the bugfix pointed out in
<https://chromium-review.googlesource.com/c/444085/3/drivers/platform/chrome/cros_ec_debugfs.c#240>.
Presumably someone will want to pick it up eventually? +Benson
On Mon, Aug 22, 2016 at 9:34 PM, Nicolas Boichat <drinkcat@xxxxxxxxxxxx> wrote:
> +static int ec_read_version_supported(struct cros_ec_dev *ec)
> +{
> + struct ec_params_get_cmd_versions_v1 *params;
> + struct ec_response_get_cmd_versions *response;
> + int ret;
> +
> + struct cros_ec_command *msg;
> +
> + msg = kzalloc(sizeof(*msg) + max(sizeof(params), sizeof(response)),
> + GFP_KERNEL);
> + if (!msg)
> + return 0;
> +
> + msg->command = EC_CMD_GET_CMD_VERSIONS + ec->cmd_offset;
> + msg->outsize = sizeof(params);
> + msg->insize = sizeof(response);
The above sizeof() calls are wrong. They need "*"