All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol@kernel.org>
To: kernel test robot <lkp@intel.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Oliver Hartkopp <socketcan@hartkopp.net>
Cc: oe-kbuild-all@lists.linux.dev,
	"Stéphane Grosjean" <stephane.grosjean@hms-networks.com>,
	"Robert Nawrath" <mbro1689@gmail.com>,
	"Minh Le" <minh.le.aj@renesas.com>,
	"Duy Nguyen" <duy.nguyen.rh@renesas.com>,
	linux-can@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/9] can: calc_bittiming: add PWM calculation
Date: Tue, 14 Oct 2025 11:32:04 +0900	[thread overview]
Message-ID: <3067598f-9465-4544-a35f-6c09b5a8d4ad@kernel.org> (raw)
In-Reply-To: <289f4023-9559-4b84-b4fe-b6eda646e858@kernel.org>

On 14/10/2025 at 11:19, Vincent Mailhol wrote:
> On 14/10/2025 at 11:05, Vincent Mailhol wrote:
>> On 14/10/2025 at 06:21, kernel test robot wrote:
>>> Hi Vincent,
>>>
>>> kernel test robot noticed the following build warnings:
>>>
>>> [auto build test WARNING on cb6649f6217c0331b885cf787f1d175963e2a1d2]
>>>
>>> url:    https://github.com/intel-lab-lkp/linux/commits/Vincent-Mailhol/can-dev-can_dev_dropped_skb-drop-CAN-FD-skbs-if-FD-is-off/20251013-191232
>>> base:   cb6649f6217c0331b885cf787f1d175963e2a1d2
>>> patch link:    https://lore.kernel.org/r/20251013-canxl-netlink-v1-8-f422b7e2729f%40kernel.org
>>> patch subject: [PATCH 8/9] can: calc_bittiming: add PWM calculation
>>> config: riscv-randconfig-001-20251014 (https://download.01.org/0day-ci/archive/20251014/202510140553.qo3f0I9s-lkp@intel.com/config)
>>> compiler: riscv64-linux-gcc (GCC) 10.5.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251014/202510140553.qo3f0I9s-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/202510140553.qo3f0I9s-lkp@intel.com/
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>    In file included from include/linux/can/dev.h:18,
>>>                     from net/can/raw.c:53:
>>>    include/linux/can/bittiming.h: In function 'can_calc_pwm':
>>>>> include/linux/can/bittiming.h:204:1: warning: no return statement in function returning non-void [-Wreturn-type]
>>>      204 | }
>>>          | ^
>>>
>>> Kconfig warnings: (for reference only)
>>>    WARNING: unmet direct dependencies detected for ARCH_HAS_ELF_CORE_EFLAGS
>>>    Depends on [n]: BINFMT_ELF [=y] && ELF_CORE [=n]
>>>    Selected by [y]:
>>>    - RISCV [=y]
>>>
>>>
>>> vim +204 include/linux/can/bittiming.h
>>>
>>>    200	
>>>    201	static inline int
>>>    202	can_calc_pwm(struct net_device *dev, struct netlink_ext_ack *extack)
>>>    203	{
>>>  > 204	}
>>>    205	#endif /* CONFIG_CAN_CALC_BITTIMING */
>>>    206	
>>
>> I see, this only occurs if CONFIG_CAN_CALC_BITTIMING is not set.
>>
>> What is surprising enough is that can_calc_tdco() has the exact same
>> issue but we never received a report.
> 
> Actually, can_calc_tdco() is not getting a warning because it returns
> void. But this doesn't change the fact that it should be returning an
> error when CONFIG_CAN_CALC_BITTIMING is not set.

I spoke too quickly. can_calc_tdco() is only called when no TDC
parameters are provided. In that case, if CONFIG_CAN_CALC_BITTIMING is
not set, doing nothing is the correct approach. i.e. there is nothing
to fix here. So there will be no fix patch to net/main and I will
directly incorporate the fix in a v2.

Sorry for the noise!


Yours sincerely,
Vincent Mailhol

  reply	other threads:[~2025-10-14  2:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 11:01 [PATCH 0/9] can: netlink: add CAN XL Vincent Mailhol
2025-10-13 11:01 ` [PATCH 1/9] can: dev: can_dev_dropped_skb: drop CAN FD skbs if FD is off Vincent Mailhol
2025-10-17  8:28   ` Marc Kleine-Budde
2025-10-17 13:27     ` Marc Kleine-Budde
2025-10-17 15:30       ` Vincent Mailhol
2025-10-17 15:34         ` Marc Kleine-Budde
2025-10-13 11:01 ` [PATCH 2/9] can: netlink: add CAN_CTRLMODE_RESTRICTED Vincent Mailhol
2025-10-13 11:01 ` [PATCH 3/9] can: netlink: add initial CAN XL support Vincent Mailhol
2025-11-14 13:19   ` Oliver Hartkopp
2025-11-14 13:34     ` Stéphane Grosjean
2025-11-15 13:35     ` Vincent Mailhol
2025-11-15 13:58       ` Oliver Hartkopp
2025-11-17 13:31       ` Stéphane Grosjean
2025-10-13 11:01 ` [PATCH 4/9] can: netlink: add CAN_CTRLMODE_XL_TMS flag Vincent Mailhol
2025-10-13 11:01 ` [PATCH 5/9] can: netlink: add CAN_CTRLMODE_XL_ERR_SIGNAL Vincent Mailhol
2025-10-13 11:01 ` [PATCH 6/9] can: bittiming: add PWM parameters Vincent Mailhol
2025-10-13 11:01 ` [PATCH 7/9] can: bittiming: add PWM validation Vincent Mailhol
2025-10-13 11:01 ` [PATCH 8/9] can: calc_bittiming: add PWM calculation Vincent Mailhol
2025-10-13 21:21   ` kernel test robot
2025-10-14  2:05     ` Vincent Mailhol
2025-10-14  2:19       ` Vincent Mailhol
2025-10-14  2:32         ` Vincent Mailhol [this message]
2025-10-13 11:01 ` [PATCH 9/9] can: netlink: add PWM netlink interface Vincent Mailhol
2025-10-13 11:44 ` [PATCH 0/9] can: netlink: add CAN XL Vincent Mailhol
2025-10-17 13:53 ` Marc Kleine-Budde
2025-10-17 15:40   ` Vincent Mailhol
2025-10-17 16:02     ` Marc Kleine-Budde
2025-10-17 16:20       ` Vincent Mailhol
2025-10-17 16:34         ` Marc Kleine-Budde

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=3067598f-9465-4544-a35f-6c09b5a8d4ad@kernel.org \
    --to=mailhol@kernel.org \
    --cc=duy.nguyen.rh@renesas.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mbro1689@gmail.com \
    --cc=minh.le.aj@renesas.com \
    --cc=mkl@pengutronix.de \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=socketcan@hartkopp.net \
    --cc=stephane.grosjean@hms-networks.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.