mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: davem@davemloft.com, jmorris@redhat.com, michal@logix.cz
Cc: linux-kernel@vger.kernel.org
Subject: [Patch?] padlock-aes.c used forward inline function
Date: Thu, 30 Dec 2004 22:59:57 +0800	[thread overview]
Message-ID: <200412301459.iBUExvU18246@freya.yggdrasil.com> (raw)

	gcc-3.4.3 and gcc-3.4.1 do not currently support forward
declaration of inline functions, as is used in
linux-2.6.10-rc2/drivers/crypto/padlock-aes.c.

	The function is trivial, so it is better to inline it
by defining it earlier than it would be to un-inline it.
Here is a proposed patch.  If it looks okay, I would appreciate
it if someone would bless it and forward it downstream.

                    __     ______________ 
Adam J. Richter        \ /
adam@yggdrasil.com      | g g d r a s i l

--- linux-2.6.10-bk2/drivers/crypto/padlock-aes.c	2004-12-30 17:04:16.000000000 +0800
+++ linux/drivers/crypto/padlock-aes.c	2004-12-30 22:57:45.000000000 +0800
@@ -58,8 +58,6 @@
 #define AES_EXTENDED_KEY_SIZE	64	/* in uint32_t units */
 #define AES_EXTENDED_KEY_SIZE_B	(AES_EXTENDED_KEY_SIZE * sizeof(uint32_t))
 
-static inline int aes_hw_extkey_available (uint8_t key_len);
-
 struct aes_ctx {
 	uint32_t e_data[AES_EXTENDED_KEY_SIZE+4];
 	uint32_t d_data[AES_EXTENDED_KEY_SIZE+4];
@@ -68,6 +66,19 @@
 	int key_length;
 };
 
+/* Tells whether the ACE is capable to generate
+   the extended key for a given key_len. */
+static inline int
+aes_hw_extkey_available(uint8_t key_len)
+{
+	/* TODO: We should check the actual CPU model/stepping
+	         as it's possible that the capability will be
+	         added in the next CPU revisions. */
+	if (key_len == 16)
+		return 1;
+	return 0;
+}
+
 /* ====== Key management routines ====== */
 
 static inline uint32_t
@@ -356,19 +367,6 @@
 	return 0;
 }
 
-/* Tells whether the ACE is capable to generate
-   the extended key for a given key_len. */
-static inline int
-aes_hw_extkey_available(uint8_t key_len)
-{
-	/* TODO: We should check the actual CPU model/stepping
-	         as it's possible that the capability will be
-	         added in the next CPU revisions. */
-	if (key_len == 16)
-		return 1;
-	return 0;
-}
-
 /* ====== Encryption/decryption routines ====== */
 
 /* This is the real call to PadLock. */

             reply	other threads:[~2004-12-30 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-30 14:59 Adam J. Richter [this message]
2004-12-30 21:41 ` Michal Ludvig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200412301459.iBUExvU18246@freya.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=davem@davemloft.com \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal@logix.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®