linux-cxl.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] cxl: Fixed defined but not used warnings
@ 2021-08-30 17:17 Ben Widawsky
  2021-08-30 17:17 ` [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs Ben Widawsky
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ben Widawsky @ 2021-08-30 17:17 UTC (permalink / raw)
  To: linux-cxl
  Cc: Ben Widawsky, Alison Schofield, Dan Williams, Ira Weiny,
	Jonathan Cameron, Vishal Verma

This fixes unused-const-variable warnings emitted by gcc when cxlmem.h
is used by pretty much all files except pci.c

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
 include/uapi/linux/cxl_mem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h
index f6e8a005b113..1236dd9ffe23 100644
--- a/include/uapi/linux/cxl_mem.h
+++ b/include/uapi/linux/cxl_mem.h
@@ -50,7 +50,7 @@ enum { CXL_CMDS };
 #define ___C(a, b) { b }
 static const struct {
 	const char *name;
-} cxl_command_names[] = { CXL_CMDS };
+} cxl_command_names[] __maybe_unused = { CXL_CMDS };
 
 /*
  * Here's how this actually breaks out:
-- 
2.33.0


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

* [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs
  2021-08-30 17:17 [PATCH 1/3] cxl: Fixed defined but not used warnings Ben Widawsky
@ 2021-08-30 17:17 ` Ben Widawsky
  2021-09-01 19:15   ` Dan Williams
  2021-08-30 17:17 ` [PATCH 3/3] cxl/docs: Remove undocumented references Ben Widawsky
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Ben Widawsky @ 2021-08-30 17:17 UTC (permalink / raw)
  To: linux-cxl
  Cc: Ben Widawsky, Alison Schofield, Dan Williams, Ira Weiny,
	Jonathan Cameron, Vishal Verma

