Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2018 19:15:57 -0800
From:      Eitan Adler <lists@eitanadler.com>
To:        John Baldwin <jhb@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, jmg@freebsd.org
Subject:   gf128_add can be marked as __pure2
Message-ID:  <CAF6rxgn7eEu5WZBH93N4AMHcwCwU3cdhH3rhQunTY%2BCo4PvX4w@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgn7eEu5WZBH93N4AMHcwCwU3cdhH3rhQunTY%2BCo4PvX4w>