gf128_add can be marked as __pure2
Eitan Adler
lists at eitanadler.com
Tue Feb 20 03:16:28 UTC 2018
Is there any reason not to apply this patch?
__pure2 means __attribute__((const)) which is correct in this case as
gf128_add read no global memory:
Index: gfmult.h
===================================================================
--- gfmult.h (revision 329611)
+++ gfmult.h (working copy)
@@ -108,7 +108,7 @@ gf128_write(struct gf128 v, uint8_t *buf)
be64enc(buf, v.v[1]);
}
-static inline struct gf128 __pure /* XXX - __pure2 instead */
+static inline struct gf128 __pure2
gf128_add(struct gf128 a, struct gf128 b)
{
a.v[0] ^= b.v[0];
--
Eitan Adler
More information about the freebsd-hackers
mailing list