Skip to content

Commit 16a832a

Browse files
committed
Merge tag 'edac_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC updates from Borislav Petkov: - pnd2_edac: A minimal sideband driver (Tony Luck) - small-ish cleanups and fixes all over the place * tag 'edac_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, mce_amd: Get rid of local var in amd_filter_mce() EDAC, mce_amd: Get rid of most struct cpuinfo_x86 uses EDAC, mce_amd: Rename decode_smca_errors() to decode_smca_error() EDAC: Make device_type const EDAC, pnd2: Properly toggle hidden state for P2SB PCI device EDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR EDAC, pnd2: Mask off the lower four bits of a BAR EDAC, thunderx: Fix error handling path in thunderx_lmc_probe() EDAC, altera: Fix error handling path in altr_edac_device_probe() EDAC, pnd2: Build in a minimal sideband driver for Apollo Lake EDAC, sb_edac: Classify memory mirroring modes EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name EDAC: Get rid of mci->mod_ver EDAC: Constify attribute_group structures EDAC, mce_amd: Use cpu_to_node() to find the node ID
2 parents bafb076 + 3984434 commit 16a832a

33 files changed

+161
-136
lines changed

drivers/edac/altera_edac.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include "edac_module.h"
3939

4040
#define EDAC_MOD_STR "altera_edac"
41-
#define EDAC_VERSION "1"
4241
#define EDAC_DEVICE "Altera"
4342

