From: Linus Torvalds <torvalds@linux-foundation.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>,
Christopher Li <sparse@chrisli.org>
Subject: Re: [PATCH 0/2] be more generous with ptrlist repacking
Date: Thu, 17 Nov 2016 09:40:20 -0800 [thread overview]
Message-ID: <CA+55aFwYGCD-+GhVLdHedu42cu1RyT+Ko9Dj6-pfTrPv0ZD5Jg@mail.gmail.com> (raw)
In-Reply-To: <20161117172559.29417-1-luc.vanoostenryck@gmail.com>
On Thu, Nov 17, 2016 at 9:25 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> The macros that do the ptrlist walking don't handle empty blocks.
Actually, most of the_do_ handle empty blocks. In particular, the
normal FOR_EACH_PTR() case should handle it just fine.
The exception is, I think:
- first_ptr_list/last_ptr_list
- DO_PREPARE/DO_RESET
which just don't walk the pointer block list, they just end up blindly doing
PTR_ENTRY(list, 0);
for the first entry, or
list = list->prev;
PTR_ENTRY(list, list->nr-1);
for the last one.
I suspect they should be fairly easy to update to just walk the list
until they hit a non-empty case (like DO_NEXT() already does, for
example).
Linus
next prev parent reply other threads:[~2016-11-17 17:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 17:25 [PATCH 0/2] be more generous with ptrlist repacking Luc Van Oostenryck
2016-11-17 17:25 ` [PATCH 1/2] add missing PACK_PTR_LIST() Luc Van Oostenryck
2016-11-17 17:25 ` [PATCH 2/2] mark lists to be repacked as dirty Luc Van Oostenryck
2016-11-17 17:40 ` Linus Torvalds [this message]
2016-11-17 18:17 ` [PATCH 0/2] be more generous with ptrlist repacking Christopher Li
2016-11-17 20:25 ` Luc Van Oostenryck
2016-11-17 22:03 ` Linus Torvalds
2016-11-18 0:29 ` Luc Van Oostenryck
2016-11-28 21:15 ` Luc Van Oostenryck
2016-12-06 0:24 ` Christopher Li
2016-11-18 12:26 ` Luc Van Oostenryck
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=CA+55aFwYGCD-+GhVLdHedu42cu1RyT+Ko9Dj6-pfTrPv0ZD5Jg@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=sparse@chrisli.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 NNTP newsgroup(s).