-
Notifications
You must be signed in to change notification settings - Fork 356
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor issues (mostly wrong indentation) to fix and we'll be ready to go.
08836ac
to
b4691dd
Compare
PR cleaned up -- dropped extra changes from commits. |
Alexander: I went through the PR and noticed a few more issues I want to address, including a bad cherry-pick merge. I'll reply to this PR when it's worth your time to look at again. |
b4691dd
to
74fffab
Compare
Alexander, I believe I have addressed the one outstanding comment from you, and the dozen or so new comments I made where I noticed unrelated lines being modified. This was a side effect of not perfect cherry-picking onto a new branch after the original patches were all based on a fairly substantial alignment cleanup. |
fdfd5a2
to
0bb7d1b
Compare
Rebased the branch onto 0ca9c66 |
0bb7d1b
to
c7b6c9f
Compare
Alexander, I removed the last unrelated change (the merging of two conditions). PTAL at your convenience. |
Fixup the following array bounds checking bugs: [lib/ipmi_fru.c:1003]: (style) Array index 'i' is used before limits check. [lib/ipmi_fru.c:1127]: (style) Array index 'i' is used before limits check. [lib/ipmi_fru.c:1262]: (style) Array index 'i' is used before limits check. Signed-off-by: Patrick Venture <venture@google.com>
Cleanup style in method ipmi_fru_oemkontron_get as well as add inverted logic checks to reduce indentation. Signed-off-by: Patrick Venture <venture@google.com>
Delete unused variable matchInstance. The variable is repeatedly assigned, but nothing reads it. Signed-off-by: Patrick Venture <venture@google.com>
Drop extraneous parentheses when returning a negative value. Signed-off-by: Patrick Venture <venture@google.com>
Use the macros defined in ipmi_cc for IPMI return codes instead of magic numbers. Signed-off-by: Patrick Venture <venture@google.com>
Cleanup ipmi_fru_upg_ekeying such that it exits from one place that handles cleanup. Signed-off-by: Patrick Venture <venture@google.com>
Add fru_cc_rq2big helper method to reduce duplicate code checking for specific size-based IPMI response codes. Signed-off-by: Patrick Venture <venture@google.com>
Mark ipmi_fru_query_new_value as static as it's only used internally in this object. Signed-off-by: Patrick Venture <venture@google.com>
Change ipmi_fru_query_new_value to return the bool type instead of an int that's being used as a boolean value. Signed-off-by: Patrick Venture <venture@google.com>
Convert ipmi_fru_oemkontron_edit to return a bool type instead of an int used as a bool. Signed-off-by: Patrick Venture <venture@google.com>
Fix ipmi_fru_picmg_ext_edit to use bools instead of an int treated as a boolean. Signed-off-by: Patrick Venture <venture@google.com>
Add two special return codes specific to the IPMI FRU commands. Signed-off-by: Patrick Venture <venture@google.com>
Use the return code macros instead of magic numbers. Signed-off-by: Patrick Venture <venture@google.com>
Use two macros defining the FRU block sizes instead of hard-coded magic values. Signed-off-by: Patrick Venture <venture@google.com>
Check against FRU_AREA_MAXIMUM_BLOCK_SZ instead of FRU_BLOCK_SZ when checking if the write chunk needs to be reduced. Apparently, that was the original intention, and then there was just a typo. In other places the same check is done properly. Signed-off-by: Patrick Venture <venture@google.com>
Swap calls to free() with calls to free_n() to leverage helper method and handle clearing pointers after freeing in one step. Signed-off-by: Patrick Venture <venture@google.com>
Hurray! This was a long journey, but we did it. Thank you, Patrick for your efforts! I'm merging it now. |
Fru cleanup. Clean branch, cherry-picked the changes where possible, recreated where not. Left out the static cleanup as well. That can be done more universally later.