All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH 0/2] RFC: object: recommend a few type check macros
       [not found] ` <20180924111241.0a686314@redhat.com>
@ 2018-10-01 13:47   ` Marc-André Lureau
  2018-10-30 16:37     ` Marc-André Lureau
  0 siblings, 1 reply; 3+ messages in thread
From: Marc-André Lureau @ 2018-10-01 13:47 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: xiaoguangrong.eric, Michael S. Tsirkin, QEMU, Paolo Bonzini,
	Richard Henderson, Andreas Färber, Eduardo Habkost

[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]

Hi

On Mon, Sep 24, 2018 at 1:30 PM Igor Mammedov <imammedo@redhat.com> wrote:
>
> On Fri, 21 Sep 2018 15:13:30 +0400
> Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
>
> > Hi,
> >
> > This is a readability suggestion. See the first patch for the doc
> > change, and the second patch for an example of usage and readability
> > improvement.
> Looks like a nice improvement,
> but could you conversion tree wide so we end up with a consistent
> way to cast across the tree.
> Probably it would result in negative diffstat and demonstrate
> usefulness of the simplification in numbers.

It doesn't result in negative diffstat, since often a one-liner is
replaced by a 2-liner macro ;)

However, the resulting code is more pleasant to read imho.

I attached the whole diff here, the branch with the 49 patches
split-series is here: https://github.com/elmarco/qemu/commits/object

Let me know what you think

>
> > thanks
> >
> > Marc-André Lureau (2):
> >   object: recommend a few type check macros
> >   nvdimm: use IS_NVDIMM macro
> >
> >  include/hw/mem/nvdimm.h |  1 +
> >  include/qom/object.h    | 25 ++++++++++++++++---------
> >  hw/acpi/ich9.c          |  2 +-
> >  hw/acpi/nvdimm.c        |  2 +-
> >  hw/acpi/piix4.c         |  2 +-
> >  hw/i386/pc.c            |  8 +++-----
> >  hw/mem/pc-dimm.c        |  2 +-
> >  7 files changed, 24 insertions(+), 18 deletions(-)
> >
>
>


--
Marc-André Lureau

[-- Attachment #2: diff.patch --]
[-- Type: application/x-patch, Size: 82223 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] RFC: object: recommend a few type check macros
  2018-10-01 13:47   ` [Qemu-devel] [PATCH 0/2] RFC: object: recommend a few type check macros Marc-André Lureau
@ 2018-10-30 16:37     ` Marc-André Lureau
  2018-10-30 17:07       ` Daniel P. Berrangé
  0 siblings, 1 reply; 3+ messages in thread
From: Marc-André Lureau @ 2018-10-30 16:37 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Guangrong Xiao, Michael S. Tsirkin, QEMU, Paolo Bonzini,
	Richard Henderson, Andreas Färber, Eduardo Habkost

Hi

On Mon, Oct 1, 2018 at 5:47 PM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Mon, Sep 24, 2018 at 1:30 PM Igor Mammedov <imammedo@redhat.com> wrote:
> >
> > On Fri, 21 Sep 2018 15:13:30 +0400
> > Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> >
> > > Hi,
> > >
> > > This is a readability suggestion. See the first patch for the doc
> > > change, and the second patch for an example of usage and readability
> > > improvement.
> > Looks like a nice improvement,
> > but could you conversion tree wide so we end up with a consistent
> > way to cast across the tree.
> > Probably it would result in negative diffstat and demonstrate
> > usefulness of the simplification in numbers.
>
> It doesn't result in negative diffstat, since often a one-liner is
> replaced by a 2-liner macro ;)
>
> However, the resulting code is more pleasant to read imho.
>
> I attached the whole diff here, the branch with the 49 patches
> split-series is here: https://github.com/elmarco/qemu/commits/object
>
> Let me know what you think

So after doing that conversion work, what do we do?

>
> >
> > > thanks
> > >
> > > Marc-André Lureau (2):
> > >   object: recommend a few type check macros
> > >   nvdimm: use IS_NVDIMM macro
> > >
> > >  include/hw/mem/nvdimm.h |  1 +
> > >  include/qom/object.h    | 25 ++++++++++++++++---------
> > >  hw/acpi/ich9.c          |  2 +-
> > >  hw/acpi/nvdimm.c        |  2 +-
> > >  hw/acpi/piix4.c         |  2 +-
> > >  hw/i386/pc.c            |  8 +++-----
> > >  hw/mem/pc-dimm.c        |  2 +-
> > >  7 files changed, 24 insertions(+), 18 deletions(-)
> > >
> >
> >
>
>
> --
> Marc-André Lureau



-- 
Marc-André Lureau

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] RFC: object: recommend a few type check macros
  2018-10-30 16:37     ` Marc-André Lureau
@ 2018-10-30 17:07       ` Daniel P. Berrangé
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2018-10-30 17:07 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: Igor Mammedov, Guangrong Xiao, Michael S. Tsirkin, QEMU,
	Eduardo Habkost, Paolo Bonzini, Andreas Färber,
	Richard Henderson

On Tue, Oct 30, 2018 at 08:37:47PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Mon, Oct 1, 2018 at 5:47 PM Marc-André Lureau
> <marcandre.lureau@gmail.com> wrote:
> >
> > Hi
> >
> > On Mon, Sep 24, 2018 at 1:30 PM Igor Mammedov <imammedo@redhat.com> wrote:
> > >
> > > On Fri, 21 Sep 2018 15:13:30 +0400
> > > Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > This is a readability suggestion. See the first patch for the doc
> > > > change, and the second patch for an example of usage and readability
> > > > improvement.
> > > Looks like a nice improvement,
> > > but could you conversion tree wide so we end up with a consistent
> > > way to cast across the tree.
> > > Probably it would result in negative diffstat and demonstrate
> > > usefulness of the simplification in numbers.
> >
> > It doesn't result in negative diffstat, since often a one-liner is
> > replaced by a 2-liner macro ;)
> >
> > However, the resulting code is more pleasant to read imho.
> >
> > I attached the whole diff here, the branch with the 49 patches
> > split-series is here: https://github.com/elmarco/qemu/commits/object
> >
> > Let me know what you think
> 
> So after doing that conversion work, what do we do?

I say submit it, as I'm in favour of the readability of the macro and
like the alignment with gobject paradigm.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-30 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180921111332.12973-1-marcandre.lureau@redhat.com>
     [not found] ` <20180924111241.0a686314@redhat.com>
2018-10-01 13:47   ` [Qemu-devel] [PATCH 0/2] RFC: object: recommend a few type check macros Marc-André Lureau
2018-10-30 16:37     ` Marc-André Lureau
2018-10-30 17:07       ` Daniel P. Berrangé

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.