lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103151457.jqEYJuHc-lkp@intel.com>
Date:   Mon, 15 Mar 2021 14:15:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: drivers/rtc/rtc-tps65910.c:422:7: error: implicit declaration of
 function 'device_property_present'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1e28eed17697bcf343c6743f0028cc3b5dd88bf0
commit: 454ba154a62c8806e82a3581c5233a5176cd7dd7 rtc: tps65910: Support wakeup-source property
date:   7 weeks ago
config: microblaze-randconfig-r002-20210315 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=454ba154a62c8806e82a3581c5233a5176cd7dd7
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 454ba154a62c8806e82a3581c5233a5176cd7dd7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/rtc/rtc-tps65910.c: In function 'tps65910_rtc_probe':
>> drivers/rtc/rtc-tps65910.c:422:7: error: implicit declaration of function 'device_property_present' [-Werror=implicit-function-declaration]
     422 |   if (device_property_present(tps65910->dev, "wakeup-source"))
         |       ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/device_property_present +422 drivers/rtc/rtc-tps65910.c

   363	
   364	static int tps65910_rtc_probe(struct platform_device *pdev)
   365	{
   366		struct tps65910 *tps65910 = NULL;
   367		struct tps65910_rtc *tps_rtc = NULL;
   368		int ret;
   369		int irq;
   370		u32 rtc_reg;
   371	
   372		tps65910 = dev_get_drvdata(pdev->dev.parent);
   373	
   374		tps_rtc = devm_kzalloc(&pdev->dev, sizeof(struct tps65910_rtc),
   375				GFP_KERNEL);
   376		if (!tps_rtc)
   377			return -ENOMEM;
   378	
   379		tps_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
   380		if (IS_ERR(tps_rtc->rtc))
   381			return PTR_ERR(tps_rtc->rtc);
   382	
   383		/* Clear pending interrupts */
   384		ret = regmap_read(tps65910->regmap, TPS65910_RTC_STATUS, &rtc_reg);
   385		if (ret < 0)
   386			return ret;
   387	
   388		ret = regmap_write(tps65910->regmap, TPS65910_RTC_STATUS, rtc_reg);
   389		if (ret < 0)
   390			return ret;
   391	
   392		dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n");
   393	
   394		/* Enable RTC digital power domain */
   395		ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,
   396			DEVCTRL_RTC_PWDN_MASK, 0 << DEVCTRL_RTC_PWDN_SHIFT);
   397		if (ret < 0)
   398			return ret;
   399	
   400		rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;
   401		ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg);
   402		if (ret < 0)
   403			return ret;
   404	
   405		platform_set_drvdata(pdev, tps_rtc);
   406	
   407		irq  = platform_get_irq(pdev, 0);
   408		if (irq <= 0) {
   409			dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n",
   410				irq);
   411			return -ENXIO;
   412		}
   413	
   414		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
   415			tps65910_rtc_interrupt, IRQF_TRIGGER_LOW,
   416			dev_name(&pdev->dev), &pdev->dev);
   417		if (ret < 0)
   418			irq = -1;
   419	
   420		tps_rtc->irq = irq;
   421		if (irq != -1) {
 > 422			if (device_property_present(tps65910->dev, "wakeup-source"))
   423				device_init_wakeup(&pdev->dev, 1);
   424			else
   425				device_set_wakeup_capable(&pdev->dev, 1);
   426		} else {
   427			clear_bit(RTC_FEATURE_ALARM, tps_rtc->rtc->features);
   428		}
   429	
   430		tps_rtc->rtc->ops = &tps65910_rtc_ops;
   431		tps_rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
   432		tps_rtc->rtc->range_max = RTC_TIMESTAMP_END_2099;
   433	
   434		return devm_rtc_register_device(tps_rtc->rtc);
   435	}
   436	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (27327 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