fix wksidarr declaration to be big-endian friendly
PATCH 1/1 fix wksidarr declaration to be big-endian friendly
The current definition of wksidarr works fine on little endian arches (since cpu_to_le32 is a no-op there), but on big-endian arches, it fails to compile with this error:
error: braced-group within expression allowed only inside a function
...the problem is that this static declaration has cpu_to_le32 embedded within it, and that expands into a function macro. We need to use __constant_cpu_to_le32() instead.
Signed-off-by Jeff Layton <[email protected]>
---
fs/cifs/cifsacl.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsacl.c +5 -5
@@ -34,11 +34,11 @@static struct cifs_wksid wksidarr[NUM_WK_SIDS ] = { {{1 ,0 , {0 ,0 ,0 ,0 ,0 ,0 }, {0 ,0 ,0 ,0 ,0 } },"null user" }, {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,1 }, {0 ,0 ,0 ,0 ,0 } },"nobody" }, - {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (11 ),0 ,0 ,0 ,0 } },"net-users" }, - {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (18 ),0 ,0 ,0 ,0 } },"sys" }, - {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (32 ),cpu_to_le32 (544 ),0 ,0 ,0 } },"root" }, - {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (32 ),cpu_to_le32 (545 ),0 ,0 ,0 } },"users" }, - {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (32 ),cpu_to_le32 (546 ),0 ,0 ,0 } },"guest" } } + {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (11 ),0 ,0 ,0 ,0 } },"net-users" }, + {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (18 ),0 ,0 ,0 ,0 } },"sys" }, + {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (32 ),__constant_cpu_to_le32 (544 ),0 ,0 ,0 } },"root" }, + {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (32 ),__constant_cpu_to_le32 (545 ),0 ,0 ,0 } },"users" }, + {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (32 ),__constant_cpu_to_le32 (546 ),0 ,0 ,0 } },"guest" } } ;