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 ioat_ktype const

ioat_ktype is never modified, so make it const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260304-sysfs-const-ioat-v2-3-b9b82651219b@weissschuh.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Thomas Weißschuh and committed by
Vinod Koul
81ca3ad0 bc94ca71

+4 -4
+2 -2
drivers/dma/ioat/dma.h
··· 190 190 }; 191 191 192 192 extern int ioat_pending_level; 193 - extern struct kobj_type ioat_ktype; 193 + extern const struct kobj_type ioat_ktype; 194 194 extern struct kmem_cache *ioat_cache; 195 195 extern struct kmem_cache *ioat_sed_cache; 196 196 ··· 393 393 /* IOAT Init functions */ 394 394 bool is_bwd_ioat(struct pci_dev *pdev); 395 395 struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase); 396 - void ioat_kobject_add(struct ioatdma_device *ioat_dma, struct kobj_type *type); 396 + void ioat_kobject_add(struct ioatdma_device *ioat_dma, const struct kobj_type *type); 397 397 void ioat_kobject_del(struct ioatdma_device *ioat_dma); 398 398 int ioat_dma_setup_interrupts(struct ioatdma_device *ioat_dma); 399 399 void ioat_stop(struct ioatdma_chan *ioat_chan);
+2 -2
drivers/dma/ioat/sysfs.c
··· 78 78 .store = ioat_attr_store, 79 79 }; 80 80 81 - void ioat_kobject_add(struct ioatdma_device *ioat_dma, struct kobj_type *type) 81 + void ioat_kobject_add(struct ioatdma_device *ioat_dma, const struct kobj_type *type) 82 82 { 83 83 struct dma_device *dma = &ioat_dma->dma_dev; 84 84 struct dma_chan *c; ··· 166 166 }; 167 167 ATTRIBUTE_GROUPS(ioat); 168 168 169 - struct kobj_type ioat_ktype = { 169 + const struct kobj_type ioat_ktype = { 170 170 .sysfs_ops = &ioat_sysfs_ops, 171 171 .default_groups = ioat_groups, 172 172 };