[Patch?] padlock-aes.c used forward inline function
From: Adam J. Richter (adam_at_yggdrasil.com)
Date: 12/30/04
- Previous message: Andrew Haninger: "Fwd: Toshiba PS/2 touchpad on 2.6.X not working along bottom and right sides"
- Next in thread: Michal Ludvig: "Re: [Patch?] padlock-aes.c used forward inline function"
- Reply: Michal Ludvig: "Re: [Patch?] padlock-aes.c used forward inline function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 22:59:57 +0800 To: davem@davemloft.com, jmorris@redhat.com, michal@logix.cz
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. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Andrew Haninger: "Fwd: Toshiba PS/2 touchpad on 2.6.X not working along bottom and right sides"
- Next in thread: Michal Ludvig: "Re: [Patch?] padlock-aes.c used forward inline function"
- Reply: Michal Ludvig: "Re: [Patch?] padlock-aes.c used forward inline function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [git pull] generic bitops, take 2
... * @addr: The address to base the search on ... -static inline long ...
+static inline unsigned long __fls ... static inline int fls64 ... (Linux-Kernel) - Re: powernow-k8-acpi driver
... -static inline u32 freq_from_fid(u8 fid) ... static inline u32
kfreq_from_fid ... -static inline int check_supported_cpu ... (Linux-Kernel) - [patch 35/44] sparc: use generic bitops
... -} - -static inline void __clear_bit(int nr, volatile unsigned long *addr) -{
... -static inline int sched_find_first_bit-{- ... * ffs: find first bit
set. ... (Linux-Kernel) - [2.6 patch] SCSI megaraid: fix inlines
... +static inline void ... +static inline scb_t * ... * @cmd - Prepare
using this scsi command ... -static inline int ... (Linux-Kernel) - [2.6 patch] net/hamachi.c: remove bogus inline at function prototype (fwd)
... Subject: net/hamachi.c: remove bogus inline at function prototype ... -static
inline int hamachi_rx(struct net_device *dev); ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel)