Re: [PATCH 2/2] kvm tools: Protect from dup definitions in kernel header

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

 



On 05/04/2011 12:10 AM, Cyrill Gorcunov wrote:
> On 05/03/2011 11:59 PM, Ingo Molnar wrote:
> ...
>>>>
>>>> Hm, how can duplicate definitions happen? Only one place should define them - 
>>>> otherwise we might end up with incompatible definitions ...
>>>
>>> We has ALIGN defined in include/kvm/bios.h within our code.
>>
>> Well, but then the right solution would be to not define it there but remove 
>> it, and use the one we get from the kernel headers?
>>
>> Thanks,
>>
>> 	Ingo
> 
>   Yeah, the right way indeed to use kernel header. The former ALIGN was introduced by
> me I fear when kvm tools were out of linux tree, ie quite early. Sasha mind to simply
> drop the former ALIGN out?
> 

  Sasha, could you please also drop this lines from bios.h

#ifndef ALIGN
#define ALIGN(x, a)	\
	(((x) + ((a) - 1)) & ~((a) - 1))
#endif

/*
 * note we use 16 bytes alignment which makes segment based
 * addressing easy to compute, dont change it otherwise you
 * may break local variables offsets in BIOS irq routines
 */
#define BIOS_NEXT_IRQ_ADDR(addr, size)	\
	ALIGN((addr + size + 1), 16)

they are rudiments.

-- 
Thanks,
  Cyrill
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux