<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 2, 2018 at 9:23 AM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 07/02/2018 09:00 AM, Jason Ekstrand wrote:<span class="gmail-"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Mon, Jul 2, 2018 at 6:33 AM, Brian Paul <<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a> <mailto:<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>>> wrote:<br>
<br>
On 06/29/2018 06:13 PM, Jason Ekstrand wrote:<br>
<br>
---<br>
src/util/macros.h | 3 +++<br>
src/util/ralloc.c | 2 --<br>
2 files changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/util/macros.h b/src/util/macros.h<br>
index 6d3df904082..95b86c7a31a 100644<br>
--- a/src/util/macros.h<br>
+++ b/src/util/macros.h<br>
@@ -285,6 +285,9 @@ do { \<br>
#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C))<br>
#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))<br>
+/** Align a value to a power of two */<br>
+#define ALIGN_POT(x, y) (((x) + (y) - 1) & ~((y) - 1))<br>
<br>
<br>
Maybe improve the comment to say that y must be a power of two value?<br>
<br>
Maybe rename 'y' to 'pot'?<br>
<br>
<br>
Do you want one or both? I've sent a v2 which just renames "y" to "align_pot" and leaves the comment alone.<br>
</blockquote>
<br></span>
That's fine.<span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The same macro is in src/util/slab.c and build_id.c too (at least).<br>
<br>
<br>
Good catch. Fixed in v2.<br>
</blockquote>
<br></span>
Do you mean v3? I haven't seen a newer patch in my inbox yet.<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>I guess so? I think I accidentally called the new one v2 as well. It's here:</div><div><br></div><div><a href="https://patchwork.freedesktop.org/patch/235957/">https://patchwork.freedesktop.org/patch/235957/</a></div><div><br></div><div>--Jason</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888">
-Brian</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Brian<br>
<br>
<br>
+<br>
/**<br>
* Macro for declaring an explicit conversion operator. Defaults to an<br>
* implicit conversion if C++11 is not supported.<br>
diff --git a/src/util/ralloc.c b/src/util/ralloc.c<br>
index 42cfa2e391d..5d77f75ee85 100644<br>
--- a/src/util/ralloc.c<br>
+++ b/src/util/ralloc.c<br>
@@ -553,8 +553,6 @@ ralloc_vasprintf_rewrite_tail(<wbr>char **str,<br>
size_t *start, const char *fmt,<br>
* other buffers.<br>
*/<br>
-#define ALIGN_POT(x, y) (((x) + (y) - 1) & ~((y) - 1))<br>
-<br>
#define MIN_LINEAR_BUFSIZE 2048<br>
#define SUBALLOC_ALIGNMENT sizeof(uintptr_t)<br>
#define LMAGIC 0x87b9c7d3<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>