Thread (17 messages) flat view 17 messages, 9 authors, 2014-03-19

Re: [PATCH] mac80211: LLVMLinux: Remove VLAIS usage from mac80211

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2014-03-07 07:25:11
Also in: linux-wireless, lkml

Possibly related (same subject, not in this thread)

On Thu, 2014-03-06 at 11:52 -0800, behanw@converseincode.com wrote:
From: Jan-Simon Möller <redacted>

Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99
compliant equivalent.
Fine, but
+	char aead_req_data[sizeof(struct aead_request)
+				+ crypto_aead_reqsize(tfm)
+				+ CRYPTO_MINALIGN] CRYPTO_MINALIGN_ATTR;
You really should be using kernel coding style, which changes
indentation and has the + on the previous line.
+	struct aead_request *aead_req
+		= (struct aead_request *) aead_req_data;
(void *) is perfectly find and it'll probably fit on one line then.
+	memset(&aead_req_data, 0, (sizeof(struct aead_request)+
+		crypto_aead_reqsize(tfm) + CRYPTO_MINALIGN));
You don't need the size calculation again, you can use
sizeof(aead_req_data)

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help