diff mbox series

[XEN,for-next,v2,7/7] x86/mem_access: make function static

Message ID f9dcb169ad472fe888d6a03234264ec73e290df9.1696833629.git.nicola.vetrini@bugseng.com (mailing list archive)
State Superseded
Headers show
Series Fix or deviate various instances of missing declarations | expand

Commit Message

Nicola Vetrini Oct. 9, 2023, 6:54 a.m. UTC
The function is used only within this file, and therefore can be static.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/mm/mem_access.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tamas K Lengyel Oct. 9, 2023, 7:25 p.m. UTC | #1
On Mon, Oct 9, 2023 at 2:55 AM Nicola Vetrini
<nicola.vetrini@bugseng.com> wrote:
>
> The function is used only within this file, and therefore can be static.
>
> No functional change.
>
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>

Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
Jan Beulich Oct. 16, 2023, 2:29 p.m. UTC | #2
On 09.10.2023 08:54, Nicola Vetrini wrote:
> --- a/xen/arch/x86/mm/mem_access.c
> +++ b/xen/arch/x86/mm/mem_access.c
> @@ -249,7 +249,7 @@ bool p2m_mem_access_check(paddr_t gpa, unsigned long gla,
>      return (p2ma != p2m_access_n2rwx);
>  }
>  
> -int p2m_set_altp2m_mem_access(struct domain *d, struct p2m_domain *hp2m,
> +static int p2m_set_altp2m_mem_access(struct domain *d, struct p2m_domain *hp2m,
>                                struct p2m_domain *ap2m, p2m_access_t a,
>                                gfn_t gfn)

As mentioned before, when adding static (or whatever else) like this,
the next line(s) need re-indenting.

Jan
Nicola Vetrini Oct. 17, 2023, 9:45 a.m. UTC | #3
On 16/10/2023 16:29, Jan Beulich wrote:
> On 09.10.2023 08:54, Nicola Vetrini wrote:
>> --- a/xen/arch/x86/mm/mem_access.c
>> +++ b/xen/arch/x86/mm/mem_access.c
>> @@ -249,7 +249,7 @@ bool p2m_mem_access_check(paddr_t gpa, unsigned 
>> long gla,
>>      return (p2ma != p2m_access_n2rwx);
>>  }
>> 
>> -int p2m_set_altp2m_mem_access(struct domain *d, struct p2m_domain 
>> *hp2m,
>> +static int p2m_set_altp2m_mem_access(struct domain *d, struct 
>> p2m_domain *hp2m,
>>                                struct p2m_domain *ap2m, p2m_access_t 
>> a,
>>                                gfn_t gfn)
> 
> As mentioned before, when adding static (or whatever else) like this,
> the next line(s) need re-indenting.
> 
> Jan

Ok.
diff mbox series

Patch

diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c
index c472fa1ee58b..78633d335d72 100644
--- a/xen/arch/x86/mm/mem_access.c
+++ b/xen/arch/x86/mm/mem_access.c
@@ -249,7 +249,7 @@  bool p2m_mem_access_check(paddr_t gpa, unsigned long gla,
     return (p2ma != p2m_access_n2rwx);
 }
 
-int p2m_set_altp2m_mem_access(struct domain *d, struct p2m_domain *hp2m,
+static int p2m_set_altp2m_mem_access(struct domain *d, struct p2m_domain *hp2m,
                               struct p2m_domain *ap2m, p2m_access_t a,
                               gfn_t gfn)
 {