lkml.org 
[lkml]   [2016]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2016-03-02 14:01    [W:0.075 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site