[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CB8D542@AcuExch.aculab.com>
Date: Fri, 4 Sep 2015 09:07:00 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Marcel Holtmann' <marcel@...tmann.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
CC: "David S. Miller" <davem@...emloft.net>,
Lorenzo Bianconi <lorenzo.bianconi83@...il.com>,
Johannes Berg <johannes.berg@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Network Development <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: [GIT] Networking
> I find them useful as syntactic sugar. We have not used them a lot, but there are cases in our crypto
> handling code where we have fixed size array inputs/outputs and there we opted to use them. They make
> it easy to remember what the expected sizes of input and output are without having to read through the
> implementation (of course we never even tried to use sizeof on these pointers).
>
> static int smp_ah(struct crypto_blkcipher *tfm, const u8 irk[16],
> const u8 r[3], u8 res[3])
Expect that it looks like you are passing arrays by value,
but instead you are passing by reference.
Explicitly pass by reference and sizeof works.
The object code will be the same.
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists