mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] dmaengine: ioatdma: make some sysfs structures static
Date: Mon, 2 Mar 2026 15:56:52 -0700	[thread overview]
Message-ID: <e6ea8219-8a40-43d9-b604-1a6b1673cb6a@intel.com> (raw)
In-Reply-To: <20260302-sysfs-const-ioat-v1-1-1229ee1c83f3@weissschuh.net>



On 3/2/26 3:15 PM, Thomas Weißschuh wrote:
> These structures are only used in sysfs.c, where are defined.
> 
> Make them static and remove them from the header.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

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

> ---
>  drivers/dma/ioat/dma.h   | 3 ---
>  drivers/dma/ioat/sysfs.c | 6 +++---
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
> index 12a4a4860a74..27d2b411853f 100644
> --- a/drivers/dma/ioat/dma.h
> +++ b/drivers/dma/ioat/dma.h
> @@ -195,9 +195,6 @@ struct ioat_ring_ent {
>  	struct ioat_sed_ent *sed;
>  };
>  
> -extern const struct sysfs_ops ioat_sysfs_ops;
> -extern struct ioat_sysfs_entry ioat_version_attr;
> -extern struct ioat_sysfs_entry ioat_cap_attr;
>  extern int ioat_pending_level;
>  extern struct kobj_type ioat_ktype;
>  extern struct kmem_cache *ioat_cache;
> diff --git a/drivers/dma/ioat/sysfs.c b/drivers/dma/ioat/sysfs.c
> index 168adf28c5b1..5da9b0a7b2bb 100644
> --- a/drivers/dma/ioat/sysfs.c
> +++ b/drivers/dma/ioat/sysfs.c
> @@ -26,7 +26,7 @@ static ssize_t cap_show(struct dma_chan *c, char *page)
>  		       dma_has_cap(DMA_INTERRUPT, dma->cap_mask) ? " intr" : "");
>  
>  }
> -struct ioat_sysfs_entry ioat_cap_attr = __ATTR_RO(cap);
> +static struct ioat_sysfs_entry ioat_cap_attr = __ATTR_RO(cap);
>  
>  static ssize_t version_show(struct dma_chan *c, char *page)
>  {
> @@ -36,7 +36,7 @@ static ssize_t version_show(struct dma_chan *c, char *page)
>  	return sprintf(page, "%d.%d\n",
>  		       ioat_dma->version >> 4, ioat_dma->version & 0xf);
>  }
> -struct ioat_sysfs_entry ioat_version_attr = __ATTR_RO(version);
> +static struct ioat_sysfs_entry ioat_version_attr = __ATTR_RO(version);
>  
>  static ssize_t
>  ioat_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
> @@ -67,7 +67,7 @@ const char *page, size_t count)
>  	return entry->store(&ioat_chan->dma_chan, page, count);
>  }
>  
> -const struct sysfs_ops ioat_sysfs_ops = {
> +static const struct sysfs_ops ioat_sysfs_ops = {
>  	.show	= ioat_attr_show,
>  	.store  = ioat_attr_store,
>  };
> 


  reply	other threads:[~2026-03-02 22:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 22:15 [PATCH 0/4] dmaengine: ioatdma: some sysfs cleanups and constifications Thomas Weißschuh
2026-03-02 22:15 ` [PATCH 1/4] dmaengine: ioatdma: make some sysfs structures static Thomas Weißschuh
2026-03-02 22:56   ` Dave Jiang [this message]
2026-03-04 16:00   ` Frank Li
2026-03-02 22:15 ` [PATCH 2/4] dmaengine: ioatdma: move sysfs entry definition out of header Thomas Weißschuh
2026-03-04 16:02   ` Frank Li
2026-03-02 22:15 ` [PATCH 3/4] dmaengine: ioatdma: make ioat_ktype const Thomas Weißschuh
2026-03-02 22:49   ` Dave Jiang
2026-03-04 16:03   ` Frank Li
2026-03-02 22:15 ` [PATCH 4/4] dmaengine: ioatdma: make sysfs attributes const Thomas Weißschuh
2026-03-02 22:50   ` Dave Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6ea8219-8a40-43d9-b604-1a6b1673cb6a@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®