4443
static const struct altr_sdram_prv_data c5_data = {
@@ -392,7 +391,6 @@ static int altr_sdram_probe(struct platform_device *pdev)
392391
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
393392
mci->edac_cap = EDAC_FLAG_SECDED;
394393
mci->mod_name = EDAC_MOD_STR;
395-
mci->mod_ver = EDAC_VERSION;
396394
mci->ctl_name = dev_name(&pdev->dev);
397395
mci->scrub_mode = SCRUB_SW_SRC;
398396
mci->dev_name = dev_name(&pdev->dev);
@@ -749,8 +747,10 @@ static int altr_edac_device_probe(struct platform_device *pdev)
749747
drvdata->edac_dev_name = ecc_name;
750748

751749
drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
752-
if (!drvdata->base)
750+
if (!drvdata->base) {
751+
res = -ENOMEM;
753752
goto fail1;
753+
}
754754

755755
/* Get driver specific data for this EDAC device */
756756
drvdata->data = of_match_node(altr_edac_device_of_match, np)->data;

drivers/edac/amd64_edac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,6 @@ static void setup_mci_misc_attrs(struct mem_ctl_info *mci,
31303130

31313131
mci->edac_cap = determine_edac_cap(pvt);
31323132
mci->mod_name = EDAC_MOD_STR;
3133-
mci->mod_ver = EDAC_AMD64_VERSION;
31343133
mci->ctl_name = fam->ctl_name;
31353134
mci->dev_name = pci_name(pvt->F3);
31363135
mci->ctl_page_to_phys = NULL;

drivers/edac/amd76x_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <linux/edac.h>
2020
#include "edac_module.h"
2121

22-
#define AMD76X_REVISION " Ver: 2.0.2"
2322
#define EDAC_MOD_STR "amd76x_edac"
2423

2524
#define amd76x_printk(level, fmt, arg...) \
@@ -263,7 +262,6 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
263262
mci->edac_cap = ems_mode ?
264263
(EDAC_FLAG_EC | EDAC_FLAG_SECDED) : EDAC_FLAG_NONE;
265264
mci->mod_name = EDAC_MOD_STR;
266-
mci->mod_ver = AMD76X_REVISION;
267265
mci->ctl_name = amd76x_devs[dev_idx].ctl_name;
268266
mci->dev_name = pci_name(pdev);
269267
mci->edac_check = amd76x_check;

drivers/edac/cpc925_edac.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ static u32 cpc925_cpu_mask_disabled(void)
618618
}
619619

620620
if (reg == NULL || *reg > 2) {
621-
cpc925_printk(KERN_ERR, "Bad reg value at %s\n", cpunode->full_name);
621+
cpc925_printk(KERN_ERR, "Bad reg value at %pOF\n", cpunode);
622622
continue;
623623
}
624624

@@ -999,7 +999,6 @@ static int cpc925_probe(struct platform_device *pdev)
999999
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
10001000
mci->edac_cap = EDAC_FLAG_SECDED;
10011001
mci->mod_name = CPC925_EDAC_MOD_STR;
1002-
mci->mod_ver = CPC925_EDAC_REVISION;
10031002
mci->ctl_name = pdev->name;
10041003

10051004
if (edac_op_state == EDAC_OPSTATE_POLL)

drivers/edac/e752x_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <linux/edac.h>
2727
#include "edac_module.h"
2828

29-
#define E752X_REVISION " Ver: 2.0.2"
3029
#define EDAC_MOD_STR "e752x_edac"
3130

3231
static int report_non_memory_errors;
@@ -1303,7 +1302,6 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
13031302
(EDAC_FLAG_NONE | EDAC_FLAG_SECDED | EDAC_FLAG_S4ECD4ED);
13041303
/* FIXME - what if different memory types are in different csrows? */
13051304
mci->mod_name = EDAC_MOD_STR;
1306-
mci->mod_ver = E752X_REVISION;
13071305
mci->pdev = &pdev->dev;
13081306

13091307
edac_dbg(3, "init pvt\n");

drivers/edac/e7xxx_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include <linux/edac.h>
3333
#include "edac_module.h"
3434

35-
#define E7XXX_REVISION " Ver: 2.0.2"
3635
#define EDAC_MOD_STR "e7xxx_edac"
3736

3837
#define e7xxx_printk(level, fmt, arg...) \
@@ -458,7 +457,6 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
458457
EDAC_FLAG_S4ECD4ED;
459458
/* FIXME - what if different memory types are in different csrows? */
460459
mci->mod_name = EDAC_MOD_STR;
461-
mci->mod_ver = E7XXX_REVISION;
462460
mci->pdev = &pdev->dev;
463461
edac_dbg(3, "init pvt\n");
464462
pvt = (struct e7xxx_pvt *)mci->pvt_info;

drivers/edac/edac_mc_sysfs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static struct attribute *csrow_attrs[] = {
287287
NULL,
288288
};
289289

290-
static struct attribute_group csrow_attr_grp = {
290+
static const struct attribute_group csrow_attr_grp = {
291291
.attrs = csrow_attrs,
292292
};
293293

@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
304304
kfree(csrow);
305305
}
306306

307-
static struct device_type csrow_attr_type = {
307+
static const struct device_type csrow_attr_type = {
308308
.groups = csrow_attr_groups,
309309
.release = csrow_attr_release,
310310
};
@@ -627,7 +627,7 @@ static struct attribute *dimm_attrs[] = {
627627
NULL,
628628
};
629629

630-
static struct attribute_group dimm_attr_grp = {
630+
static const struct attribute_group dimm_attr_grp = {
631631
.attrs = dimm_attrs,
632632
};
633633

@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
644644
kfree(dimm);
645645
}
646646

647-
static struct device_type dimm_attr_type = {
647+
static const struct device_type dimm_attr_type = {
648648
.groups = dimm_attr_groups,
649649
.release = dimm_attr_release,
650650
};
@@ -902,7 +902,7 @@ static umode_t mci_attr_is_visible(struct kobject *kobj,
902902
return mode;
903903
}
904904

905-
static struct attribute_group mci_attr_grp = {
905+
static const struct attribute_group mci_attr_grp = {
906906
.attrs = mci_attrs,
907907
.is_visible = mci_attr_is_visible,
908908
};
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
920920
kfree(mci);
921921
}
922922

923-
static struct device_type mci_attr_type = {
923+
static const struct device_type mci_attr_type = {
924924
.groups = mci_attr_groups,
925925
.release = mci_attr_release,
926926
};
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
10741074
kfree(dev);
10751075
}
10761076

1077-
static struct device_type mc_attr_type = {
1077+
static const struct device_type mc_attr_type = {
10781078
.release = mc_attr_release,
10791079
};
10801080
/*

drivers/edac/ghes_edac.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include "edac_module.h"
1818
#include <ras/ras_event.h>
1919

20-
#define GHES_EDAC_REVISION " Ver: 1.0.0"
21-
2220
struct ghes_edac_pvt {
2321
struct list_head list;
2422
struct ghes *ghes;
@@ -451,7 +449,6 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
451449
mci->edac_ctl_cap = EDAC_FLAG_NONE;
452450
mci->edac_cap = EDAC_FLAG_NONE;
453451
mci->mod_name = "ghes_edac.c";
454-
mci->mod_ver = GHES_EDAC_REVISION;
455452
mci->ctl_name = "ghes_edac";
456453
mci->dev_name = "ghes";
457454

drivers/edac/highbank_mc_edac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ static int highbank_mc_probe(struct platform_device *pdev)
224224
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
225225
mci->edac_cap = EDAC_FLAG_SECDED;
226226
mci->mod_name = pdev->dev.driver->name;
227-
mci->mod_ver = "1";
228227
mci->ctl_name = id->compatible;
229228
mci->dev_name = dev_name(&pdev->dev);
230229
mci->scrub_mode = SCRUB_SW_SRC;

drivers/edac/i3000_edac.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include <linux/edac.h>
1717
#include "edac_module.h"
1818

19-
#define I3000_REVISION "1.1"
20-
2119
#define EDAC_MOD_STR "i3000_edac"
2220

2321
#define I3000_RANKS 8
@@ -375,7 +373,6 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
375373
mci->edac_cap = EDAC_FLAG_SECDED;
376374

377375
mci->mod_name = EDAC_MOD_STR;
378-
mci->mod_ver = I3000_REVISION;
379376
mci->ctl_name = i3000_devs[dev_idx].ctl_name;
380377
mci->dev_name = pci_name(pdev);
381378
mci->edac_check = i3000_check;

drivers/edac/i3200_edac.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
#include <linux/io-64-nonatomic-lo-hi.h>
1919

20-
#define I3200_REVISION "1.1"
21-
2220
#define EDAC_MOD_STR "i3200_edac"
2321

2422
#define PCI_DEVICE_ID_INTEL_3200_HB 0x29f0
@@ -375,7 +373,6 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
375373
mci->edac_cap = EDAC_FLAG_SECDED;
376374

377375
mci->mod_name = EDAC_MOD_STR;
378-
mci->mod_ver = I3200_REVISION;
379376
mci->ctl_name = i3200_devs[dev_idx].ctl_name;
380377
mci->dev_name = pci_name(pdev);
381378
mci->edac_check = i3200_check;

drivers/edac/i5000_edac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,6 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
14301430
mci->edac_ctl_cap = EDAC_FLAG_NONE;
14311431
mci->edac_cap = EDAC_FLAG_NONE;
14321432
mci->mod_name = "i5000_edac.c";
1433-
mci->mod_ver = I5000_REVISION;
14341433
mci->ctl_name = i5000_devs[dev_idx].ctl_name;
14351434
mci->dev_name = pci_name(pdev);
14361435
mci->ctl_page_to_phys = NULL;

drivers/edac/i5100_edac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,6 @@ static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
11081108
mci->edac_ctl_cap = EDAC_FLAG_SECDED;
11091109
mci->edac_cap = EDAC_FLAG_SECDED;
11101110
mci->mod_name = "i5100_edac.c";
1111-
mci->mod_ver = "not versioned";
11121111
mci->ctl_name = "i5100";
11131112
mci->dev_name = pci_name(pdev);
11141113
mci->ctl_page_to_phys = NULL;

drivers/edac/i5400_edac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,6 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx)
13151315
mci->edac_ctl_cap = EDAC_FLAG_NONE;
13161316
mci->edac_cap = EDAC_FLAG_NONE;
13171317
mci->mod_name = "i5400_edac.c";
1318-
mci->mod_ver = I5400_REVISION;
13191318
mci->ctl_name = i5400_devs[dev_idx].ctl_name;
13201319
mci->dev_name = pci_name(pdev);
13211320
mci->ctl_page_to_phys = NULL;

drivers/edac/i7300_edac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,6 @@ static int i7300_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
10771077
mci->edac_ctl_cap = EDAC_FLAG_NONE;
10781078
mci->edac_cap = EDAC_FLAG_NONE;
10791079
mci->mod_name = "i7300_edac.c";
1080-
mci->mod_ver = I7300_REVISION;
10811080
mci->ctl_name = i7300_devs[0].ctl_name;
10821081
mci->dev_name = pci_name(pdev);
10831082
mci->ctl_page_to_phys = NULL;

drivers/edac/i7core_edac.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ static struct attribute *i7core_addrmatch_attrs[] = {
10791079
NULL
10801080
};
10811081

1082-
static struct attribute_group addrmatch_grp = {
1082+
static const struct attribute_group addrmatch_grp = {
10831083
.attrs = i7core_addrmatch_attrs,
10841084
};
10851085

@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
10941094
kfree(device);
10951095
}
10961096

1097-
static struct device_type addrmatch_type = {
1097+
static const struct device_type addrmatch_type = {
10981098
.groups = addrmatch_groups,
10991099
.release = addrmatch_release,
11001100
};
@@ -1110,7 +1110,7 @@ static struct attribute *i7core_udimm_counters_attrs[] = {
11101110
NULL
11111111
};
11121112

1113-
static struct attribute_group all_channel_counts_grp = {
1113+
static const struct attribute_group all_channel_counts_grp = {
11141114
.attrs = i7core_udimm_counters_attrs,
11151115
};
11161116

@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
11251125
kfree(device);
11261126
}
11271127

1128-
static struct device_type all_channel_counts_type = {
1128+
static const struct device_type all_channel_counts_type = {
11291129
.groups = all_channel_counts_groups,
11301130
.release = all_channel_counts_release,
11311131
};
@@ -2159,7 +2159,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
21592159
mci->edac_ctl_cap = EDAC_FLAG_NONE;
21602160
mci->edac_cap = EDAC_FLAG_NONE;
21612161
mci->mod_name = "i7core_edac.c";
2162-
mci->mod_ver = I7CORE_REVISION;
21632162
mci->ctl_name = kasprintf(GFP_KERNEL, "i7 core #%d",
21642163
i7core_dev->socket);
21652164
mci->dev_name = pci_name(i7core_dev->pdev[0]);

drivers/edac/i82443bxgx_edac.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include <linux/edac.h>
3232
#include "edac_module.h"
3333

34-
#define I82443_REVISION "0.1"
35-
3634
#define EDAC_MOD_STR "i82443bxgx_edac"
3735

3836
/* The 82443BX supports SDRAM, or EDO (EDO for mobile only), "Memory
@@ -320,7 +318,6 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
320318
I82443BXGX_EAP_OFFSET_MBE));
321319

322320
mci->mod_name = EDAC_MOD_STR;
323-
mci->mod_ver = I82443_REVISION;
324321
mci->ctl_name = "I82443BXGX";
325322
mci->dev_name = pci_name(pdev);
326323
mci->edac_check = i82443bxgx_edacmc_check;

drivers/edac/i82860_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/edac.h>
1717
#include "edac_module.h"
1818

19-
#define I82860_REVISION " Ver: 2.0.2"
2019
#define EDAC_MOD_STR "i82860_edac"
2120

2221
#define i82860_printk(level, fmt, arg...) \
@@ -216,7 +215,6 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
216215
/* I"m not sure about this but I think that all RDRAM is SECDED */
217216
mci->edac_cap = EDAC_FLAG_SECDED;
218217
mci->mod_name = EDAC_MOD_STR;
219-
mci->mod_ver = I82860_REVISION;
220218
mci->ctl_name = i82860_devs[dev_idx].ctl_name;
221219
mci->dev_name = pci_name(pdev);
222220
mci->edac_check = i82860_check;

drivers/edac/i82875p_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <linux/edac.h>
2121
#include "edac_module.h"
2222

23-
#define I82875P_REVISION " Ver: 2.0.2"
2423
#define EDAC_MOD_STR "i82875p_edac"
2524

2625
#define i82875p_printk(level, fmt, arg...) \
@@ -423,7 +422,6 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
423422
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
424423
mci->edac_cap = EDAC_FLAG_UNKNOWN;
425424
mci->mod_name = EDAC_MOD_STR;
426-
mci->mod_ver = I82875P_REVISION;
427425
mci->ctl_name = i82875p_devs[dev_idx].ctl_name;
428426
mci->dev_name = pci_name(pdev);
429427
mci->edac_check = i82875p_check;

drivers/edac/i82975x_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/edac.h>
1717
#include "edac_module.h"
1818

19-
#define I82975X_REVISION " Ver: 1.0.0"
2019
#define EDAC_MOD_STR "i82975x_edac"
2120

2221
#define i82975x_printk(level, fmt, arg...) \
@@ -564,7 +563,6 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
564563
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
565564
mci->edac_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
566565
mci->mod_name = EDAC_MOD_STR;
567-
mci->mod_ver = I82975X_REVISION;
568566
mci->ctl_name = i82975x_devs[dev_idx].ctl_name;
569567
mci->dev_name = pci_name(pdev);
570568
mci->edac_check = i82975x_check;

drivers/edac/ie31200_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#include <linux/io-64-nonatomic-lo-hi.h>
4646
#include "edac_module.h"
4747

48-
#define IE31200_REVISION "1.0"
4948
#define EDAC_MOD_STR "ie31200_edac"
5049

5150
#define ie31200_printk(level, fmt, arg...) \
@@ -420,7 +419,6 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
420419
mci->edac_ctl_cap = EDAC_FLAG_SECDED;
421420
mci->edac_cap = EDAC_FLAG_SECDED;
422421
mci->mod_name = EDAC_MOD_STR;
423-
mci->mod_ver = IE31200_REVISION;
424422
mci->ctl_name = ie31200_devs[dev_idx].ctl_name;
425423
mci->dev_name = pci_name(pdev);
426424
mci->edac_check = ie31200_check;

0 commit comments

Comments
 (0)