powerpc/eeh: Remove unnecessary cast
authorBenjamin Gray <bgray@linux.ibm.com>
Wed, 11 Oct 2023 05:37:10 +0000 (16:37 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Oct 2023 06:16:20 +0000 (17:16 +1100)
Sparse reports a warning when casting to an int. There is no need to
cast in the first place, so drop them.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231011053711.93427-12-bgray@linux.ibm.com
arch/powerpc/kernel/eeh_driver.c

index 438568a472d03bba2ac5db805ad5ae3e13bd1921..48773d2d9be3cb0a02080d49c7944c8fcb17438e 100644 (file)
@@ -39,7 +39,7 @@ static int eeh_result_priority(enum pci_ers_result result)
        case PCI_ERS_RESULT_NEED_RESET:
                return 6;
        default:
-               WARN_ONCE(1, "Unknown pci_ers_result value: %d\n", (int)result);
+               WARN_ONCE(1, "Unknown pci_ers_result value: %d\n", result);
                return 0;
        }
 };
@@ -60,7 +60,7 @@ static const char *pci_ers_result_name(enum pci_ers_result result)
        case PCI_ERS_RESULT_NO_AER_DRIVER:
                return "no AER driver";
        default:
-               WARN_ONCE(1, "Unknown result type: %d\n", (int)result);
+               WARN_ONCE(1, "Unknown result type: %d\n", result);
                return "unknown";
        }
 };