All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] firewire: core: suppress overflow warning when computing jiffies from isochronous cycle
Date: Thu, 25 Sep 2025 22:53:21 +0900	[thread overview]
Message-ID: <20250925135321.GA329042@workstation.local> (raw)
In-Reply-To: <20250924131140.261686-1-o-takashi@sakamocchi.jp>

On Wed, Sep 24, 2025 at 10:11:40PM +0900, Takashi Sakamoto wrote:
> The multiplication by USEC_PER_SEC (=1000000L) may trigger an overflow
> warning with 32 bit storage. In the case of the subsystem the input value
> ranges between 800 and 16000, thus the result always fits within 32 bit
> storage.
> 
> This commit suppresses the warning by using widening conversion to 64 bit
> storage before multiplication, then using narrowing conversion to 32 bit
> storage.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509170136.b5ZHaNAV-lkp@intel.com/
> Fixes: 379b870c28c6 ("firewire: core: use helper macros instead of direct access to HZ")
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
>  drivers/firewire/core.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next branch.


Regards

Takashi Sakamoto

      reply	other threads:[~2025-09-25 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 13:11 [PATCH] firewire: core: suppress overflow warning when computing jiffies from isochronous cycle Takashi Sakamoto
2025-09-25 13:53 ` Takashi Sakamoto [this message]

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=20250925135321.GA329042@workstation.local \
    --to=o-takashi@sakamocchi.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=lkp@intel.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.