Skip to content

Commit b001694

Browse files
Robert Richtersuryasaimadhu
authored andcommitted
EDAC/ghes: Remove unused members of struct ghes_edac_pvt, rename it to ghes_pvt
The struct members list and ghes of struct ghes_edac_pvt are unused, remove them. On that occasion, rename it to the shorter name struct ghes_pvt. Signed-off-by: Robert Richter <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent cb51a37 commit b001694

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

drivers/edac/ghes_edac.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#include "edac_module.h"
1616
#include <ras/ras_event.h>
1717

18-
struct ghes_edac_pvt {
19-
struct list_head list;
20-
struct ghes *ghes;
18+
struct ghes_pvt {
2119
struct mem_ctl_info *mci;
2220

2321
/* Buffers for the error handling routine */
@@ -32,7 +30,7 @@ static refcount_t ghes_refcount = REFCOUNT_INIT(0);
3230
* also provides the necessary (implicit) memory barrier for the SMP
3331
* case to make the pointer visible on another CPU.
3432
*/
35-
static struct ghes_edac_pvt *ghes_pvt;
33+
static struct ghes_pvt *ghes_pvt;
3634

3735
/* GHES registration mutex */
3836
static DEFINE_MUTEX(ghes_reg_mutex);
@@ -212,7 +210,7 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)
212210
{
213211
struct edac_raw_error_desc *e;
214212
struct mem_ctl_info *mci;
215-
struct ghes_edac_pvt *pvt;
213+
struct ghes_pvt *pvt;
216214
unsigned long flags;
217215
char *p;
218216

@@ -470,7 +468,7 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
470468
bool fake = false;
471469
int rc = 0, num_dimm = 0;
472470
struct mem_ctl_info *mci;
473-
struct ghes_edac_pvt *pvt;
471+
struct ghes_pvt *pvt;
474472
struct edac_mc_layer layers[1];
475473
struct ghes_edac_dimm_fill dimm_fill;
476474
unsigned long flags;
@@ -507,15 +505,14 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
507505
layers[0].size = num_dimm;
508506
layers[0].is_virt_csrow = true;
509507

510-
mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(struct ghes_edac_pvt));
508+
mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(struct ghes_pvt));
511509
if (!mci) {
512510
pr_info("Can't allocate memory for EDAC data\n");
513511
rc = -ENOMEM;
514512
goto unlock;
515513
}
516514

517515
pvt = mci->pvt_info;
518-
pvt->ghes = ghes;
519516
pvt->mci = mci;
520517

521518
mci->pdev = dev;

0 commit comments

Comments
 (0)