* Re: [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
[not found] <202602071311.Q6tATiyh-lkp@intel.com>
@ 2026-02-07 10:56 ` Thomas Weißschuh
2026-02-07 15:07 ` Guenter Roeck
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Weißschuh @ 2026-02-07 10:56 UTC (permalink / raw)
To: Guenter Roeck
Cc: kernel test robot, oe-kbuild-all, Tzung-Bi Shih, linux-kernel
On 2026-02-07 13:14:53+0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 9845cf73f7db6094c0d8419d6adb848028f4a921
> commit: 165c14597d53cfa7bc97b4ff8bc85f7bd98262b7 [10251/12094] hwmon: (cros_ec) Add support for temperature thresholds
> config: x86_64-randconfig-071-20260207 (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-lkp@intel.com/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-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/202602071311.Q6tATiyh-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
This is due to the call to unreachable() in cros_ec_hwmon_attr_to_thres().
Replacing it with BUG() avoids the issue.
Guenter, do you want to drop the patches for now and I'll resend them
next cycle? I can also send an incremental patch. Or you just fix it up
in your branch.
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
2026-02-07 10:56 ` [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d Thomas Weißschuh
@ 2026-02-07 15:07 ` Guenter Roeck
2026-02-07 15:33 ` Thomas Weißschuh
0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2026-02-07 15:07 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: kernel test robot, oe-kbuild-all, Tzung-Bi Shih, linux-kernel
On 2/7/26 02:56, Thomas Weißschuh wrote:
> On 2026-02-07 13:14:53+0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head: 9845cf73f7db6094c0d8419d6adb848028f4a921
>> commit: 165c14597d53cfa7bc97b4ff8bc85f7bd98262b7 [10251/12094] hwmon: (cros_ec) Add support for temperature thresholds
>> config: x86_64-randconfig-071-20260207 (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-lkp@intel.com/config)
>> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-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/202602071311.Q6tATiyh-lkp@intel.com/
>>
>> All errors (new ones prefixed by >>):
>>
>>>> drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
>
> This is due to the call to unreachable() in cros_ec_hwmon_attr_to_thres().
> Replacing it with BUG() avoids the issue.
>
> Guenter, do you want to drop the patches for now and I'll resend them
> next cycle? I can also send an incremental patch. Or you just fix it up
> in your branch.
>
I strongly dislike BUG() because it means "I don't trust my own code".
The final "else" in the code is not really necessary and should be dropped.
I can do that if you like, but I won't introduce BUG().
Thanks,
Guenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
2026-02-07 15:07 ` Guenter Roeck
@ 2026-02-07 15:33 ` Thomas Weißschuh
2026-02-07 16:26 ` Guenter Roeck
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Weißschuh @ 2026-02-07 15:33 UTC (permalink / raw)
To: Guenter Roeck
Cc: kernel test robot, oe-kbuild-all, Tzung-Bi Shih, linux-kernel
On 2026-02-07 07:07:13-0800, Guenter Roeck wrote:
> On 2/7/26 02:56, Thomas Weißschuh wrote:
> > On 2026-02-07 13:14:53+0800, kernel test robot wrote:
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head: 9845cf73f7db6094c0d8419d6adb848028f4a921
> > > commit: 165c14597d53cfa7bc97b4ff8bc85f7bd98262b7 [10251/12094] hwmon: (cros_ec) Add support for temperature thresholds
> > > config: x86_64-randconfig-071-20260207 (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-lkp@intel.com/config)
> > > compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-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/202602071311.Q6tATiyh-lkp@intel.com/
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > > > > drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
> >
> > This is due to the call to unreachable() in cros_ec_hwmon_attr_to_thres().
> > Replacing it with BUG() avoids the issue.
> >
> > Guenter, do you want to drop the patches for now and I'll resend them
> > next cycle? I can also send an incremental patch. Or you just fix it up
> > in your branch.
> >
>
> I strongly dislike BUG() because it means "I don't trust my own code".
Agreed, I am not a fan either, which is why I used unreachable()
originally.
> The final "else" in the code is not really necessary and should be dropped.
That will trigger a compiler warning:
drivers/hwmon/cros_ec_hwmon.c:170:1: error: control reaches end of non-void function [-Werror=return-type]
170 | }
| ^
> I can do that if you like, but I won't introduce BUG().
Another alternative would be to use __builtin_trap(),
but that feels too low-level for driver code.
Or we return a dummy value, knowing that it will never actually happen.
I'm a open for other suggestions.
Weirdly enough the objtool warning only seems to happen on GCC 14.2,
my system GCC 15.2 is not affected. Not that it will make a difference
in practice.
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
2026-02-07 15:33 ` Thomas Weißschuh
@ 2026-02-07 16:26 ` Guenter Roeck
2026-02-07 16:43 ` Thomas Weißschuh
0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2026-02-07 16:26 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: kernel test robot, oe-kbuild-all, Tzung-Bi Shih, linux-kernel
On 2/7/26 07:33, Thomas Weißschuh wrote:
> On 2026-02-07 07:07:13-0800, Guenter Roeck wrote:
>> On 2/7/26 02:56, Thomas Weißschuh wrote:
>>> On 2026-02-07 13:14:53+0800, kernel test robot wrote:
>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>>> head: 9845cf73f7db6094c0d8419d6adb848028f4a921
>>>> commit: 165c14597d53cfa7bc97b4ff8bc85f7bd98262b7 [10251/12094] hwmon: (cros_ec) Add support for temperature thresholds
>>>> config: x86_64-randconfig-071-20260207 (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-lkp@intel.com/config)
>>>> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-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/202602071311.Q6tATiyh-lkp@intel.com/
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>>> drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
>>>
>>> This is due to the call to unreachable() in cros_ec_hwmon_attr_to_thres().
>>> Replacing it with BUG() avoids the issue.
>>>
>>> Guenter, do you want to drop the patches for now and I'll resend them
>>> next cycle? I can also send an incremental patch. Or you just fix it up
>>> in your branch.
>>>
>>
>> I strongly dislike BUG() because it means "I don't trust my own code".
>
> Agreed, I am not a fan either, which is why I used unreachable()
> originally.
>
>> The final "else" in the code is not really necessary and should be dropped.
>
> That will trigger a compiler warning:
>
> drivers/hwmon/cros_ec_hwmon.c:170:1: error: control reaches end of non-void function [-Werror=return-type]
> 170 | }
> | ^
>
I meant something like
diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c
index 5b998cd5e506..6cf5ab0f4b73 100644
--- a/drivers/hwmon/cros_ec_hwmon.c
+++ b/drivers/hwmon/cros_ec_hwmon.c
@@ -165,10 +165,7 @@ static enum ec_temp_thresholds cros_ec_hwmon_attr_to_thres(u32 attr)
return EC_TEMP_THRESH_WARN;
else if (attr == hwmon_temp_crit)
return EC_TEMP_THRESH_HIGH;
- else if (attr == hwmon_temp_emergency)
- return EC_TEMP_THRESH_HALT;
- else
- unreachable();
+ return EC_TEMP_THRESH_HALT; /* attr == hwmon_temp_emergency */
}
Guenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
2026-02-07 16:26 ` Guenter Roeck
@ 2026-02-07 16:43 ` Thomas Weißschuh
2026-02-07 17:34 ` Guenter Roeck
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Weißschuh @ 2026-02-07 16:43 UTC (permalink / raw)
To: Guenter Roeck
Cc: kernel test robot, oe-kbuild-all, Tzung-Bi Shih, linux-kernel
On 2026-02-07 08:26:37-0800, Guenter Roeck wrote:
> On 2/7/26 07:33, Thomas Weißschuh wrote:
> > On 2026-02-07 07:07:13-0800, Guenter Roeck wrote:
> > > On 2/7/26 02:56, Thomas Weißschuh wrote:
> > > > On 2026-02-07 13:14:53+0800, kernel test robot wrote:
> > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > > head: 9845cf73f7db6094c0d8419d6adb848028f4a921
> > > > > commit: 165c14597d53cfa7bc97b4ff8bc85f7bd98262b7 [10251/12094] hwmon: (cros_ec) Add support for temperature thresholds
> > > > > config: x86_64-randconfig-071-20260207 (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-lkp@intel.com/config)
> > > > > compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> > > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-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/202602071311.Q6tATiyh-lkp@intel.com/
> > > > >
> > > > > All errors (new ones prefixed by >>):
> > > > >
> > > > > > > drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
> > > >
> > > > This is due to the call to unreachable() in cros_ec_hwmon_attr_to_thres().
> > > > Replacing it with BUG() avoids the issue.
> > > >
> > > > Guenter, do you want to drop the patches for now and I'll resend them
> > > > next cycle? I can also send an incremental patch. Or you just fix it up
> > > > in your branch.
> > > >
> > >
> > > I strongly dislike BUG() because it means "I don't trust my own code".
> >
> > Agreed, I am not a fan either, which is why I used unreachable()
> > originally.
> >
> > > The final "else" in the code is not really necessary and should be dropped.
> >
> > That will trigger a compiler warning:
> >
> > drivers/hwmon/cros_ec_hwmon.c:170:1: error: control reaches end of non-void function [-Werror=return-type]
> > 170 | }
> > | ^
> >
>
> I meant something like
>
> diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c
> index 5b998cd5e506..6cf5ab0f4b73 100644
> --- a/drivers/hwmon/cros_ec_hwmon.c
> +++ b/drivers/hwmon/cros_ec_hwmon.c
> @@ -165,10 +165,7 @@ static enum ec_temp_thresholds cros_ec_hwmon_attr_to_thres(u32 attr)
> return EC_TEMP_THRESH_WARN;
> else if (attr == hwmon_temp_crit)
> return EC_TEMP_THRESH_HIGH;
> - else if (attr == hwmon_temp_emergency)
> - return EC_TEMP_THRESH_HALT;
> - else
> - unreachable();
> + return EC_TEMP_THRESH_HALT; /* attr == hwmon_temp_emergency */
> }
Welp, that was easy :-/
Let's use it. Feel free to apply it directly.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
2026-02-07 16:43 ` Thomas Weißschuh
@ 2026-02-07 17:34 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2026-02-07 17:34 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: kernel test robot, oe-kbuild-all, Tzung-Bi Shih, linux-kernel
On 2/7/26 08:43, Thomas Weißschuh wrote:
> On 2026-02-07 08:26:37-0800, Guenter Roeck wrote:
>> On 2/7/26 07:33, Thomas Weißschuh wrote:
>>> On 2026-02-07 07:07:13-0800, Guenter Roeck wrote:
>>>> On 2/7/26 02:56, Thomas Weißschuh wrote:
>>>>> On 2026-02-07 13:14:53+0800, kernel test robot wrote:
>>>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>>>>> head: 9845cf73f7db6094c0d8419d6adb848028f4a921
>>>>>> commit: 165c14597d53cfa7bc97b4ff8bc85f7bd98262b7 [10251/12094] hwmon: (cros_ec) Add support for temperature thresholds
>>>>>> config: x86_64-randconfig-071-20260207 (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-lkp@intel.com/config)
>>>>>> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
>>>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260207/202602071311.Q6tATiyh-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/202602071311.Q6tATiyh-lkp@intel.com/
>>>>>>
>>>>>> All errors (new ones prefixed by >>):
>>>>>>
>>>>>>>> drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d
>>>>>
>>>>> This is due to the call to unreachable() in cros_ec_hwmon_attr_to_thres().
>>>>> Replacing it with BUG() avoids the issue.
>>>>>
>>>>> Guenter, do you want to drop the patches for now and I'll resend them
>>>>> next cycle? I can also send an incremental patch. Or you just fix it up
>>>>> in your branch.
>>>>>
>>>>
>>>> I strongly dislike BUG() because it means "I don't trust my own code".
>>>
>>> Agreed, I am not a fan either, which is why I used unreachable()
>>> originally.
>>>
>>>> The final "else" in the code is not really necessary and should be dropped.
>>>
>>> That will trigger a compiler warning:
>>>
>>> drivers/hwmon/cros_ec_hwmon.c:170:1: error: control reaches end of non-void function [-Werror=return-type]
>>> 170 | }
>>> | ^
>>>
>>
>> I meant something like
>>
>> diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c
>> index 5b998cd5e506..6cf5ab0f4b73 100644
>> --- a/drivers/hwmon/cros_ec_hwmon.c
>> +++ b/drivers/hwmon/cros_ec_hwmon.c
>> @@ -165,10 +165,7 @@ static enum ec_temp_thresholds cros_ec_hwmon_attr_to_thres(u32 attr)
>> return EC_TEMP_THRESH_WARN;
>> else if (attr == hwmon_temp_crit)
>> return EC_TEMP_THRESH_HIGH;
>> - else if (attr == hwmon_temp_emergency)
>> - return EC_TEMP_THRESH_HALT;
>> - else
>> - unreachable();
>> + return EC_TEMP_THRESH_HALT; /* attr == hwmon_temp_emergency */
>> }
>
> Welp, that was easy :-/
> Let's use it. Feel free to apply it directly.
>
Done - squashed into original patch.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-07 17:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <202602071311.Q6tATiyh-lkp@intel.com>
2026-02-07 10:56 ` [linux-next:master 10251/12094] drivers/hwmon/cros_ec_hwmon.o: error: objtool: cros_ec_hwmon_read+0x6c: can't find jump dest instruction at .text+0xd2d Thomas Weißschuh
2026-02-07 15:07 ` Guenter Roeck
2026-02-07 15:33 ` Thomas Weißschuh
2026-02-07 16:26 ` Guenter Roeck
2026-02-07 16:43 ` Thomas Weißschuh
2026-02-07 17:34 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®