[08/12] acpi/dmar: use PRIu8 specifier for uint8_t type
diff mbox series

Message ID 20180906142001.28381-9-colin.king@canonical.com
State Accepted
Headers show
Series
  • Fix up print format specifiers
Related show

Commit Message

Colin King Sept. 6, 2018, 2:19 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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

Comments

Alex Hung Sept. 6, 2018, 9:39 p.m. UTC | #1
On 2018-09-06 07:19 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/dmar/dmar.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
> index 7685f35d..a1181c65 100644
> --- a/src/acpi/dmar/dmar.c
> +++ b/src/acpi/dmar/dmar.c
> @@ -109,7 +109,7 @@ static int read_pci_device_secondary_bus_number(const uint8_t seg,
>   	size_t count;
>   
>   	snprintf(path, sizeof(path),
> -		"/sys/bus/pci/devices/%04x:%02x:%02x.%d/config",
> +		"/sys/bus/pci/devices/%04x:%02x:%02x.%" PRIu8 "/config",
>   		seg, bus, dev, fn);
>   	if ((file = fopen(path, "r")) == NULL)
>   		return -1;
> 



Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Sept. 10, 2018, 4:28 a.m. UTC | #2
On 09/06/2018 10:19 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/dmar/dmar.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
> index 7685f35d..a1181c65 100644
> --- a/src/acpi/dmar/dmar.c
> +++ b/src/acpi/dmar/dmar.c
> @@ -109,7 +109,7 @@ static int read_pci_device_secondary_bus_number(const uint8_t seg,
>  	size_t count;
>  
>  	snprintf(path, sizeof(path),
> -		"/sys/bus/pci/devices/%04x:%02x:%02x.%d/config",
> +		"/sys/bus/pci/devices/%04x:%02x:%02x.%" PRIu8 "/config",
>  		seg, bus, dev, fn);
>  	if ((file = fopen(path, "r")) == NULL)
>  		return -1;
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
index 7685f35d..a1181c65 100644
--- a/src/acpi/dmar/dmar.c
+++ b/src/acpi/dmar/dmar.c
@@ -109,7 +109,7 @@  static int read_pci_device_secondary_bus_number(const uint8_t seg,
 	size_t count;
 
 	snprintf(path, sizeof(path),
-		"/sys/bus/pci/devices/%04x:%02x:%02x.%d/config",
+		"/sys/bus/pci/devices/%04x:%02x:%02x.%" PRIu8 "/config",
 		seg, bus, dev, fn);
 	if ((file = fopen(path, "r")) == NULL)
 		return -1;