All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>
Subject: [libata:for-7.2-fixes 5/5] drivers/ata/sata_dwc_460ex.c:1125:29: warning: unused variable 'np'
Date: Tue, 30 Jun 2026 12:46:34 +0800	[thread overview]
Message-ID: <202606301243.9MrXM4WY-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-06-30  4:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202606301243.9MrXM4WY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rosenp@gmail.com \
    /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 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.