Attention is currently required from: Miklós Márton, Anastasia Klimchuk.
4 comments:
File ni845x_spi.c:
static int32 ni845x_spi_open_resource(char *resource_handle, uInt32 *opened_handle,
enum USB845x_type device_pid)
I am thinking, this could fit in one line: the hard limit for line length is 112 chars. […]
OK, It takes 113 chars - it's no big deal.
static int ni845x_spi_open(const char *serial, uInt32 *return_handle,
enum USB845x_type *device_pid)
this can be one line too
Done
Patch Set #2, Line 233: set_io_voltage_mV
Not sure you meant it: there is `set_io_voltage_mV` which is an existing second argument in the func […]
This second argument (`set_io_voltage_mV`) contains a pointer to `io_voltage_in_mV` global var. If we add one more argument to this function, it will be pointer to `io_voltage_in_mV` too! So, let's just use the second argument.
Code snippets that prove my words are below.
ni845x_spi.c:447:
```
if (usb8452_spi_set_io_voltage(flash->chip->voltage.max, &io_voltage_in_mV, USE_LOWER)) {
...
}
```
ni845x_spi.c:470:
```
if (usb8452_spi_set_io_voltage(flash->chip->voltage.min, &io_voltage_in_mV, USE_HIGHER)) {
...
}
```
ni845x_spi.c:619:
```
if (usb8452_spi_set_io_voltage(requested_io_voltage_mV, &io_voltage_in_mV, USE_LOWER) < 0) {
...
}
```
Patch Set #2, Line 290: if (set_io_voltage_mV)
Miklós, how about dropping this condition? Maybe not in this patch, but in the one of the next. This argument should contain a valid pointer when you call the function to get the IO voltage that was set. Or am I missing something?
To view, visit change 72154. To unsubscribe, or for help writing mail filters, visit settings.