From: Nathan Chancellor <nathan@kernel.org>
To: Luca Leonardo Scorcia <l.scorcia@gmail.com>,
Daniel Lezcano <daniel.lezcano@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: vmlinux.o: warning: objtool: mtk_timer_probe+0x23: no-cfi indirect call!
Date: Wed, 28 Oct 2026 13:24:00 -0700 [thread overview]
Message-ID: <20261028202400.GA835963@ax162> (raw)
In-Reply-To: <202610290223.iOEGeDs2-lkp@intel.com>
On Thu, Oct 29, 2026 at 03:10:30AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d
> commit: 7a097aba725501c399b5e93d0199aa3a2f6e9c88 clocksource/drivers/timer-mediatek: Convert to OF probing
> date: 2 weeks ago
> config: x86_64-buildonly-randconfig-1001-20261028 (https://download.01.org/0day-ci/archive/20261029/202610290223.iOEGeDs2-lkp@intel.com/config)
> compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261029/202610290223.iOEGeDs2-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
> | Fixes: 7a097aba7255 ("clocksource/drivers/timer-mediatek: Convert to OF probing")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202610290223.iOEGeDs2-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> vmlinux.o: warning: objtool: mtk_timer_probe+0x23: no-cfi indirect call!
This warning occurs as a result of the above change because
of_device_get_match_data() returns NULL when CONFIG_OF is disabled,
which results in LLVM dropping the kCFI setup since it knows that there
is no valid target for this call. Adding a check for a NULL timer_init
avoids the warning, which would probably be more robust anyways since
of_device_get_match_data() could return NULL even with CONFIG_OF=y?
diff --git a/drivers/clocksource/timer-mediatek.c b/drivers/clocksource/timer-mediatek.c
index 842d6ee4259e..33bf4c97bb77 100644
--- a/drivers/clocksource/timer-mediatek.c
+++ b/drivers/clocksource/timer-mediatek.c
@@ -353,6 +353,8 @@ static int mtk_timer_probe(struct platform_device *pdev)
int (*timer_init)(struct platform_device *pdev);
timer_init = of_device_get_match_data(&pdev->dev);
+ if (!timer_init)
+ return -ENODEV;
return timer_init(pdev);
}
--
Cheers,
Nathan
next prev parent reply other threads:[~2026-10-28 20:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 19:10 vmlinux.o: warning: objtool: mtk_timer_probe+0x23: no-cfi indirect call! kernel test robot
2026-10-28 20:24 ` Nathan Chancellor [this message]
2026-10-29 18:54 ` Luca Leonardo Scorcia
2026-10-29 22:06 ` Daniel Lezcano
2026-10-30 4:42 ` Nathan Chancellor
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=20261028202400.GA835963@ax162 \
--to=nathan@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=l.scorcia@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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.