All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] compile-i386: make use of expression_list_size()
@ 2017-09-15  7:02 Martin Kepplinger
  2017-09-15  7:46 ` Luc Van Oostenryck
  2017-09-15 14:27 ` Christopher Li
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Kepplinger @ 2017-09-15  7:02 UTC (permalink / raw)
  To: sparse, jgarzik; +Cc: linux-sparse, Martin Kepplinger

Instead of doing it my hand, there is the expression_list_size() API we
can use here.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
---

This only builds. I have *not* tested it in any way though!!!



 compile-i386.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/compile-i386.c b/compile-i386.c
index e4d3f27..12fbcc7 100644
--- a/compile-i386.c
+++ b/compile-i386.c
@@ -997,11 +997,7 @@ static void sort_array(struct expression *expr)
 	struct expression *entry, **list;
 	unsigned int elem, sorted, i;
 
-	elem = 0;
-	FOR_EACH_PTR(expr->expr_list, entry) {
-		elem++;
-	} END_FOR_EACH_PTR(entry);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] compile-i386: make use of expression_list_size()
  2017-09-15  7:02 [PATCH] compile-i386: make use of expression_list_size() Martin Kepplinger
@ 2017-09-15  7:46 ` Luc Van Oostenryck
  2017-09-15 14:27 ` Christopher Li
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2017-09-15  7:46 UTC (permalink / raw)
  To: Martin Kepplinger; +Cc: sparse, jgarzik, linux-sparse

On Fri, Sep 15, 2017 at 09:02:19AM +0200, Martin Kepplinger wrote:
> Instead of doing it my hand, there is the expression_list_size() API we
> can use here.
> 
> Signed-off-by: Martin Kepplinger <martink@posteo.de>
> ---

Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] compile-i386: make use of expression_list_size()
  2017-09-15  7:02 [PATCH] compile-i386: make use of expression_list_size() Martin Kepplinger
  2017-09-15  7:46 ` Luc Van Oostenryck
@ 2017-09-15 14:27 ` Christopher Li
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Li @ 2017-09-15 14:27 UTC (permalink / raw)
  To: Martin Kepplinger; +Cc: Jeff Garzik, Linux-Sparse

On Fri, Sep 15, 2017 at 3:02 AM, Martin Kepplinger <martink@posteo.de> wrote:
> Instead of doing it my hand, there is the expression_list_size() API we
> can use here.
>
> Signed-off-by: Martin Kepplinger <martink@posteo.de>

Looks good. I will apply it.

If you are feeling brave, you can try using the generic sort_list
API to sort it ;-)

Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-15 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15  7:02 [PATCH] compile-i386: make use of expression_list_size() Martin Kepplinger
2017-09-15  7:46 ` Luc Van Oostenryck
2017-09-15 14:27 ` Christopher Li

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.