public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	penberg@kernel.org, asias.hejun@gmail.com,
	prasadjoshi124@gmail.com, kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] kvm tools: Protect from dup definitions in kernel header
Date: Wed, 04 May 2011 00:27:34 +0400	[thread overview]
Message-ID: <4DC06536.2070103@gmail.com> (raw)
In-Reply-To: <4DC0613E.5000101@gmail.com>

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

  reply	other threads:[~2011-05-03 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 15:37 [PATCH 1/2] kvm tools: Fix virt_queue__set_used_elem Sasha Levin
2011-05-03 15:37 ` [PATCH 2/2] kvm tools: Protect from dup definitions in kernel header Sasha Levin
2011-05-03 19:49   ` Ingo Molnar
2011-05-03 19:56     ` Sasha Levin
2011-05-03 19:59       ` Ingo Molnar
2011-05-03 20:10         ` Cyrill Gorcunov
2011-05-03 20:27           ` Cyrill Gorcunov [this message]
2011-05-03 19:44 ` [PATCH 1/2] kvm tools: Fix virt_queue__set_used_elem Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC06536.2070103@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox