* [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np'
@ 2020-03-24 7:03 YueHaibing
2020-03-25 1:50 ` Peng Ma
2020-03-25 18:11 ` kbuild test robot
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-03-24 7:03 UTC (permalink / raw
To: a.zummo, alexandre.belloni; +Cc: linux-rtc, linux-kernel, peng.ma, YueHaibing
drivers/rtc/rtc-fsl-ftm-alarm.c: In function 'ftm_rtc_probe':
drivers/rtc/rtc-fsl-ftm-alarm.c:246:22: warning: unused variable 'np' [-Wunused-variable]
struct device_node *np = pdev->dev.of_node;
^~
commit cd49b579e705 ("rtc: fsl-ftm-alarm: enable acpi support")
left behind this, remove it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/rtc/rtc-fsl-ftm-alarm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/rtc/rtc-fsl-ftm-alarm.c b/drivers/rtc/rtc-fsl-ftm-alarm.c
index c572044ff06e..0f4142b35f38 100644
--- a/drivers/rtc/rtc-fsl-ftm-alarm.c
+++ b/drivers/rtc/rtc-fsl-ftm-alarm.c
@@ -243,7 +243,6 @@ static const struct rtc_class_ops ftm_rtc_ops = {
static int ftm_rtc_probe(struct platform_device *pdev)
{
- struct device_node *np = pdev->dev.of_node;
int irq;
int ret;
struct ftm_rtc *rtc;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np'
2020-03-24 7:03 [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np' YueHaibing
@ 2020-03-25 1:50 ` Peng Ma
2020-03-25 18:11 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: Peng Ma @ 2020-03-25 1:50 UTC (permalink / raw
To: YueHaibing, a.zummo@towertech.it, alexandre.belloni@bootlin.com
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
>-----Original Message-----
>From: YueHaibing <yuehaibing@huawei.com>
>Sent: 2020年3月24日 15:04
>To: a.zummo@towertech.it; alexandre.belloni@bootlin.com
>Cc: linux-rtc@vger.kernel.org; linux-kernel@vger.kernel.org; Peng Ma
><peng.ma@nxp.com>; YueHaibing <yuehaibing@huawei.com>
>Subject: [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np'
>
>drivers/rtc/rtc-fsl-ftm-alarm.c: In function 'ftm_rtc_probe':
>drivers/rtc/rtc-fsl-ftm-alarm.c:246:22: warning: unused variable 'np'
>[-Wunused-variable]
> struct device_node *np = pdev->dev.of_node;
> ^~
>commit cd49b579e705 ("rtc: fsl-ftm-alarm: enable acpi support") left behind
>this, remove it.
>
>Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>---
> drivers/rtc/rtc-fsl-ftm-alarm.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/rtc/rtc-fsl-ftm-alarm.c b/drivers/rtc/rtc-fsl-ftm-alarm.c index
>c572044ff06e..0f4142b35f38 100644
>--- a/drivers/rtc/rtc-fsl-ftm-alarm.c
>+++ b/drivers/rtc/rtc-fsl-ftm-alarm.c
>@@ -243,7 +243,6 @@ static const struct rtc_class_ops ftm_rtc_ops = {
>
> static int ftm_rtc_probe(struct platform_device *pdev) {
>- struct device_node *np = pdev->dev.of_node;
[Peng Ma] Hi, HaiBing,
Thanks for your patch, this patch has already in upstream(https://lore.kernel.org/patchwork/patch/1214014/)
Best Regards,
Peng
> int irq;
> int ret;
> struct ftm_rtc *rtc;
>--
>2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np'
2020-03-24 7:03 [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np' YueHaibing
2020-03-25 1:50 ` Peng Ma
@ 2020-03-25 18:11 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-03-25 18:11 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5820 bytes --]
Hi YueHaibing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.6-rc7]
[cannot apply to next-20200324 abelloni/rtc-next next-20200325]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/YueHaibing/rtc-fsl-ftm-alarm-remove-set-but-not-used-variable-np/20200325-141254
base: 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/rtc/rtc-fsl-ftm-alarm.c: In function 'ftm_rtc_probe':
>> drivers/rtc/rtc-fsl-ftm-alarm.c:267:29: error: 'np' undeclared (first use in this function); did you mean 'up'?
267 | irq = irq_of_parse_and_map(np, 0);
| ^~
| up
drivers/rtc/rtc-fsl-ftm-alarm.c:267:29: note: each undeclared identifier is reported only once for each function it appears in
vim +267 drivers/rtc/rtc-fsl-ftm-alarm.c
7b0b551dbc1e0ac Biwen Li 2019-08-13 242
7b0b551dbc1e0ac Biwen Li 2019-08-13 243 static int ftm_rtc_probe(struct platform_device *pdev)
7b0b551dbc1e0ac Biwen Li 2019-08-13 244 {
7b0b551dbc1e0ac Biwen Li 2019-08-13 245 int irq;
7b0b551dbc1e0ac Biwen Li 2019-08-13 246 int ret;
7b0b551dbc1e0ac Biwen Li 2019-08-13 247 struct ftm_rtc *rtc;
7b0b551dbc1e0ac Biwen Li 2019-08-13 248
7b0b551dbc1e0ac Biwen Li 2019-08-13 249 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
7b0b551dbc1e0ac Biwen Li 2019-08-13 250 if (unlikely(!rtc)) {
7b0b551dbc1e0ac Biwen Li 2019-08-13 251 dev_err(&pdev->dev, "cannot alloc memory for rtc\n");
7b0b551dbc1e0ac Biwen Li 2019-08-13 252 return -ENOMEM;
7b0b551dbc1e0ac Biwen Li 2019-08-13 253 }
7b0b551dbc1e0ac Biwen Li 2019-08-13 254
7b0b551dbc1e0ac Biwen Li 2019-08-13 255 platform_set_drvdata(pdev, rtc);
7b0b551dbc1e0ac Biwen Li 2019-08-13 256
7b0b551dbc1e0ac Biwen Li 2019-08-13 257 rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
7b0b551dbc1e0ac Biwen Li 2019-08-13 258 if (IS_ERR(rtc->rtc_dev))
7b0b551dbc1e0ac Biwen Li 2019-08-13 259 return PTR_ERR(rtc->rtc_dev);
7b0b551dbc1e0ac Biwen Li 2019-08-13 260
89576bebbc17571 Markus Elfring 2019-09-21 261 rtc->base = devm_platform_ioremap_resource(pdev, 0);
7b0b551dbc1e0ac Biwen Li 2019-08-13 262 if (IS_ERR(rtc->base)) {
7b0b551dbc1e0ac Biwen Li 2019-08-13 263 dev_err(&pdev->dev, "cannot ioremap resource for rtc\n");
7b0b551dbc1e0ac Biwen Li 2019-08-13 264 return PTR_ERR(rtc->base);
7b0b551dbc1e0ac Biwen Li 2019-08-13 265 }
7b0b551dbc1e0ac Biwen Li 2019-08-13 266
7b0b551dbc1e0ac Biwen Li 2019-08-13 @267 irq = irq_of_parse_and_map(np, 0);
7b0b551dbc1e0ac Biwen Li 2019-08-13 268 if (irq <= 0) {
7b0b551dbc1e0ac Biwen Li 2019-08-13 269 dev_err(&pdev->dev, "unable to get IRQ from DT, %d\n", irq);
7b0b551dbc1e0ac Biwen Li 2019-08-13 270 return -EINVAL;
7b0b551dbc1e0ac Biwen Li 2019-08-13 271 }
7b0b551dbc1e0ac Biwen Li 2019-08-13 272
7b0b551dbc1e0ac Biwen Li 2019-08-13 273 ret = devm_request_irq(&pdev->dev, irq, ftm_rtc_alarm_interrupt,
7b0b551dbc1e0ac Biwen Li 2019-08-13 274 IRQF_NO_SUSPEND, dev_name(&pdev->dev), rtc);
7b0b551dbc1e0ac Biwen Li 2019-08-13 275 if (ret < 0) {
7b0b551dbc1e0ac Biwen Li 2019-08-13 276 dev_err(&pdev->dev, "failed to request irq\n");
7b0b551dbc1e0ac Biwen Li 2019-08-13 277 return ret;
7b0b551dbc1e0ac Biwen Li 2019-08-13 278 }
7b0b551dbc1e0ac Biwen Li 2019-08-13 279
7b0b551dbc1e0ac Biwen Li 2019-08-13 280 rtc->big_endian = of_property_read_bool(np, "big-endian");
7b0b551dbc1e0ac Biwen Li 2019-08-13 281 rtc->alarm_freq = (u32)FIXED_FREQ_CLK / (u32)MAX_FREQ_DIV;
7b0b551dbc1e0ac Biwen Li 2019-08-13 282 rtc->rtc_dev->ops = &ftm_rtc_ops;
7b0b551dbc1e0ac Biwen Li 2019-08-13 283
7b0b551dbc1e0ac Biwen Li 2019-08-13 284 device_init_wakeup(&pdev->dev, true);
7b0b551dbc1e0ac Biwen Li 2019-08-13 285
7b0b551dbc1e0ac Biwen Li 2019-08-13 286 ret = rtc_register_device(rtc->rtc_dev);
7b0b551dbc1e0ac Biwen Li 2019-08-13 287 if (ret) {
7b0b551dbc1e0ac Biwen Li 2019-08-13 288 dev_err(&pdev->dev, "can't register rtc device\n");
7b0b551dbc1e0ac Biwen Li 2019-08-13 289 return ret;
7b0b551dbc1e0ac Biwen Li 2019-08-13 290 }
7b0b551dbc1e0ac Biwen Li 2019-08-13 291
7b0b551dbc1e0ac Biwen Li 2019-08-13 292 return 0;
7b0b551dbc1e0ac Biwen Li 2019-08-13 293 }
7b0b551dbc1e0ac Biwen Li 2019-08-13 294
:::::: The code at line 267 was first introduced by commit
:::::: 7b0b551dbc1e0acb2a3a6a7fbebc3ab9cf68a050 rtc: fsl-ftm-alarm: add FTM alarm driver
:::::: TO: Biwen Li <biwen.li@nxp.com>
:::::: CC: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 70313 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-25 18:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-24 7:03 [PATCH -next] rtc: fsl-ftm-alarm: remove set but not used variable 'np' YueHaibing
2020-03-25 1:50 ` Peng Ma
2020-03-25 18:11 ` kbuild 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.