All of lore.kernel.org
 help / color / mirror / Atom feed
* [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern
@ 2020-01-30 18:56 Vishal Verma
  2020-01-30 19:03 ` Dan Williams
  2020-02-18 21:33 ` Jeff Moyer
  0 siblings, 2 replies; 4+ messages in thread
From: Vishal Verma @ 2020-01-30 18:56 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Vishal Verma, Dan Williams

A toolchain update in Fedora 32 caused new compile errors due to
multiple definitions of dimm_ops structures. The declarations in
'private.h' for the various NFIT families are present so that libndctl
can find all the per-family dimm-ops. However they need to be declared
as extern because the actual definitions are in <family>.c

Cc: Dan Williams <dan.j.williams@intel.com>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 ndctl/lib/private.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ndctl/lib/private.h b/ndctl/lib/private.h
index e445301..16bf8f9 100644
--- a/ndctl/lib/private.h
+++ b/ndctl/lib/private.h
@@ -343,10 +343,10 @@ struct ndctl_dimm_ops {
 	int (*xlat_firmware_status)(struct ndctl_cmd *);
 };
 
-struct ndctl_dimm_ops * const intel_dimm_ops;
-struct ndctl_dimm_ops * const hpe1_dimm_ops;
-struct ndctl_dimm_ops * const msft_dimm_ops;
-struct ndctl_dimm_ops * const hyperv_dimm_ops;
+extern struct ndctl_dimm_ops * const intel_dimm_ops;
+extern struct ndctl_dimm_ops * const hpe1_dimm_ops;
+extern struct ndctl_dimm_ops * const msft_dimm_ops;
+extern struct ndctl_dimm_ops * const hyperv_dimm_ops;
 
 static inline struct ndctl_bus *cmd_to_bus(struct ndctl_cmd *cmd)
 {
-- 
2.21.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern
  2020-01-30 18:56 [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern Vishal Verma
@ 2020-01-30 19:03 ` Dan Williams
  2020-01-30 19:05   ` Verma, Vishal L
  2020-02-18 21:33 ` Jeff Moyer
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Williams @ 2020-01-30 19:03 UTC (permalink / raw)
  To: Vishal Verma; +Cc: linux-nvdimm

On Thu, Jan 30, 2020 at 10:56 AM Vishal Verma <vishal.l.verma@intel.com> wrote:
>
> A toolchain update in Fedora 32 caused new compile errors due to
> multiple definitions of dimm_ops structures. The declarations in
> 'private.h' for the various NFIT families are present so that libndctl
> can find all the per-family dimm-ops. However they need to be declared
> as extern because the actual definitions are in <family>.c

Looks good to me. Does this quiet the build spew?
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern
  2020-01-30 19:03 ` Dan Williams
@ 2020-01-30 19:05   ` Verma, Vishal L
  0 siblings, 0 replies; 4+ messages in thread
From: Verma, Vishal L @ 2020-01-30 19:05 UTC (permalink / raw)
  To: Williams, Dan J; +Cc: linux-nvdimm

On Thu, 2020-01-30 at 11:03 -0800, Dan Williams wrote:
> On Thu, Jan 30, 2020 at 10:56 AM Vishal Verma <vishal.l.verma@intel.com> wrote:
> > A toolchain update in Fedora 32 caused new compile errors due to
> > multiple definitions of dimm_ops structures. The declarations in
> > 'private.h' for the various NFIT families are present so that libndctl
> > can find all the per-family dimm-ops. However they need to be declared
> > as extern because the actual definitions are in <family>.c
> 
> Looks good to me. Does this quiet the build spew?

I'm testing that now - it at least doesn't introduce any new errors in
my F30 environment and makes sense.

_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern
  2020-01-30 18:56 [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern Vishal Verma
  2020-01-30 19:03 ` Dan Williams
@ 2020-02-18 21:33 ` Jeff Moyer
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Moyer @ 2020-02-18 21:33 UTC (permalink / raw)
  To: Vishal Verma; +Cc: linux-nvdimm

Vishal Verma <vishal.l.verma@intel.com> writes:

> A toolchain update in Fedora 32 caused new compile errors due to
> multiple definitions of dimm_ops structures. The declarations in
> 'private.h' for the various NFIT families are present so that libndctl
> can find all the per-family dimm-ops. However they need to be declared
> as extern because the actual definitions are in <family>.c
>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Suggested-by: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
>  ndctl/lib/private.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/ndctl/lib/private.h b/ndctl/lib/private.h
> index e445301..16bf8f9 100644
> --- a/ndctl/lib/private.h
> +++ b/ndctl/lib/private.h
> @@ -343,10 +343,10 @@ struct ndctl_dimm_ops {
>  	int (*xlat_firmware_status)(struct ndctl_cmd *);
>  };
>  
> -struct ndctl_dimm_ops * const intel_dimm_ops;
> -struct ndctl_dimm_ops * const hpe1_dimm_ops;
> -struct ndctl_dimm_ops * const msft_dimm_ops;
> -struct ndctl_dimm_ops * const hyperv_dimm_ops;
> +extern struct ndctl_dimm_ops * const intel_dimm_ops;
> +extern struct ndctl_dimm_ops * const hpe1_dimm_ops;
> +extern struct ndctl_dimm_ops * const msft_dimm_ops;
> +extern struct ndctl_dimm_ops * const hyperv_dimm_ops;
>  
>  static inline struct ndctl_bus *cmd_to_bus(struct ndctl_cmd *cmd)
>  {

Acked-by: Jeff Moyer <jmoyer@redhat.com>
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-18 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 18:56 [ndctl PATCH] ndctl/lib: make dimm_ops in private.h extern Vishal Verma
2020-01-30 19:03 ` Dan Williams
2020-01-30 19:05   ` Verma, Vishal L
2020-02-18 21:33 ` Jeff Moyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.