Patch Set 2: Code-Review-1
(2 comments)
2 comments:
File src/drivers/vpd/vpd_fsp.c:
Patch Set #2, Line 26: || value_len != 1
Why does value_len need to be passed in at all? It's not used elsewhere in this function. […]
In case of binary type variable, it is good to check the value length; this will find out situation where "HyperThreading" is set to "12", instead of "1".
This function set_upd_bool() is the first function for checking/setting a specific UPD data type, more will be added, and thus keeping the input parameters related to key/value the same makes sense.
This group of function is called in the callback as defined in src/drivers/vpd/vpd_decode.h, which has those input parameters related to key/value pair:
/* Callback for vpd_decode_string to invoke. */
typedef int vpd_decode_callback(
const u8 *key, u32 key_len, const u8 *value, u32 value_len,
void *arg);
else
return false;
}
There's some controversy in the community about braces, but the current style guide dictates (basica […]
Done
To view, visit change 34634. To unsubscribe, or for help writing mail filters, visit settings.