On Mon, 2005-12-19 at 02:40 +0100, Ingo Molnar wrote:
> Index: linux/drivers/acpi/osl.c
> ===================================================================
> --- linux.orig/drivers/acpi/osl.c
> +++ linux/drivers/acpi/osl.c
> @@ -728,14 +728,14 @@ void acpi_os_delete_lock(acpi_handle han
> acpi_status
> acpi_os_create_semaphore(u32 max_units, u32 initial_units,
> acpi_handle * handle)
> {
> - struct semaphore *sem = NULL;
> + struct arch_semaphore *sem = NULL;
>
> ACPI_FUNCTION_TRACE("os_create_semaphore");
>
> - sem = acpi_os_allocate(sizeof(struct semaphore));
> + sem = acpi_os_allocate(sizeof(struct arch_semaphore));
[OT]
This is why I prefer sizeof(*sem) over sizeof(struct type_of_sem) but I
regress. And I don't buy that argument of the mistaken sizeof(sem)
since, I've never had to deal with that bug! Oh well, each to their
own.
-- Steve
> if (!sem)
> return_ACPI_STATUS(AE_NO_MEMORY);
> - memset(sem, 0, sizeof(struct semaphore));
> + memset(sem, 0, sizeof(struct arch_semaphore));
>
> sema_init(sem, initial_units);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]