[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTi=5Astx_7ifqZNFxwF4xMYPkEu7Z7oydeD5QrH6@mail.gmail.com>
Date: Fri, 5 Nov 2010 10:25:20 +1100
From: Julian Calaby <julian.calaby@...il.com>
To: Jesper Juhl <jj@...osbits.net>
Cc: linux-kernel@...r.kernel.org,
"John W. Linville" <linville@...driver.com>,
Johannes Berg <johannes@...solutions.net>,
"David S. Miller" <davem@...emloft.net>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] mac80211: Remove redundant checks for NULL before calls
to crypto_free_cipher()
On Fri, Nov 5, 2010 at 08:59, Jesper Juhl <jj@...osbits.net> wrote:
> Hello,
>
> crypto_free_cipher() is a wrapper around crypto_free_tfm() which is a
> wrapper around crypto_destroy_tfm() and the latter can handle being passed
> a NULL pointer, so checking for NULL in the
> ieee80211_aes_key_free()/ieee80211_aes_cmac_key_free() wrappers around
> crypto_free_cipher() is pointless and just increase object code size
> needlesly and makes us execute extra test/branch instructions that we
> don't need.
> Btw; don't we have to many wrappers around wrappers ad nauseam here?
They do serve a documentation purpose: Maybe some of them could be
turned into static inline functions or something so the compiler
optimises them away.
Thanks,
--
Julian Calaby
Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists