[PATCH v2 2/4] dmaengine: ioatdma: move sysfs entry definition out of header

Thomas Weißschuh posted 4 patches 1 month ago
[PATCH v2 2/4] dmaengine: ioatdma: move sysfs entry definition out of header
Posted by Thomas Weißschuh 1 month ago
Move struct ioat_sysfs_entry into sysfs.c because it is only used in it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 drivers/dma/ioat/dma.h   | 6 ------
 drivers/dma/ioat/sysfs.c | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index 27d2b411853f..e187f3a7e968 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -140,12 +140,6 @@ struct ioatdma_chan {
 	int prev_intr_coalesce;
 };
 
-struct ioat_sysfs_entry {
-	struct attribute attr;
-	ssize_t (*show)(struct dma_chan *, char *);
-	ssize_t (*store)(struct dma_chan *, const char *, size_t);
-};
-
 /**
  * struct ioat_sed_ent - wrapper around super extended hardware descriptor
  * @hw: hardware SED
diff --git a/drivers/dma/ioat/sysfs.c b/drivers/dma/ioat/sysfs.c
index 5da9b0a7b2bb..709d672bae51 100644
--- a/drivers/dma/ioat/sysfs.c
+++ b/drivers/dma/ioat/sysfs.c
@@ -14,6 +14,12 @@
 
 #include "../dmaengine.h"
 
+struct ioat_sysfs_entry {
+	struct attribute attr;
+	ssize_t (*show)(struct dma_chan *, char *);
+	ssize_t (*store)(struct dma_chan *, const char *, size_t);
+};
+
 static ssize_t cap_show(struct dma_chan *c, char *page)
 {
 	struct dma_device *dma = c->device;

-- 
2.53.0

Re: [PATCH v2 2/4] dmaengine: ioatdma: move sysfs entry definition out of header
Posted by Frank Li 1 month ago
On Wed, Mar 04, 2026 at 10:44:38PM +0100, Thomas Weißschuh wrote:
> Move struct ioat_sysfs_entry into sysfs.c because it is only used in it.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/dma/ioat/dma.h   | 6 ------
>  drivers/dma/ioat/sysfs.c | 6 ++++++
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
> index 27d2b411853f..e187f3a7e968 100644
> --- a/drivers/dma/ioat/dma.h
> +++ b/drivers/dma/ioat/dma.h
> @@ -140,12 +140,6 @@ struct ioatdma_chan {
>  	int prev_intr_coalesce;
>  };
>
> -struct ioat_sysfs_entry {
> -	struct attribute attr;
> -	ssize_t (*show)(struct dma_chan *, char *);
> -	ssize_t (*store)(struct dma_chan *, const char *, size_t);
> -};
> -
>  /**
>   * struct ioat_sed_ent - wrapper around super extended hardware descriptor
>   * @hw: hardware SED
> diff --git a/drivers/dma/ioat/sysfs.c b/drivers/dma/ioat/sysfs.c
> index 5da9b0a7b2bb..709d672bae51 100644
> --- a/drivers/dma/ioat/sysfs.c
> +++ b/drivers/dma/ioat/sysfs.c
> @@ -14,6 +14,12 @@
>
>  #include "../dmaengine.h"
>
> +struct ioat_sysfs_entry {
> +	struct attribute attr;
> +	ssize_t (*show)(struct dma_chan *, char *);
> +	ssize_t (*store)(struct dma_chan *, const char *, size_t);
> +};
> +
>  static ssize_t cap_show(struct dma_chan *c, char *page)
>  {
>  	struct dma_device *dma = c->device;
>
> --
> 2.53.0
>
Re: [PATCH v2 2/4] dmaengine: ioatdma: move sysfs entry definition out of header
Posted by Dave Jiang 1 month ago

On 3/4/26 2:44 PM, Thomas Weißschuh wrote:
> Move struct ioat_sysfs_entry into sysfs.c because it is only used in it.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Acked-by: Dave Jiang <dave.jiang@intel.com>


> ---
>  drivers/dma/ioat/dma.h   | 6 ------
>  drivers/dma/ioat/sysfs.c | 6 ++++++
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
> index 27d2b411853f..e187f3a7e968 100644
> --- a/drivers/dma/ioat/dma.h
> +++ b/drivers/dma/ioat/dma.h
> @@ -140,12 +140,6 @@ struct ioatdma_chan {
>  	int prev_intr_coalesce;
>  };
>  
> -struct ioat_sysfs_entry {
> -	struct attribute attr;
> -	ssize_t (*show)(struct dma_chan *, char *);
> -	ssize_t (*store)(struct dma_chan *, const char *, size_t);
> -};
> -
>  /**
>   * struct ioat_sed_ent - wrapper around super extended hardware descriptor
>   * @hw: hardware SED
> diff --git a/drivers/dma/ioat/sysfs.c b/drivers/dma/ioat/sysfs.c
> index 5da9b0a7b2bb..709d672bae51 100644
> --- a/drivers/dma/ioat/sysfs.c
> +++ b/drivers/dma/ioat/sysfs.c
> @@ -14,6 +14,12 @@
>  
>  #include "../dmaengine.h"
>  
> +struct ioat_sysfs_entry {
> +	struct attribute attr;
> +	ssize_t (*show)(struct dma_chan *, char *);
> +	ssize_t (*store)(struct dma_chan *, const char *, size_t);
> +};
> +
>  static ssize_t cap_show(struct dma_chan *c, char *page)
>  {
>  	struct dma_device *dma = c->device;
>