diff mbox series

tools/testing/nvdimm: Fix security_init() symbol collision

Message ID 164904238610.1330275.1889212115373993727.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit e8cf229ebe5eb31eecee86268223530a872872c2
Headers show
Series tools/testing/nvdimm: Fix security_init() symbol collision | expand

Commit Message

Dan Williams April 4, 2022, 3:19 a.m. UTC
Starting with the new perf-event support in the nvdimm core, the
nfit_test mock module stops compiling. Rename its security_init() to
nfit_security_init().

tools/testing/nvdimm/test/nfit.c:1845:13: error: conflicting types for ‘security_init’; have ‘void(struct nfit_test *)’
 1845 | static void security_init(struct nfit_test *t)
      |             ^~~~~~~~~~~~~
In file included from ./include/linux/perf_event.h:61,
                 from ./include/linux/nd.h:11,
                 from ./drivers/nvdimm/nd-core.h:11,
                 from tools/testing/nvdimm/test/nfit.c:19:

Fixes: 9a61d0838cd0 ("drivers/nvdimm: Add nvdimm pmu structure")
Cc: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 tools/testing/nvdimm/test/nfit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Verma, Vishal L April 5, 2022, 2:52 p.m. UTC | #1
On Sun, 2022-04-03 at 20:19 -0700, Dan Williams wrote:
> Starting with the new perf-event support in the nvdimm core, the
> nfit_test mock module stops compiling. Rename its security_init() to
> nfit_security_init().
> 
> tools/testing/nvdimm/test/nfit.c:1845:13: error: conflicting types for ‘security_init’; have ‘void(struct nfit_test *)’
>  1845 | static void security_init(struct nfit_test *t)
>       |             ^~~~~~~~~~~~~
> In file included from ./include/linux/perf_event.h:61,
>                  from ./include/linux/nd.h:11,
>                  from ./drivers/nvdimm/nd-core.h:11,
>                  from tools/testing/nvdimm/test/nfit.c:19:
> 
> Fixes: 9a61d0838cd0 ("drivers/nvdimm: Add nvdimm pmu structure")
> Cc: Kajol Jain <kjain@linux.ibm.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Looks good,

Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>

> ---
>  tools/testing/nvdimm/test/nfit.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index 65dbdda3a054..1da76ccde448 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -1842,7 +1842,7 @@ static int nfit_test_dimm_init(struct nfit_test *t)
>         return 0;
>  }
>  
> -static void security_init(struct nfit_test *t)
> +static void nfit_security_init(struct nfit_test *t)
>  {
>         int i;
>  
> @@ -1938,7 +1938,7 @@ static int nfit_test0_alloc(struct nfit_test *t)
>         if (nfit_test_dimm_init(t))
>                 return -ENOMEM;
>         smart_init(t);
> -       security_init(t);
> +       nfit_security_init(t);
>         return ars_state_init(&t->pdev.dev, &t->ars_state);
>  }
>  
> 
>
kajoljain April 6, 2022, 8:38 a.m. UTC | #2
On 4/4/22 08:49, Dan Williams wrote:
> Starting with the new perf-event support in the nvdimm core, the
> nfit_test mock module stops compiling. Rename its security_init() to
> nfit_security_init().
> 
> tools/testing/nvdimm/test/nfit.c:1845:13: error: conflicting types for ‘security_init’; have ‘void(struct nfit_test *)’
>  1845 | static void security_init(struct nfit_test *t)
>       |             ^~~~~~~~~~~~~
> In file included from ./include/linux/perf_event.h:61,
>                  from ./include/linux/nd.h:11,
>                  from ./drivers/nvdimm/nd-core.h:11,
>                  from tools/testing/nvdimm/test/nfit.c:19:
> 
> Fixes: 9a61d0838cd0 ("drivers/nvdimm: Add nvdimm pmu structure")
> Cc: Kajol Jain <kjain@linux.ibm.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Looks good to me.

Reviewed-by: Kajol Jain <kjain@linux.ibm.com>

Thanks,
Kajol Jain

> ---
>  tools/testing/nvdimm/test/nfit.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index 65dbdda3a054..1da76ccde448 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -1842,7 +1842,7 @@ static int nfit_test_dimm_init(struct nfit_test *t)
>  	return 0;
>  }
>  
> -static void security_init(struct nfit_test *t)
> +static void nfit_security_init(struct nfit_test *t)
>  {
>  	int i;
>  
> @@ -1938,7 +1938,7 @@ static int nfit_test0_alloc(struct nfit_test *t)
>  	if (nfit_test_dimm_init(t))
>  		return -ENOMEM;
>  	smart_init(t);
> -	security_init(t);
> +	nfit_security_init(t);
>  	return ars_state_init(&t->pdev.dev, &t->ars_state);
>  }
>  
>
diff mbox series

Patch

diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index 65dbdda3a054..1da76ccde448 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -1842,7 +1842,7 @@  static int nfit_test_dimm_init(struct nfit_test *t)
 	return 0;
 }
 
-static void security_init(struct nfit_test *t)
+static void nfit_security_init(struct nfit_test *t)
 {
 	int i;
 
@@ -1938,7 +1938,7 @@  static int nfit_test0_alloc(struct nfit_test *t)
 	if (nfit_test_dimm_init(t))
 		return -ENOMEM;
 	smart_init(t);
-	security_init(t);
+	nfit_security_init(t);
 	return ars_state_init(&t->pdev.dev, &t->ars_state);
 }