All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	StefanoStabellini <stefano.stabellini@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/foreign: Avoid using alignment directives when not appropriate
Date: Tue, 8 Mar 2016 11:19:56 +0000	[thread overview]
Message-ID: <56DEB55C.4080008@citrix.com> (raw)
In-Reply-To: <56DEAF6702000078000DA47B@prv-mh.provo.novell.com>

On 08/03/16 09:54, Jan Beulich wrote:
>>>> On 07.03.16 at 19:28, <andrew.cooper3@citrix.com> wrote:
>> --- a/tools/include/xen-foreign/Makefile
>> +++ b/tools/include/xen-foreign/Makefile
>> @@ -35,6 +35,8 @@ x86_32.h: mkheader.py structs.py 
>> $(ROOT)/arch-x86/xen-x86_32.h $(ROOT)/arch-x86/
>>  
>>  x86_64.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_64.h 
>> $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
>>  	$(PYTHON) $< $* $@ $(filter %.h,$^)
>> +	#Avoid mixing an alignment directive with a uint64_t cast or sizeof expression
>> +	sed 's/(__align8__ uint64_t)/(uint64_t)/g' -i $@
> A two step rule like this should make use of a temporary file, to
> avoid breakage when the build process gets interrupted between
> the two steps.
>
> And then - is it perhaps worth to generalize the pattern in one or
> more of a couple of possible ways? Considering int64_t uses
> would perhaps be the most relevant one (even if not needed
> right away). But of course this could get as generic as
>
> s/(__align[0-9]*__ \([a-z0-9_]*\))/(\1)/g
>
> without - afaict (based on your commit description) - breaking
> anything.

Both of these would want to be + rather than * to ensure some content.

While generic is usually better, in this case I think it is better to
stick with the most specific fix, to reduce the risk of accidentally
clobbering a real __align__.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-08 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 18:28 [PATCH] tools/foreign: Avoid using alignment directives when not appropriate Andrew Cooper
2016-03-08  9:54 ` Jan Beulich
2016-03-08 11:19   ` Andrew Cooper [this message]
2016-03-08 11:30     ` Jan Beulich

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=56DEB55C.4080008@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.