drivers/ipmi: Fix coding style
Fix 'do not use assignment in if condition'. Change-Id: I6e1b81a1b87de4315391618968c59cc3d3a66a77 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33492 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
d3c5544bec
commit
14774769da
|
@ -144,34 +144,40 @@ static int ipmi_kcs_send_message(int port, int netfn, int lun, int cmd,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_START_WRITE))) {
|
||||
ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_START_WRITE);
|
||||
if (ret) {
|
||||
printk(BIOS_ERR, "IPMI START WRITE failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = ipmi_kcs_send_data_byte(port, (netfn << 2) | (lun & 3)))) {
|
||||
ret = ipmi_kcs_send_data_byte(port, (netfn << 2) | (lun & 3));
|
||||
if (ret) {
|
||||
printk(BIOS_ERR, "IPMI NETFN failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = ipmi_kcs_send_data_byte(port, cmd))) {
|
||||
ret = ipmi_kcs_send_data_byte(port, cmd);
|
||||
if (ret) {
|
||||
printk(BIOS_ERR, "IPMI CMD failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
while (len-- > 1) {
|
||||
if ((ret = ipmi_kcs_send_data_byte(port, *msg++))) {
|
||||
ret = ipmi_kcs_send_data_byte(port, *msg++);
|
||||
if (ret) {
|
||||
printk(BIOS_ERR, "IPMI BYTE WRITE failed\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_END_WRITE))) {
|
||||
ret = ipmi_kcs_send_cmd_byte(port, IPMI_KCS_END_WRITE);
|
||||
if (ret) {
|
||||
printk(BIOS_ERR, "IPMI END WRITE failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = ipmi_kcs_send_last_data_byte(port, *msg++))) {
|
||||
ret = ipmi_kcs_send_last_data_byte(port, *msg++);
|
||||
if (ret) {
|
||||
printk(BIOS_ERR, "IPMI BYTE WRITE failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue