Re: [PATCH] ACPI header length printk format warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Oct 2006 11:03:45 -0700 Stephen Hemminger wrote:

> Get rid of warning from printk arguments on 64 bit platforms.

size_t (sizeof) should use %zd or %zu or %zx or %zX.

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19-rc1/2.6.19-rc1-mm1/broken-out/acpi-fix-printk-format-warnings.patch

Yes, it would be nice if some patch could be merged for this.

> --- orig/drivers/acpi/tables/tbget.c
> +++ new/drivers/acpi/tables/tbget.c
> @@ -324,8 +324,9 @@ acpi_tb_get_this_table(struct acpi_point
>  
>  	if (header->length < sizeof(struct acpi_table_header)) {
>  		ACPI_ERROR((AE_INFO,
> -			    "Table length (%X) is smaller than minimum (%X)",
> -			    header->length, sizeof(struct acpi_table_header)));
> +			    "Table length (%lx) is smaller than minimum (%zx)",
> +			    (unsigned long) header->length,
> +			    sizeof(struct acpi_table_header)));
>  
>  		return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
>  	}
> @@ -343,8 +344,8 @@ acpi_tb_get_this_table(struct acpi_point
>  		full_table = ACPI_ALLOCATE(header->length);
>  		if (!full_table) {
>  			ACPI_ERROR((AE_INFO,
> -				    "Could not allocate table memory for [%4.4s] length %X",
> -				    header->signature, header->length));
> +				    "Could not allocate table memory for [%4.4s] length %lx",
> +				    header->signature, (unsigned long) header->length));
>  			return_ACPI_STATUS(AE_NO_MEMORY);
>  		}

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux