]> Git Repo - linux.git/commitdiff
i7core_edac: Drop unused variable
authorJean Delvare <[email protected]>
Mon, 24 Feb 2014 16:13:58 +0000 (17:13 +0100)
committerBorislav Petkov <[email protected]>
Tue, 25 Feb 2014 09:22:34 +0000 (10:22 +0100)
Fix the following warning:

drivers/edac/i7core_edac.c: In function "core_mce_output_error":
drivers/edac/i7core_edac.c:1711:8: warning: variable "type" set but not used [-Wunused-but-set-variable]
  char *type, *optype, *err;
        ^
According to Mauro, type can just be dropped, as tp_event now maps if
the error is corrected, uncorrected non-fatal or uncorrected fatal
one.

Signed-off-by: Jean Delvare <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Acked-by: Mauro Carvalho Chehab <[email protected]>
Cc: Doug Thompson <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
drivers/edac/i7core_edac.c

index 87533ca7752e0105683210913f83731a9b988aab..cc6a510742257767f6b58b486a08d73680540049 100644 (file)
@@ -1703,7 +1703,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
                                    const struct mce *m)
 {
        struct i7core_pvt *pvt = mci->pvt_info;
-       char *type, *optype, *err;
+       char *optype, *err;
        enum hw_event_mc_err_type tp_event;
        unsigned long error = m->status & 0x1ff0000l;
        bool uncorrected_error = m->mcgstatus & 1ll << 61;
@@ -1716,15 +1716,11 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
        u32 errnum = find_first_bit(&error, 32);
 
        if (uncorrected_error) {
-               if (ripv) {
-                       type = "FATAL";
+               if (ripv)
                        tp_event = HW_EVENT_ERR_FATAL;
-               } else {
-                       type = "NON_FATAL";
+               else
                        tp_event = HW_EVENT_ERR_UNCORRECTED;
-               }
        } else {
-               type = "CORRECTED";
                tp_event = HW_EVENT_ERR_CORRECTED;
        }
 
This page took 0.061056 seconds and 4 git commands to generate.