lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 16 Jul 2011 22:34:26 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	Stefan Berger <stefanb@...ux.vnet.ibm.com>
Cc:	sfr@...b.auug.org.au, Rajiv Andrade <srajiv@...ux.vnet.ibm.com>,
	James Morris <jmorris@...ei.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-next@...r.kernel.org
Subject: Re: [PATCH] tpm: Move tpm_tis_reenable_interrupts out of CONFIG_PNP
 block

On Sun, 17 Jul 2011 01:04:24 -0400 Stefan Berger wrote:

> This patch moves the tpm_tis_reenable_interrupts function out of the
> CONFIG_PNP-surrounded #define block. This solves a compilation error in
> case CONFIG_PNP is not defined.
> 
> Signed-off-by: Stefan Berger <stefanb@...ux.vnet.ibm.com>

Reported-by: Randy Dunlap <rdunlap@...otime.net>
Acked-by: Randy Dunlap <rdunlap@...otime.net>

New warning:
drivers/char/tpm/tpm_tis.c:97: warning: 'is_itpm' defined but not used

Thanks.

> 
> ---
>  drivers/char/tpm/tpm_tis.c |   45 +++++++++++++++++++++++----------------------
>  1 file changed, 23 insertions(+), 22 deletions(-)
> 
> Index: linux-2.6/drivers/char/tpm/tpm_tis.c
> ===================================================================
> --- linux-2.6.orig/drivers/char/tpm/tpm_tis.c
> +++ linux-2.6/drivers/char/tpm/tpm_tis.c
> @@ -731,6 +731,29 @@ out_err:
>  	tpm_remove_hardware(chip->dev);
>  	return rc;
>  }
> +
> +static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
> +{
> +	u32 intmask;
> +
> +	/* reenable interrupts that device may have lost or
> +	   BIOS/firmware may have disabled */
> +	iowrite8(chip->vendor.irq, chip->vendor.iobase +
> +		 TPM_INT_VECTOR(chip->vendor.locality));
> +
> +	intmask =
> +	    ioread32(chip->vendor.iobase +
> +		     TPM_INT_ENABLE(chip->vendor.locality));
> +
> +	intmask |= TPM_INTF_CMD_READY_INT
> +	    | TPM_INTF_LOCALITY_CHANGE_INT | TPM_INTF_DATA_AVAIL_INT
> +	    | TPM_INTF_STS_VALID_INT | TPM_GLOBAL_INT_ENABLE;
> +
> +	iowrite32(intmask,
> +		  chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
> +}
> +
> +
>  #ifdef CONFIG_PNP
>  static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
>  				      const struct pnp_device_id *pnp_id)
> @@ -757,28 +780,6 @@ static int tpm_tis_pnp_suspend(struct pn
>  	return tpm_pm_suspend(&dev->dev, msg);
>  }
>  
> -static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
> -{
> -	u32 intmask;
> -
> -	/* reenable interrupts that device may have lost or
> -	   BIOS/firmware may have disabled */
> -	iowrite8(chip->vendor.irq, chip->vendor.iobase +
> -		 TPM_INT_VECTOR(chip->vendor.locality));
> -
> -	intmask =
> -	    ioread32(chip->vendor.iobase +
> -		     TPM_INT_ENABLE(chip->vendor.locality));
> -
> -	intmask |= TPM_INTF_CMD_READY_INT
> -	    | TPM_INTF_LOCALITY_CHANGE_INT | TPM_INTF_DATA_AVAIL_INT
> -	    | TPM_INTF_STS_VALID_INT | TPM_GLOBAL_INT_ENABLE;
> -
> -	iowrite32(intmask,
> -		  chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
> -}
> -
> -
>  static int tpm_tis_pnp_resume(struct pnp_dev *dev)
>  {
>  	struct tpm_chip *chip = pnp_get_drvdata(dev);
> 
> --


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