diff mbox series

[XEN,v2,2/3] vpci/msix: make 'get_slot' static

Message ID c6e270c813ef1a4da7045a5fcf7bd9e1b8f21947.1692275359.git.nicola.vetrini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series xen: fix inclusions and static storage duration | expand

Commit Message

Nicola Vetrini Aug. 17, 2023, 12:39 p.m. UTC
The function can become static since it's used only within this file.
This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence
of a declaration before the function definition.

Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the MSI-X table")
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
Changes in v2:
- Corrected wrong prefix in the commit subject.

CC-ing maintainers from "THE REST" as well, perhaps this trivial change can go
in straight away.
---
 xen/drivers/vpci/msix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.34.1

Comments

Nicola Vetrini Aug. 23, 2023, 2:09 p.m. UTC | #1
On 17/08/2023 14:39, Nicola Vetrini wrote:
> The function can become static since it's used only within this file.
> This also resolves a violation of MISRA C:2012 Rule 8.4 due to the 
> absence
> of a declaration before the function definition.
> 
> Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the MSI-X 
> table")
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> Changes in v2:
> - Corrected wrong prefix in the commit subject.
> 
> CC-ing maintainers from "THE REST" as well, perhaps this trivial change 
> can go
> in straight away.
> ---
>  xen/drivers/vpci/msix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
> index 25bde77586a4..f9df506f29bf 100644
> --- a/xen/drivers/vpci/msix.c
> +++ b/xen/drivers/vpci/msix.c
> @@ -223,7 +223,7 @@ static void __iomem *get_table(const struct vpci
> *vpci, unsigned int slot)
>      return msix->table[slot];
>  }
> 
> -unsigned int get_slot(const struct vpci *vpci, unsigned long addr)
> +static unsigned int get_slot(const struct vpci *vpci, unsigned long 
> addr)
>  {
>      unsigned long pfn = PFN_DOWN(addr);
> 
> --
> 2.34.1

Any chance of an ack? The maintainer for that file is Roger Pau Monné as 
far as I can tell.
Roger Pau Monné Aug. 23, 2023, 2:14 p.m. UTC | #2
On Thu, Aug 17, 2023 at 02:39:27PM +0200, Nicola Vetrini wrote:
> The function can become static since it's used only within this file.
> This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence
> of a declaration before the function definition.
> 
> Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the MSI-X table")
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Sorry for the delay.

Thanks, Roger.
diff mbox series

Patch

diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
index 25bde77586a4..f9df506f29bf 100644
--- a/xen/drivers/vpci/msix.c
+++ b/xen/drivers/vpci/msix.c
@@ -223,7 +223,7 @@  static void __iomem *get_table(const struct vpci *vpci, unsigned int slot)
     return msix->table[slot];
 }

-unsigned int get_slot(const struct vpci *vpci, unsigned long addr)
+static unsigned int get_slot(const struct vpci *vpci, unsigned long addr)
 {
     unsigned long pfn = PFN_DOWN(addr);