Messages in this thread | | | Date | Wed, 2 Mar 2016 12:31:54 +0000 | From | One Thousand Gnomes <> | Subject | Re: [RESEND PATCH v3 5/6] power: cros_usbpd-charger: Add EC-based USB PD charger driver |
| |
> +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
| |