Re: [RESEND PATCH v3 5/6] power: cros_usbpd-charger: Add EC-based USB PD charger driver

From: One Thousand Gnomes
Date: Wed Mar 02 2016 - 07:32:46 EST



> +static int ec_command(struct cros_ec_dev *ec_dev, int version, int command,
> + uint8_t *outdata, int outsize, uint8_t *indata,
> + int insize)
> +{

int is a very odd type to use for sizes that cannot be negative,
especially given all your callers use sizeof() which is a size_t and is
not necessarily an int type and you then pass it to memcpy which expects
a size_t anyway


Alan