Fixed "Excess function parameter" warnings generated by the CHECK stage
of build.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
 drivers/cxl/core/mbox.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index 48a07cf2deb4..1b3335f5ed59 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -640,10 +640,6 @@ EXPORT_SYMBOL_GPL(cxl_mem_enumerate_cmds);
 /**
  * cxl_mem_get_partition_info - Get partition info
  * @cxlm: The device to act on
- * @active_volatile_bytes: returned active volatile capacity; in bytes
- * @active_persistent_bytes: returned active persistent capacity; in bytes
- * @next_volatile_bytes: return next volatile capacity; in bytes
- * @next_persistent_bytes: return next persistent capacity; in bytes
  *
  * Retrieve the current partition info for the device specified.  The active
  * values are the current capacity in bytes.  If not 0, the 'next' values are
-- 
2.33.0


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

* [PATCH 3/3] cxl/docs: Remove undocumented references
  2021-08-30 17:17 [PATCH 1/3] cxl: Fixed defined but not used warnings Ben Widawsky
  2021-08-30 17:17 ` [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs Ben Widawsky
@ 2021-08-30 17:17 ` Ben Widawsky
  2021-09-01 19:18   ` Dan Williams
  2021-08-30 18:49 ` [PATCH 1/3] cxl: Fixed defined but not used warnings Dan Williams
  2021-09-02 17:14 ` [PATCH v2] " Ben Widawsky
  3 siblings, 1 reply; 10+ messages in thread
From: Ben Widawsky @ 2021-08-30 17:17 UTC (permalink / raw)
  To: linux-cxl
  Cc: Ben Widawsky, Alison Schofield, Dan Williams, Ira Weiny,
	Jonathan Cameron, Vishal Verma

When the core pmem and regs implementation was added, there were no
structured comments added. This change allows docs to be generated
without warnings.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
 Documentation/driver-api/cxl/memory-devices.rst | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/Documentation/driver-api/cxl/memory-devices.rst b/Documentation/driver-api/cxl/memory-devices.rst
index 356f70d28316..20e177fab487 100644
--- a/Documentation/driver-api/cxl/memory-devices.rst
+++ b/Documentation/driver-api/cxl/memory-devices.rst
@@ -39,12 +39,6 @@ CXL Core
 .. kernel-doc:: drivers/cxl/core/bus.c
    :doc: cxl core
 
-.. kernel-doc:: drivers/cxl/core/pmem.c
-   :internal:
-
-.. kernel-doc:: drivers/cxl/core/regs.c
-   :internal:
-
 .. kernel-doc:: drivers/cxl/core/mbox.c
    :doc: cxl mbox
 
-- 
2.33.0


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

* Re: [PATCH 1/3] cxl: Fixed defined but not used warnings
  2021-08-30 17:17 [PATCH 1/3] cxl: Fixed defined but not used warnings Ben Widawsky
  2021-08-30 17:17 ` [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs Ben Widawsky
  2021-08-30 17:17 ` [PATCH 3/3] cxl/docs: Remove undocumented references Ben Widawsky
@ 2021-08-30 18:49 ` Dan Williams
  2021-08-30 19:06   ` Ben Widawsky
  2021-09-02 17:14 ` [PATCH v2] " Ben Widawsky
  3 siblings, 1 reply; 10+ messages in thread
From: Dan Williams @ 2021-08-30 18:49 UTC (permalink / raw)
  To: Ben Widawsky
  Cc: linux-cxl, Alison Schofield, Ira Weiny, Jonathan Cameron, Vishal Verma

On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
>
> This fixes unused-const-variable warnings emitted by gcc when cxlmem.h
> is used by pretty much all files except pci.c
>
> Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
> ---
>  include/uapi/linux/cxl_mem.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h
> index f6e8a005b113..1236dd9ffe23 100644
> --- a/include/uapi/linux/cxl_mem.h
> +++ b/include/uapi/linux/cxl_mem.h
> @@ -50,7 +50,7 @@ enum { CXL_CMDS };
>  #define ___C(a, b) { b }
>  static const struct {
>         const char *name;
> -} cxl_command_names[] = { CXL_CMDS };
> +} cxl_command_names[] __maybe_unused = { CXL_CMDS };

Since this is a uapi header does this need to be the raw
"__attribute__((__unused__))"?

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

* Re: [PATCH 1/3] cxl: Fixed defined but not used warnings
  2021-08-30 18:49 ` [PATCH 1/3] cxl: Fixed defined but not used warnings Dan Williams
@ 2021-08-30 19:06   ` Ben Widawsky
  0 siblings, 0 replies; 10+ messages in thread
From: Ben Widawsky @ 2021-08-30 19:06 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-cxl, Alison Schofield, Ira Weiny, Jonathan Cameron, Vishal Verma

On 21-08-30 11:49:05, Dan Williams wrote:
> On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
> >
> > This fixes unused-const-variable warnings emitted by gcc when cxlmem.h
> > is used by pretty much all files except pci.c
> >
> > Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
> > ---
> >  include/uapi/linux/cxl_mem.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h
> > index f6e8a005b113..1236dd9ffe23 100644
> > --- a/include/uapi/linux/cxl_mem.h
> > +++ b/include/uapi/linux/cxl_mem.h
> > @@ -50,7 +50,7 @@ enum { CXL_CMDS };
> >  #define ___C(a, b) { b }
> >  static const struct {
> >         const char *name;
> > -} cxl_command_names[] = { CXL_CMDS };
> > +} cxl_command_names[] __maybe_unused = { CXL_CMDS };
> 
> Since this is a uapi header does this need to be the raw
> "__attribute__((__unused__))"?

Good catch. I grepped uapi dir and interestingly didn't find other examples of
unused... Feeling a bit special snowflake now.

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

* Re: [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs
  2021-08-30 17:17 ` [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs Ben Widawsky
@ 2021-09-01 19:15   ` Dan Williams
  2021-09-04  0:39     ` Dan Williams
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Williams @ 2021-09-01 19:15 UTC (permalink / raw)
  To: Ben Widawsky
  Cc: linux-cxl, Alison Schofield, Ira Weiny, Jonathan Cameron, Vishal Verma

On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
>
> Fixed "Excess function parameter" warnings generated by the CHECK stage
> of build.
>

I'll add the:

Fixes: bd0964c858ec ("cxl/mbox: Move mailbox and other non-PCI
specific infrastructure to the core")

...but otherwise looks good.

> Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
> ---
>  drivers/cxl/core/mbox.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index 48a07cf2deb4..1b3335f5ed59 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -640,10 +640,6 @@ EXPORT_SYMBOL_GPL(cxl_mem_enumerate_cmds);
>  /**
>   * cxl_mem_get_partition_info - Get partition info
>   * @cxlm: The device to act on
> - * @active_volatile_bytes: returned active volatile capacity; in bytes
> - * @active_persistent_bytes: returned active persistent capacity; in bytes
> - * @next_volatile_bytes: return next volatile capacity; in bytes
> - * @next_persistent_bytes: return next persistent capacity; in bytes
>   *
>   * Retrieve the current partition info for the device specified.  The active
>   * values are the current capacity in bytes.  If not 0, the 'next' values are
> --
> 2.33.0
>

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

* Re: [PATCH 3/3] cxl/docs: Remove undocumented references
  2021-08-30 17:17 ` [PATCH 3/3] cxl/docs: Remove undocumented references Ben Widawsky
@ 2021-09-01 19:18   ` Dan Williams
  2021-09-02 17:09     ` Ben Widawsky
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Williams @ 2021-09-01 19:18 UTC (permalink / raw)
  To: Ben Widawsky
  Cc: linux-cxl, Alison Schofield, Ira Weiny, Jonathan Cameron, Vishal Verma

On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
>
> When the core pmem and regs implementation was added, there were no
> structured comments added. This change allows docs to be generated
> without warnings.
>

Hmm, might be better to go the other and fix this with patches to add
documentation. At least devm_cxl_add_nvdimm_bridge() would benefit and
regs.c has some kernel-doc annotations, just needs the header section
added.

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

* Re: [PATCH 3/3] cxl/docs: Remove undocumented references
  2021-09-01 19:18   ` Dan Williams
@ 2021-09-02 17:09     ` Ben Widawsky
  0 siblings, 0 replies; 10+ messages in thread
From: Ben Widawsky @ 2021-09-02 17:09 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-cxl, Alison Schofield, Ira Weiny, Jonathan Cameron, Vishal Verma

On 21-09-01 12:18:59, Dan Williams wrote:
> On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
> >
> > When the core pmem and regs implementation was added, there were no
> > structured comments added. This change allows docs to be generated
> > without warnings.
> >
> 
> Hmm, might be better to go the other and fix this with patches to add
> documentation. At least devm_cxl_add_nvdimm_bridge() would benefit and
> regs.c has some kernel-doc annotations, just needs the header section
> added.

That'd be my preference, but I'll leave that to you if that's okay.

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

* [PATCH v2] cxl: Fixed defined but not used warnings
  2021-08-30 17:17 [PATCH 1/3] cxl: Fixed defined but not used warnings Ben Widawsky
                   ` (2 preceding siblings ...)
  2021-08-30 18:49 ` [PATCH 1/3] cxl: Fixed defined but not used warnings Dan Williams
@ 2021-09-02 17:14 ` Ben Widawsky
  3 siblings, 0 replies; 10+ messages in thread
From: Ben Widawsky @ 2021-09-02 17:14 UTC (permalink / raw)
  To: linux-cxl, Dan Williams
  Cc: Ben Widawsky, Alison Schofield, Ira Weiny, Jonathan Cameron,
	Vishal Verma

This fixes unused-const-variable warnings emitted by gcc when cxlmem.h
is used by pretty much all files except pci.c

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
v2: Replace __maybe_unused with __attribute__((__unused__)) (Dan)
---
 include/uapi/linux/cxl_mem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h
index f6e8a005b113..8d206f27bb6d 100644
--- a/include/uapi/linux/cxl_mem.h
+++ b/include/uapi/linux/cxl_mem.h
@@ -50,7 +50,7 @@ enum { CXL_CMDS };
 #define ___C(a, b) { b }
 static const struct {
 	const char *name;
-} cxl_command_names[] = { CXL_CMDS };
+} cxl_command_names[] __attribute__((__unused__)) = { CXL_CMDS };
 
 /*
  * Here's how this actually breaks out:
-- 
2.33.0


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

* Re: [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs
  2021-09-01 19:15   ` Dan Williams
@ 2021-09-04  0:39     ` Dan Williams
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Williams @ 2021-09-04  0:39 UTC (permalink / raw)
  To: Ben Widawsky
  Cc: linux-cxl, Alison Schofield, Ira Weiny, Jonathan Cameron, Vishal Verma

On Wed, Sep 1, 2021 at 12:15 PM Dan Williams <dan.j.williams@intel.com> wrote:
>
> On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
> >
> > Fixed "Excess function parameter" warnings generated by the CHECK stage
> > of build.
> >
>
> I'll add the:
>
> Fixes: bd0964c858ec ("cxl/mbox: Move mailbox and other non-PCI
> specific infrastructure to the core")
>
> ...but otherwise looks good.

So this collided with Jonathan's wider comment to split out some of
the changes from the "cxl/mbox: Move mailbox and other non-PCI
specific infrastructure to the core" into precursor patches. So I
ended up folding this change into a bigger cleanup of
cxl_mem_get_partition_info(), but I'll add a Reported-by tag for my
miss on the doc warning.

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

end of thread, other threads:[~2021-09-04  0:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 17:17 [PATCH 1/3] cxl: Fixed defined but not used warnings Ben Widawsky
2021-08-30 17:17 ` [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs Ben Widawsky
2021-09-01 19:15   ` Dan Williams
2021-09-04  0:39     ` Dan Williams
2021-08-30 17:17 ` [PATCH 3/3] cxl/docs: Remove undocumented references Ben Widawsky
2021-09-01 19:18   ` Dan Williams
2021-09-02 17:09     ` Ben Widawsky
2021-08-30 18:49 ` [PATCH 1/3] cxl: Fixed defined but not used warnings Dan Williams
2021-08-30 19:06   ` Ben Widawsky
2021-09-02 17:14 ` [PATCH v2] " Ben Widawsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).