All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH] tools/toollog: Drop XTL_NEW_LOGGER()
Date: Tue, 19 Jan 2016 16:40:24 +0000	[thread overview]
Message-ID: <569E66F8.2020407@citrix.com> (raw)
In-Reply-To: <1453220650.29930.107.camel@citrix.com>

On 19/01/16 16:24, Ian Campbell wrote:
> On Thu, 2016-01-14 at 20:13 +0000, Andrew Cooper wrote:
>> XTL_NEW_LOGGER() makes a number of unreasonable assumptions about the symbols
>> visible in its scope,
> It assumes that the function names to fill in the vtable and the type name
> are related, that hardly seems totally "unreasonable". What else does it
> assume that makes it unreasonable?

We have already had this argument once, the result being "patch
welcome".  Here one is.

Not only does it assume certain names, it is tokenised with a magic 3rd
identifier.

It also assumes the presence of a structure member named vtable.

>
> I think if you intend to remove something on this basis you need to be
> specific about what you believe the short comings are.

GNUism in header file claiming C99 strictness

If vtable isn't the first element in the structure, it follows a wild
pointer on error.

>
>>  and as such is only usable by its sole caller.
> "not usable by every imaginable caller" is not the same as "usable by one
> single possible caller", I think you are overstating the case here.

It is genuinely harder to reverse engineer how to use that macro than to
opencode a sane alternative.

I stand firmly by my statement.

~Andrew

  reply	other threads:[~2016-01-19 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 20:13 [PATCH] tools/toollog: Drop XTL_NEW_LOGGER() Andrew Cooper
2016-01-19  9:46 ` Wei Liu
2016-01-19 16:24 ` Ian Campbell
2016-01-19 16:40   ` Andrew Cooper [this message]
2016-01-19 17:04     ` Ian Campbell
2016-01-19 17:15       ` Ian Jackson
2016-01-19 17:18         ` Ian Jackson
2016-01-19 17:36         ` Ian Jackson
2016-01-19 17:45           ` Andrew Cooper
2016-01-19 17:58             ` Ian Jackson
2016-01-20 17:21               ` Ian Campbell

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=569E66F8.2020407@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@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.