linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH resend] PCI: tegra: use __pgprot() around static pgprot_t initializer
@ 2015-08-26  8:49 Ard Biesheuvel
  2015-08-26  9:21 ` Thierry Reding
  2015-09-14 16:47 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2015-08-26  8:49 UTC (permalink / raw)
  To: linux-pci, bhelgaas, thierry.reding, linux-tegra; +Cc: swarren, Ard Biesheuvel

In order to comply with the rules that apply when STRICT_MM_TYPECHECKS
is defined, wrap the initializer for a pgprot_t in __pgprot().

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 drivers/pci/host/pci-tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 10c05718dbfd..0d3e6cb0c459 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -382,8 +382,8 @@ static unsigned long tegra_pcie_conf_offset(unsigned int devfn, int where)
 static struct tegra_pcie_bus *tegra_pcie_bus_alloc(struct tegra_pcie *pcie,
 						   unsigned int busnr)
 {
-	pgprot_t prot = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_XN |
-			L_PTE_MT_DEV_SHARED | L_PTE_SHARED;
+	pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
+				 L_PTE_XN | L_PTE_MT_DEV_SHARED | L_PTE_SHARED);
 	phys_addr_t cs = pcie->cs->start;
 	struct tegra_pcie_bus *bus;
 	unsigned int i;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH resend] PCI: tegra: use __pgprot() around static pgprot_t initializer
  2015-08-26  8:49 [PATCH resend] PCI: tegra: use __pgprot() around static pgprot_t initializer Ard Biesheuvel
@ 2015-08-26  9:21 ` Thierry Reding
  2015-09-14 16:47 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2015-08-26  9:21 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-pci, bhelgaas, linux-tegra, swarren

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

On Wed, Aug 26, 2015 at 10:49:34AM +0200, Ard Biesheuvel wrote:
> In order to comply with the rules that apply when STRICT_MM_TYPECHECKS
> is defined, wrap the initializer for a pgprot_t in __pgprot().
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  drivers/pci/host/pci-tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH resend] PCI: tegra: use __pgprot() around static pgprot_t initializer
  2015-08-26  8:49 [PATCH resend] PCI: tegra: use __pgprot() around static pgprot_t initializer Ard Biesheuvel
  2015-08-26  9:21 ` Thierry Reding
@ 2015-09-14 16:47 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2015-09-14 16:47 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-pci, thierry.reding, linux-tegra, swarren

On Wed, Aug 26, 2015 at 10:49:34AM +0200, Ard Biesheuvel wrote:
> In order to comply with the rules that apply when STRICT_MM_TYPECHECKS
> is defined, wrap the initializer for a pgprot_t in __pgprot().
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Applied with Thierry's ack to pci/host-tegra for v4.4, thanks!

> ---
>  drivers/pci/host/pci-tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 10c05718dbfd..0d3e6cb0c459 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -382,8 +382,8 @@ static unsigned long tegra_pcie_conf_offset(unsigned int devfn, int where)
>  static struct tegra_pcie_bus *tegra_pcie_bus_alloc(struct tegra_pcie *pcie,
>  						   unsigned int busnr)
>  {
> -	pgprot_t prot = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_XN |
> -			L_PTE_MT_DEV_SHARED | L_PTE_SHARED;
> +	pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
> +				 L_PTE_XN | L_PTE_MT_DEV_SHARED | L_PTE_SHARED);
>  	phys_addr_t cs = pcie->cs->start;
>  	struct tegra_pcie_bus *bus;
>  	unsigned int i;
> -- 
> 1.9.1


commit 512ee2fd9ca1c0b447a144c6c49a53a010f8d6fa
Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Date:   Wed Aug 26 10:49:34 2015 +0200

    PCI: tegra: Wrap static pgprot_t initializer with __pgprot()
    
    Wrap pgprot_t initializer with __pgprot() to comply with the
    STRICT_MM_TYPECHECKS rules.
    
    [bhelgaas: changelog]
    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Acked-by: Thierry Reding <treding@nvidia.com>

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 81df0c1..3018ae5 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -382,8 +382,8 @@ static unsigned long tegra_pcie_conf_offset(unsigned int devfn, int where)
 static struct tegra_pcie_bus *tegra_pcie_bus_alloc(struct tegra_pcie *pcie,
 						   unsigned int busnr)
 {
-	pgprot_t prot = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_XN |
-			L_PTE_MT_DEV_SHARED | L_PTE_SHARED;
+	pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
+				 L_PTE_XN | L_PTE_MT_DEV_SHARED | L_PTE_SHARED);
 	phys_addr_t cs = pcie->cs->start;
 	struct tegra_pcie_bus *bus;
 	unsigned int i;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-14 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26  8:49 [PATCH resend] PCI: tegra: use __pgprot() around static pgprot_t initializer Ard Biesheuvel
2015-08-26  9:21 ` Thierry Reding
2015-09-14 16:47 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).