DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Dhanya Pillai <dhanya.r.pillai@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>,
	Bruce Allan <bruce.w.allan@intel.com>,
	"Qi Zhang" <qi.z.zhang@intel.com>,
	Xiaolong Ye <xiaolong.ye@intel.com>
Cc: <dev@dpdk.org>, Lukasz Krakowiak <lukaszx.krakowiak@intel.com>,
	<stable@dpdk.org>
Subject: Re: [PATCH v3 03/10] net/ice/base: fix integer overflow issue
Date: Mon, 2 Jun 2025 10:55:34 +0200	[thread overview]
Message-ID: <b88e3d58-0caa-4d83-b576-52f36228c302@intel.com> (raw)
In-Reply-To: <20250527131741.7606-4-dhanya.r.pillai@intel.com>

On 5/27/2025 3:17 PM, Dhanya Pillai wrote:
> From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> 
> Fix issue related to INTEGER_OVERFLOW.

I would also suggest rewording the commit message. Even something like 
the following would be better:

Fix integer overflow issue in power of 2 calculation.

> 
> Fixes: f636f2888cec ("net/ice/base: move and add some help function and macros")
> Cc: stable@dpdk.org
> Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
> ---
>   drivers/net/intel/ice/base/ice_type.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
> index 297a5ea890..ae3b944d6e 100644
> --- a/drivers/net/intel/ice/base/ice_type.h
> +++ b/drivers/net/intel/ice/base/ice_type.h
> @@ -25,7 +25,7 @@
>    */
>   static inline bool ice_is_pow2(u64 val)
>   {
> -	return (val && !(val & (val - 1)));
> +	return val != 0 && (val & (val - 1)) == 0;
>   }
>   
>   /**


-- 
Thanks,
Anatoly

  parent reply	other threads:[~2025-06-02  8:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 13:17 [PATCH v3 00/10] Update ice base code Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 01/10] net/ice/base: fix type conversion Dhanya Pillai
2025-05-27 16:54   ` Bruce Richardson
2025-05-27 13:17 ` [PATCH v3 02/10] net/ice/base: fix typo in media type check Dhanya Pillai
2025-06-02  8:44   ` Burakov, Anatoly
2025-05-27 13:17 ` [PATCH v3 03/10] net/ice/base: fix integer overflow issue Dhanya Pillai
2025-05-27 17:06   ` Bruce Richardson
2025-06-02  8:55   ` Burakov, Anatoly [this message]
2025-05-27 13:17 ` [PATCH v3 04/10] net/ice/base: set speculative execution barrier Dhanya Pillai
2025-05-28 13:07   ` Bruce Richardson
2025-05-28 14:59     ` Bruce Richardson
2025-05-28 17:55       ` Pillai, Dhanya R
2025-05-27 13:17 ` [PATCH v3 05/10] net/ice/base: fix typo in desc for dev ID 579F Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 06/10] net/ice/base: ptp minimal refactoring Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 07/10] net/ice/base: support for MAC rule with own filter flags Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 08/10] net/ice/base: configure PHY FEC error in logs for GNRD Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 09/10] net/ice/base: increase reset timeout to 20 seconds Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 10/10] net/ice/base: update version info Dhanya Pillai
2025-05-29  8:29 ` [PATCH v3 00/10] Update ice base code Bruce Richardson

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=b88e3d58-0caa-4d83-b576-52f36228c302@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=dev@dpdk.org \
    --cc=dhanya.r.pillai@intel.com \
    --cc=lukaszx.krakowiak@intel.com \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).