From: Markus Mayer <markus.mayer@broadcom.com>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Chris Metcalf <cmetcalf@ezchip.com>,
Kees Cook <keescook@chromium.org>,
devel@driverdev.osuosl.org, linux-scsi@vger.kernel.org,
linux-pm@vger.kernel.org, nouveau@lists.freedesktop.org,
speakup@linux-speakup.org,
Linux Kernel <linux-kernel@vger.kernel.org>,
dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org,
target-devel@vger.kernel.org
Subject: Re: [PATCH v3 1/7] lib: string: add functions to case-convert strings
Date: Wed, 13 Jul 2016 16:04:10 -0700 [thread overview]
Message-ID: <CAGt4E5uqxTkQHtaczim2BRijte3z5CVMoG172JaofL7Tf9HdbQ@mail.gmail.com> (raw)
In-Reply-To: <5786C665.6020307@osg.samsung.com>
On 13 July 2016 at 15:53, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
>
> Hi Markus,
>
> Thank you very much for the thorough testing and solution searching.
>
> Earlier today I sent a patch that removes dynamic_debug.h from
> include/linux/kernel.h, since it isn't really needed. Sorry about this
> since it changes what you were testing just a few hours later.
I did see at least some of the changes you posted. I was mostly
curious to see where the problem was coming from in the first place.
> I am starting to think that getting access to SIZE_MAX isn't worth the
> trouble, specially considering that moving an include out of the top
> of the file makes the code less readable. The Linux kernel is growing
> in complexity and trying to keep it readable for newcomers is very
> important IMHO.
I've been thinking the same thing. It seems to be turning into a huge
effort to make this simple constant available.
> The maintainers have the last word on this, but for now I remove my
> question about why use -1 instead of SIZE_MAX.
>
> Apologies for that, the silver lining was that at least for me it was
> interesting to explore this area of the code and its inclusions. I hope
> it was for you as well.
No need to apologize. It seemed like a no-brainer to use SIZE_MAX. :-)
And I am sure all the digging will come handy in some way.
> PD: just a small comment, in case you end up sending a new version of
> your patches. In the following documentation of your functions.
> * @len: Maximum string length. May be SIZE_MAX (-1) to set no limit.
>
> What do you think about "SIZE_MAX or -1" instead of "SIZE_MAX (-1)" to
> avoid confusing any readers who might think SIZE_MAX is a function? As
> I think you intend to mean your code accepts both -1 or SIZE_MAX, which
> is ~0.
>
> Just an idea, feel free to ignore it :)
I think I might use ~(size_t)0 directly instead of -1 (or SIZE_MAX).
Thanks,
-Markus
next prev parent reply other threads:[~2016-07-13 23:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 22:43 [PATCH v3 0/7] lib: string: add functions to case-convert strings Markus Mayer
2016-07-08 22:43 ` [PATCH v3 1/7] " Markus Mayer
2016-07-09 12:04 ` Luis de Bethencourt
2016-07-09 15:30 ` Markus Mayer
2016-07-11 22:46 ` Markus Mayer
2016-07-13 17:19 ` Luis de Bethencourt
2016-07-13 22:26 ` Markus Mayer
2016-07-13 22:53 ` Luis de Bethencourt
2016-07-13 23:04 ` Markus Mayer [this message]
2016-07-08 22:43 ` [PATCH v3 2/7] drm/nouveau/core: make use of new strlcpytolower() function Markus Mayer
2016-07-08 22:43 ` [PATCH v3 3/7] ACPI / device_sysfs: make use of new strtolower() function Markus Mayer
2016-07-08 23:22 ` Rafael J. Wysocki
2016-07-08 22:43 ` [PATCH v3 4/7] staging: speakup: replace spk_strlwr() with strlcpytolower() Markus Mayer
2016-07-13 20:57 ` Samuel Thibault
2016-07-08 22:43 ` [PATCH v3 5/7] iscsi-target: replace iscsi_initiatorname_tolower() with strtolower() Markus Mayer
2016-07-20 21:16 ` Nicholas A. Bellinger
2016-07-20 21:17 ` Nicholas A. Bellinger
2016-07-20 21:19 ` Markus Mayer
2016-07-08 22:43 ` [PATCH v3 6/7] drm/nouveau/fifo/gk104: make use of new strcpytoupper() function Markus Mayer
2016-07-08 22:43 ` [PATCH v3 7/7] power_supply: " Markus Mayer
2016-07-10 3:13 ` [PATCH v3 0/7] lib: string: add functions to case-convert strings Chris Metcalf
2016-07-10 4:11 ` Markus Mayer
2016-07-13 22:52 ` Markus Mayer
2016-07-20 20:28 ` Markus Mayer
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=CAGt4E5uqxTkQHtaczim2BRijte3z5CVMoG172JaofL7Tf9HdbQ@mail.gmail.com \
--to=markus.mayer@broadcom.com \
--cc=akpm@linux-foundation.org \
--cc=cmetcalf@ezchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=keescook@chromium.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=luisbg@osg.samsung.com \
--cc=nouveau@lists.freedesktop.org \
--cc=speakup@linux-speakup.org \
--cc=target-devel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).