From: Luis Felipe Hernandez <luis.hernandez093@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org,
rbm@suse.com, skhan@linuxfoundation.org,
linux-usb@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] lib/math: Add int_sqrt test suite
Date: Wed, 11 Dec 2024 17:33:23 -0500 [thread overview]
Message-ID: <Z1oTM-ZW7u0_TML7@x13> (raw)
In-Reply-To: <ad95d09e-ddbe-4d43-bf22-00c2008823d8@rowland.harvard.edu>
On Wed, Dec 11, 2024 at 03:42:33PM -0500, Alan Stern wrote:
Hi Alan,
Thank you for the review and feedback. I apologize about my previous
patch, particularly CC'ing the linux-usb list unnecessarily and the
spelling errors.
I'll address your suggestions in a subsequent revision of this patch.
> I don't know why you CC'ed linux-usb for this patch. But as long as you
> did...
This was mas my mistake, I must've pulled it from my bash history of a
previous patch I created with git format-patch. I will be more thorough
and ensure I use b4 in new patches to help generate the recipients list.
>> + { 3, 1, "non-perfect square: sqaure root of 3" },
> s/sqau/squa/
>> + { 5, 2, "non-perfect square: square root of 5" },
> s/square root/square root/
I failed to run checkpatch with --strict --codespell, it could've
easily caught this. I'll update my post-commit hook to prevent missing
this step in the future.
I'll update these accoridngly:
{ 3, 1, "non-perfect square: square root of 3" },
...
{ 5, 2, "non-perfect square: square root of 5" },
> For the higher numbers (16, 81, etc.), you should test N-1 (and maybe
> also N+1) as well as N.
Good point, I'm assuming this will help ensure the test suite validates
int_sqrt() behavior around the boundaries of a perfect square.
I'll add the following test cases as per your suggestion:
{ 15, 3, "non-perfect square: square root of 15 (N-1 from 16)" },
{ 16, 4, "perfect square: square root of 16" },
{ 17, 4, "non-perfect square: square root of 17 (N+1 from 16)" },
{ 80, 8, "non-perfect square: square root of 80 (N-1 from 81)" },
{ 81, 9, "perfect square: square root of 81" },
{ 82, 9, "non-perfect square: square root of 82 (N+1 from 81)" },
{ 255, 15, "non-perfect square: square root of 255 (N-1 from 256)" },
{ 256, 16, "perfect square: square root of 256" },
{ 257, 16, "non-perfect square: square root of 257 (N+1 from 256)" },
Thank you for your time Alan, and again I apologize to you and the
linux-usb mailing list.
Best,
Felipe
prev parent reply other threads:[~2024-12-11 22:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 20:34 [PATCH v5] lib/math: Add int_sqrt test suite Luis Felipe Hernandez
2024-12-11 20:42 ` Alan Stern
2024-12-11 22:33 ` Luis Felipe Hernandez [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=Z1oTM-ZW7u0_TML7@x13 \
--to=luis.hernandez093@gmail.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rbm@suse.com \
--cc=skhan@linuxfoundation.org \
--cc=stern@rowland.harvard.edu \
/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.