Attention is currently required from: Thomas Heijligen, Angel Pons, qianfan, Anastasia Klimchuk, Alexander Goncharov.
10 comments:
File ch347_spi.c:
struct ch347_spi_data {
struct libusb_device_handle *handle;
};
Place this declaration before `devs_ch347_spi` variable.
Done
if (ch347_data->handle == NULL)
return -1;
drop condition
Done
Patch Set #4, Line 72: ch347_data->handle = NULL;
in the next line of the code, we do `free(data)`, so there's no reason to care about this pointer
Done
Patch Set #4, Line 109: uint8_t buffer[CH347_PACKET_SIZE] = {0};
How about moving this variable to the rest of data? So the code will be after the data.
Done
struct libusb_device_handle *handle = NULL;
struct ch347_spi_data *ch347_data = calloc(1, sizeof(*ch347_data));
As far as you allocate `ch347_spi_data` at the beginning of initialization, you can drop `struct lib […]
Done
Please, use `1` value just to be consistency with other initialization functions.
Done
Same here, `1`
Done
Patch Set #4, Line 287: handle
ch347_data->handle = ... […]
Done
Same here, `1`
Done
Same here, `1`
Done
To view, visit change 70573. To unsubscribe, or for help writing mail filters, visit settings.