diff mbox series

bios: pciirq: constify read-only function argument

Message ID 20210412093557.1267617-1-colin.king@canonical.com
State Accepted
Headers show
Series bios: pciirq: constify read-only function argument | expand

Commit Message

Colin Ian King April 12, 2021, 9:35 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Constify a read-only function argument

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/bios/pciirq/pciirq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung April 12, 2021, 7:22 p.m. UTC | #1
On 2021-04-12 3:35 a.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Constify a read-only function argument
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/bios/pciirq/pciirq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/bios/pciirq/pciirq.c b/src/bios/pciirq/pciirq.c
> index 05f6b30f..c21a237a 100644
> --- a/src/bios/pciirq/pciirq.c
> +++ b/src/bios/pciirq/pciirq.c
> @@ -59,7 +59,7 @@ typedef struct {
>  	slot_entry	slots[0];
>  }  __attribute__ ((packed)) pci_irq_routing_table;
>  
> -static const char *pciirq_reserved(uint8_t *data)
> +static const char *pciirq_reserved(const uint8_t *data)
>  {
>  	static char buf[1+ (RESERVED_SIZE * 5)];
>  	char tmp[6];
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu April 21, 2021, 7:15 a.m. UTC | #2
On 4/12/21 5:35 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Constify a read-only function argument
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/bios/pciirq/pciirq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/bios/pciirq/pciirq.c b/src/bios/pciirq/pciirq.c
> index 05f6b30f..c21a237a 100644
> --- a/src/bios/pciirq/pciirq.c
> +++ b/src/bios/pciirq/pciirq.c
> @@ -59,7 +59,7 @@ typedef struct {
>  	slot_entry	slots[0];
>  }  __attribute__ ((packed)) pci_irq_routing_table;
>  
> -static const char *pciirq_reserved(uint8_t *data)
> +static const char *pciirq_reserved(const uint8_t *data)
>  {
>  	static char buf[1+ (RESERVED_SIZE * 5)];
>  	char tmp[6];
> 


Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/bios/pciirq/pciirq.c b/src/bios/pciirq/pciirq.c
index 05f6b30f..c21a237a 100644
--- a/src/bios/pciirq/pciirq.c
+++ b/src/bios/pciirq/pciirq.c
@@ -59,7 +59,7 @@  typedef struct {
 	slot_entry	slots[0];
 }  __attribute__ ((packed)) pci_irq_routing_table;
 
-static const char *pciirq_reserved(uint8_t *data)
+static const char *pciirq_reserved(const uint8_t *data)
 {
 	static char buf[1+ (RESERVED_SIZE * 5)];
 	char tmp[6];