hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/dma/bcm-sba-raid.c
....@@ -120,7 +120,7 @@
120120 struct brcm_message msg;
121121 struct dma_async_tx_descriptor tx;
122122 /* SBA commands */
123
- struct brcm_sba_command cmds[0];
123
+ struct brcm_sba_command cmds[];
124124 };
125125
126126 enum sba_version {
....@@ -164,7 +164,6 @@
164164 struct list_head reqs_free_list;
165165 /* DebugFS directory entries */
166166 struct dentry *root;
167
- struct dentry *stats;
168167 };
169168
170169 /* ====== Command helper routines ===== */
....@@ -1459,8 +1458,7 @@
14591458
14601459 static int sba_debugfs_stats_show(struct seq_file *file, void *offset)
14611460 {
1462
- struct platform_device *pdev = to_platform_device(file->private);
1463
- struct sba_device *sba = platform_get_drvdata(pdev);
1461
+ struct sba_device *sba = dev_get_drvdata(file->private);
14641462
14651463 /* Write stats in file */
14661464 sba_write_stats_in_seqfile(sba, file);
....@@ -1717,17 +1715,11 @@
17171715
17181716 /* Create debugfs root entry */
17191717 sba->root = debugfs_create_dir(dev_name(sba->dev), NULL);
1720
- if (IS_ERR_OR_NULL(sba->root)) {
1721
- dev_err(sba->dev, "failed to create debugfs root entry\n");
1722
- sba->root = NULL;
1723
- goto skip_debugfs;
1724
- }
17251718
17261719 /* Create debugfs stats entry */
1727
- sba->stats = debugfs_create_devm_seqfile(sba->dev, "stats", sba->root,
1728
- sba_debugfs_stats_show);
1729
- if (IS_ERR_OR_NULL(sba->stats))
1730
- dev_err(sba->dev, "failed to create debugfs stats file\n");
1720
+ debugfs_create_devm_seqfile(sba->dev, "stats", sba->root,
1721
+ sba_debugfs_stats_show);
1722
+
17311723 skip_debugfs:
17321724
17331725 /* Register DMA device with Linux async framework */