The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	kmcmartin@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] padlock: don't whinge when loaded on a non-VIA cpu
Date: Tue, 08 Jul 2008 14:21:16 -0700	[thread overview]
Message-ID: <1215552076.5553.205.camel@localhost> (raw)
In-Reply-To: <20080708193741.GB28899@phobos.i.cabal.ca>

On Tue, 2008-07-08 at 15:37 -0400, Kyle McMartin wrote:
> diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
> index c666b4e..70ec14b 100644
> --- a/drivers/crypto/padlock-sha.c
> +++ b/drivers/crypto/padlock-sha.c
> @@ -253,6 +253,10 @@ static int __init padlock_init(void)
>  {
>  	int rc = -ENODEV;
>  
> +	if (!((boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR) &&
> +	     (boot_cpu_data.x86 >= 6)))	/* only on VIA C3 and above */
> +		return -ENODEV;
> +
>  	if (!cpu_has_phe) {
>  		printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");
>  		return -ENODEV;

int rc doesn't need to be initialized to -ENODEV either.

diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -251,7 +251,7 @@ static struct crypto_alg sha256_alg = {
 
 static int __init padlock_init(void)
 {
-	int rc = -ENODEV;
+	int rc;
 
 	if (!cpu_has_phe) {
 		printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");



  reply	other threads:[~2008-07-08 21:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 19:04 [PATCH] padlock: don't whinge when loaded on a non-VIA cpu Kyle McMartin
2008-07-08 18:52 ` Alan Cox
2008-07-08 19:37   ` Kyle McMartin
2008-07-08 21:21     ` Joe Perches [this message]
2008-07-08 22:08     ` Rik van Riel
2008-07-09  5:58     ` Herbert Xu
2008-07-08 20:04 ` Krzysztof Halasa

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=1215552076.5553.205.camel@localhost \
    --to=joe@perches.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=kmcmartin@redhat.com \
    --cc=kyle@mcmartin.ca \
    --cc=linux-kernel@vger.kernel.org \
    /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