From: Dan Carpenter <dan.carpenter@linaro.org>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: error27@gmail.com, smatch@vger.kernel.org,
christophe.jaillet@wanadoo.fr, harshit.m.mogalapalli@gmail.com
Subject: Re: [PATCH] check_ida_alloc: Improve check to not warn when min is '1'
Date: Thu, 26 Oct 2023 15:27:07 +0300 [thread overview]
Message-ID: <57a05f3a-e3d9-41ab-82be-17076bdb7a4c@kadam.mountain> (raw)
In-Reply-To: <20231026120117.1025540-1-harshit.m.mogalapalli@oracle.com>
On Thu, Oct 26, 2023 at 05:01:17AM -0700, Harshit Mogalapalli wrote:
> This check warns when the max argument of ida_alloc_range is not of the
> the form "2^x-1".
>
> It is fine to not warn when min argument is 1 and max argument is a
> power of 2.
>
> Before this patch:
> drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c:587 macsec_fs_tx_setup_fte() error: Calling ida_alloc_range() with a 'max' argument which is a power of 2. -1 missing?
>
> After this patch:
> Smatch will not warn as the min argument is one.
>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Right. Because people count from 0-9 or 1-10 but not 0-10.
Applied. Thanks!
I'll probably push this tomorrow.
regards,
dan carpenter
prev parent reply other threads:[~2023-10-26 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 12:01 [PATCH] check_ida_alloc: Improve check to not warn when min is '1' Harshit Mogalapalli
2023-10-26 12:27 ` Dan Carpenter [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=57a05f3a-e3d9-41ab-82be-17076bdb7a4c@kadam.mountain \
--to=dan.carpenter@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=smatch@vger.kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).