* [libata:for-7.2-fixes 5/5] drivers/ata/sata_dwc_460ex.c:1125:29: warning: unused variable 'np'
@ 2026-06-30 4:46 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-30 4:46 UTC (permalink / raw)
To: Rosen Penev; +Cc: oe-kbuild-all, Damien Le Moal, Niklas Cassel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux.git for-7.2-fixes
head: 3c234b01c9dccf995e663bc46baaf4294f30c386
commit: 3c234b01c9dccf995e663bc46baaf4294f30c386 [5/5] ata: sata_dwc_460ex: use platform_get_irq()
config: sparc64-randconfig-001-20260630 (https://download.01.org/0day-ci/archive/20260630/202606301243.9MrXM4WY-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260630/202606301243.9MrXM4WY-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606301243.9MrXM4WY-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/ata/sata_dwc_460ex.c: In function 'sata_dwc_probe':
>> drivers/ata/sata_dwc_460ex.c:1125:29: warning: unused variable 'np' [-Wunused-variable]
1125 | struct device_node *np = dev->of_node;
| ^~
vim +/np +1125 drivers/ata/sata_dwc_460ex.c
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1121
1c48a5c93da631 Grant Likely 2011-02-17 1122 static int sata_dwc_probe(struct platform_device *ofdev)
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1123 {
f1550f27f8a92a Andy Shevchenko 2021-12-09 1124 struct device *dev = &ofdev->dev;
f1550f27f8a92a Andy Shevchenko 2021-12-09 @1125 struct device_node *np = dev->of_node;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1126 struct sata_dwc_device *hsdev;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1127 u32 idr, versionr;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1128 char *ver = (char *)&versionr;
175553ed18491b Mans Rullgard 2016-04-26 1129 void __iomem *base;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1130 int err = 0;
4aaa71873ddb9f Andy Shevchenko 2015-01-07 1131 int irq;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1132 struct ata_host *host;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1133 struct ata_port_info pi = sata_dwc_port_info[0];
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1134 const struct ata_port_info *ppi[] = { &pi, NULL };
73ec1b5ab3a713 Andy Shevchenko 2016-04-26 1135 struct resource *res;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1136
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1137 /* Allocate DWC SATA device */
f1550f27f8a92a Andy Shevchenko 2021-12-09 1138 host = ata_host_alloc_pinfo(dev, ppi, SATA_DWC_MAX_PORTS);
f1550f27f8a92a Andy Shevchenko 2021-12-09 1139 hsdev = devm_kzalloc(dev, sizeof(*hsdev), GFP_KERNEL);
d537fc0c0e23ce Andy Shevchenko 2015-01-08 1140 if (!host || !hsdev)
c592b74f6b8ba7 Andy Shevchenko 2015-01-08 1141 return -ENOMEM;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1142
d537fc0c0e23ce Andy Shevchenko 2015-01-08 1143 host->private_data = hsdev;
d537fc0c0e23ce Andy Shevchenko 2015-01-08 1144
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1145 /* Ioremap SATA registers */
f713961de50577 Andy Shevchenko 2021-12-09 1146 base = devm_platform_get_and_ioremap_resource(ofdev, 0, &res);
01c292068e43e7 Wei Yongjun 2016-07-19 1147 if (IS_ERR(base))
73ec1b5ab3a713 Andy Shevchenko 2016-04-26 1148 return PTR_ERR(base);
f1550f27f8a92a Andy Shevchenko 2021-12-09 1149 dev_dbg(dev, "ioremap done for SATA register address\n");
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1150
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1151 /* Synopsys DWC SATA specific Registers */
175553ed18491b Mans Rullgard 2016-04-26 1152 hsdev->sata_dwc_regs = base + SATA_DWC_REG_OFFSET;
d6ecf0c27d7166 Andy Shevchenko 2016-04-26 1153 hsdev->dmadr = res->start + SATA_DWC_REG_OFFSET + offsetof(struct sata_dwc_regs, dmadr);
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1154
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1155 /* Setup port */
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1156 host->ports[0]->ioaddr.cmd_addr = base;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1157 host->ports[0]->ioaddr.scr_addr = base + SATA_DWC_SCR_OFFSET;
ae95d951f7cd11 Mans Rullgard 2016-04-26 1158 sata_dwc_setup_port(&host->ports[0]->ioaddr, base);
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1159
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1160 /* Read the ID and Version Registers */
ee81d6cc8e8aa6 Mans Rullgard 2016-04-26 1161 idr = sata_dwc_readl(&hsdev->sata_dwc_regs->idr);
ee81d6cc8e8aa6 Mans Rullgard 2016-04-26 1162 versionr = sata_dwc_readl(&hsdev->sata_dwc_regs->versionr);
f1550f27f8a92a Andy Shevchenko 2021-12-09 1163 dev_notice(dev, "id %d, controller version %c.%c%c\n", idr, ver[0], ver[1], ver[2]);
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1164
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1165 /* Save dev for later use in dev_xxx() routines */
f1550f27f8a92a Andy Shevchenko 2021-12-09 1166 hsdev->dev = dev;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1167
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1168 /* Enable SATA Interrupts */
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1169 sata_dwc_enable_interrupts(hsdev);
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1170
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1171 /* Get SATA interrupt number */
3c234b01c9dccf Rosen Penev 2026-06-28 1172 irq = platform_get_irq(ofdev, 0);
3c234b01c9dccf Rosen Penev 2026-06-28 1173 if (irq < 0)
3c234b01c9dccf Rosen Penev 2026-06-28 1174 return irq;
62936009f35a66 Rupjyoti Sarmah 2010-07-06 1175
:::::: The code at line 1125 was first introduced by commit
:::::: f1550f27f8a92a4d29329aeeb28b743365abceae ata: sata_dwc_460ex: Use temporary variable for struct device
:::::: TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
:::::: CC: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-30 4:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30 4:46 [libata:for-7.2-fixes 5/5] drivers/ata/sata_dwc_460ex.c:1125:29: warning: unused variable 'np' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.