Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: ioatdma: make some sysfs structures static

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>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260304-sysfs-const-ioat-v2-1-b9b82651219b@weissschuh.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Thomas Weißschuh and committed by
Vinod Koul
0124b354 c8e9b1d9

+3 -6
-3
drivers/dma/ioat/dma.h
··· 195 195 struct ioat_sed_ent *sed; 196 196 }; 197 197 198 - extern const struct sysfs_ops ioat_sysfs_ops; 199 - extern struct ioat_sysfs_entry ioat_version_attr; 200 - extern struct ioat_sysfs_entry ioat_cap_attr; 201 198 extern int ioat_pending_level; 202 199 extern struct kobj_type ioat_ktype; 203 200 extern struct kmem_cache *ioat_cache;
+3 -3
drivers/dma/ioat/sysfs.c
··· 26 26 dma_has_cap(DMA_INTERRUPT, dma->cap_mask) ? " intr" : ""); 27 27 28 28 } 29 - struct ioat_sysfs_entry ioat_cap_attr = __ATTR_RO(cap); 29 + static struct ioat_sysfs_entry ioat_cap_attr = __ATTR_RO(cap); 30 30 31 31 static ssize_t version_show(struct dma_chan *c, char *page) 32 32 { ··· 36 36 return sprintf(page, "%d.%d\n", 37 37 ioat_dma->version >> 4, ioat_dma->version & 0xf); 38 38 } 39 - struct ioat_sysfs_entry ioat_version_attr = __ATTR_RO(version); 39 + static struct ioat_sysfs_entry ioat_version_attr = __ATTR_RO(version); 40 40 41 41 static ssize_t 42 42 ioat_attr_show(struct kobject *kobj, struct attribute *attr, char *page) ··· 67 67 return entry->store(&ioat_chan->dma_chan, page, count); 68 68 } 69 69 70 - const struct sysfs_ops ioat_sysfs_ops = { 70 + static const struct sysfs_ops ioat_sysfs_ops = { 71 71 .show = ioat_attr_show, 72 72 .store = ioat_attr_store, 73 73 };