All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 14/63] i8254: Rename TYPE_I8254 to TYPE_PIT
Date: Thu, 3 Sep 2020 12:55:11 -0400	[thread overview]
Message-ID: <20200903165511.GP4940@habkost.net> (raw)
In-Reply-To: <20200903164429.GD441291@redhat.com>

On Thu, Sep 03, 2020 at 05:44:29PM +0100, Daniel P. Berrangé wrote:
> On Thu, Sep 03, 2020 at 12:18:09PM -0400, Eduardo Habkost wrote:
> > On Thu, Sep 03, 2020 at 02:47:03PM +0200, Philippe Mathieu-Daudé wrote:
> > > On 9/3/20 12:42 AM, Eduardo Habkost wrote:
> > > > This will make the type name constant consistent with the name of
> > > > the type checking macro.
> > > > 
> > > > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > > > ---
> > > > Cc: "Michael S. Tsirkin" <mst@redhat.com>
> > > > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > > > Cc: qemu-devel@nongnu.org
> > > > ---
> > > >  include/hw/timer/i8254.h | 4 ++--
> > > >  hw/timer/i8254.c         | 4 ++--
> > > >  2 files changed, 4 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h
> > > > index 1a522a2457..ddd925074f 100644
> > > > --- a/include/hw/timer/i8254.h
> > > > +++ b/include/hw/timer/i8254.h
> > > > @@ -45,7 +45,7 @@ typedef struct PITCommonClass PITCommonClass;
> > > >  DECLARE_OBJ_CHECKERS(PITCommonState, PITCommonClass,
> > > >                       PIT_COMMON, TYPE_PIT_COMMON)
> > > >  
> > > > -#define TYPE_I8254 "isa-pit"
> > > > +#define TYPE_PIT "isa-pit"
> > > 
> > > I disagree with this patch, as we have various PIT and only one I8254.
> > 
> > I was unsure about this, and I agree with your point.  I will
> > suggest renaming the PIT macro to I8254 instead.
> 
> IMHO the macro name should be directly related to the object name
> string with non-alnum characters replaced by underscore.
> 
> ie since the object type is "isa-pit", then the macro should be
> TYPE_ISA_PIT

I think that's a good idea in this specific case because it's a
short name (I will do it).  But I don't think we'll be able to
always follow that rule, as the QOM type name is user-visible.

-- 
Eduardo



  reply	other threads:[~2020-09-03 16:56 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 22:42 [PATCH 00/63] qom: Rename macros for consistency Eduardo Habkost
2020-09-02 22:42 ` [PATCH 01/63] gpex: Fix type checking function name Eduardo Habkost
2020-09-03 12:48   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 02/63] chardev: Rename TYPE_CHARDEV_* to TYPE_*_CHARDEV Eduardo Habkost
2020-09-03 12:49   ` Philippe Mathieu-Daudé
2020-09-10 19:24   ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 03/63] chardev: Rename TYPE_BRAILLE_CHARDEV to TYPE_BAUM_CHARDEV Eduardo Habkost
2020-09-02 22:42 ` [PATCH 04/63] chardev: Rename TYPE_MSMOUSE_CHARDEV to TYPE_MOUSE_CHARDEV Eduardo Habkost
2020-09-02 22:42 ` [PATCH 05/63] ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE Eduardo Habkost
2020-09-03 10:33   ` Thomas Huth
2020-09-07  7:28   ` Cornelia Huck
2020-09-02 22:42 ` [PATCH 06/63] dev-smartcard-reader: Rename CCID_DEV_NAME to TYPE_USB_CCID_DEV Eduardo Habkost
2020-09-03 12:50   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 07/63] rdma: Rename PVRDMA_HW_NAME to TYPE_PVRDMA_DEV Eduardo Habkost
2020-09-02 22:42 ` [PATCH 08/63] vfio: Rename VFIO_AP_DEVICE_TYPE to TYPE_VFIO_AP_DEVICE Eduardo Habkost
2020-09-03 11:35   ` Thomas Huth
2020-09-07  7:29   ` Cornelia Huck
2020-09-02 22:42 ` [PATCH 09/63] vmcoreinfo: Rename VMCOREINFO_DEVICE to TYPE_VMCOREINFO Eduardo Habkost
2020-09-02 22:42 ` [PATCH 10/63] vmgenid: Rename VMGENID_DEVICE to TYPE_VMGENID Eduardo Habkost
2020-09-03 12:51   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 11/63] edu: Rename TYPE_PCI_EDU_DEVICE to TYPE_EDU Eduardo Habkost
2020-09-02 22:42 ` [PATCH 12/63] etrax: Rename TYPE_ETRAX_FS_SERIAL to TYPE_ETRAX_SERIAL Eduardo Habkost
2020-09-02 22:42 ` [PATCH 13/63] etrax: Rename TYPE_ETRAX_FS_TIMER to TYPE_ETRAX_TIMER Eduardo Habkost
2020-09-02 22:42 ` [PATCH 14/63] i8254: Rename TYPE_I8254 to TYPE_PIT Eduardo Habkost
2020-09-03 12:47   ` Philippe Mathieu-Daudé
2020-09-03 16:18     ` Eduardo Habkost
2020-09-03 16:44       ` Daniel P. Berrangé
2020-09-03 16:55         ` Eduardo Habkost [this message]
2020-09-03 19:26           ` Philippe Mathieu-Daudé
2020-09-03 19:51             ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 15/63] i8259: Rename TYPE_I8259 to TYPE_PIC Eduardo Habkost
2020-09-03 12:47   ` Philippe Mathieu-Daudé
2020-09-03 16:19     ` Eduardo Habkost
2020-09-03 16:45       ` Daniel P. Berrangé
2020-09-02 22:42 ` [PATCH 16/63] i8259: Rename TYPE_KVM_I8259 to TYPE_KVM_PIC Eduardo Habkost
2020-09-03 12:53   ` Philippe Mathieu-Daudé
2020-09-03 16:27     ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 17/63] intel-hda: Rename TYPE_INTEL_HDA_GENERIC to TYPE_INTEL_HDA Eduardo Habkost
2020-09-02 22:42 ` [PATCH 18/63] mips: Rename TYPE_MIPS_BOSTON to TYPE_BOSTON Eduardo Habkost
2020-10-09 15:25   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 19/63] mptsas: Rename TYPE_MPTSAS1068 to TYPE_MPT_SAS Eduardo Habkost
2020-09-02 22:42 ` [PATCH 20/63] pc87312: Rename TYPE_PC87312_SUPERIO to TYPE_PC87312 Eduardo Habkost
2020-09-03 12:23   ` Hervé Poussineau
2020-09-03 12:45   ` Philippe Mathieu-Daudé
2020-09-03 16:16     ` Eduardo Habkost
2020-09-03 17:22       ` Eduardo Habkost
2020-09-03 19:55         ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 21/63] pxb: Rename TYPE_PXB_DEVICE to TYPE_PXB_DEV Eduardo Habkost
2020-09-02 22:42 ` [PATCH 22/63] pxb: Rename TYPE_PXB_PCIE_DEVICE to TYPE_PXB_PCIE_DEV Eduardo Habkost
2020-09-02 22:42 ` [PATCH 23/63] ramfb: Rename TYPE_RAMFB_DEVICE to TYPE_RAMFB Eduardo Habkost
2020-09-02 22:42   ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 24/63] scsi: Rename TYPE_AM53C974_DEVICE to TYPE_PCI_ESP Eduardo Habkost
2020-09-03 12:55   ` Philippe Mathieu-Daudé
2020-09-03 16:38     ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 25/63] scsi: Rename TYPE_DC390_DEVICE to TYPE_DC390 Eduardo Habkost
2020-09-02 22:42 ` [PATCH 26/63] sun4m: Rename TYPE_SUN4M_MEMORY to TYPE_SUN4M_RAM Eduardo Habkost
2020-09-02 22:42 ` [PATCH 27/63] sun4u: Rename TYPE_SUN4U_MEMORY to TYPE_SUN4U_RAM Eduardo Habkost
2020-09-02 22:42 ` [PATCH 28/63] tusb6010: Rename TYPE_TUSB6010 to TYPE_TUSB Eduardo Habkost
2020-09-03 12:56   ` Philippe Mathieu-Daudé
2020-09-03 16:37     ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 29/63] versatile: Rename TYPE_VERSATILE_PCI_HOST to TYPE_PCI_VPB_HOST Eduardo Habkost
2020-09-02 22:42 ` [PATCH 30/63] versatile: Rename TYPE_VERSATILE_PCI to TYPE_PCI_VPB Eduardo Habkost
2020-09-02 22:42 ` [PATCH 31/63] virtio-console: Rename TYPE_VIRTIO_CONSOLE_SERIAL_PORT to TYPE_VIRTIO_CONSOLE Eduardo Habkost
2020-09-02 22:42 ` [PATCH 32/63] ahci: Rename ICH_AHCI to ICH9_AHCI Eduardo Habkost
2020-09-03 12:57   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 33/63] net/can: Rename TYPE_CAN_CPI constants Eduardo Habkost
2020-09-03 12:59   ` Philippe Mathieu-Daudé
2020-09-03 16:35     ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 34/63] can: Rename KVASER_PCI_DEV to KVASER_PCI Eduardo Habkost
2020-09-02 22:42 ` [PATCH 35/63] can: Rename MIOe3680_PCI_DEV to MIOE3680_PCI Eduardo Habkost
2020-09-02 22:42 ` [PATCH 36/63] can: Rename PCM3680i_PCI_DEV to PCM3680_PCI Eduardo Habkost
2020-09-02 22:42 ` [PATCH 37/63] ccid-card-emulated: Rename EMULATED_CCID_CARD to EMULATED_CCID Eduardo Habkost
2020-09-02 22:42 ` [PATCH 38/63] ccid-card-passthru: Rename PASSTHRU_CCID_CARD to CCID_PASSTHRU Eduardo Habkost
2020-09-02 22:42 ` [PATCH 39/63] esp: Rename ESP_STATE to ESP Eduardo Habkost
2020-09-03 12:24   ` Hervé Poussineau
2020-09-03 13:01   ` Philippe Mathieu-Daudé
2020-09-03 16:36     ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 40/63] filter-rewriter: Rename FILTER_COLO_REWRITER to FILTER_REWRITER Eduardo Habkost
2020-09-02 23:36   ` Zhang, Chen
2020-09-02 22:42 ` [PATCH 41/63] lance: Rename SYSBUS_PCNET to LANCE Eduardo Habkost
2020-09-02 22:42 ` [PATCH 42/63] lasi_i82596: Rename SYSBUS_I82596 to LASI_82596 Eduardo Habkost
2020-09-02 22:42 ` [PATCH 43/63] pvpanic: Rename ISA_PVPANIC_DEVICE to PVPANIC Eduardo Habkost
2020-09-02 22:42 ` [PATCH 44/63] renesas: Rename RCMT to RENESAS_CMT Eduardo Habkost
2020-09-02 22:42 ` [PATCH 45/63] renesas: Rename RSCI to RENESAS_SCI Eduardo Habkost
2020-09-02 22:42 ` [PATCH 46/63] renesas: Rename RTMR to RENESAS_TMR Eduardo Habkost
2020-09-04 16:12   ` Eduardo Habkost
2020-09-02 22:42 ` [PATCH 47/63] rs6000_mc: Rename RS6000MC_DEVICE to RS6000MC Eduardo Habkost
2020-09-03 12:24   ` Hervé Poussineau
2020-09-03 13:03   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 48/63] sabre: Rename SABRE_DEVICE to SABRE Eduardo Habkost
2020-09-03 13:03   ` Philippe Mathieu-Daudé
2020-09-02 22:42 ` [PATCH 49/63] stm32f205: Rename STM32F2XXTIMER to STM32F2XX_TIMER Eduardo Habkost
2020-09-04 17:52   ` Alistair Francis
2020-09-02 22:42 ` [PATCH 50/63] tpm_crb: Rename CRB to TPM_CRB Eduardo Habkost
2020-09-03 23:38   ` Stefan Berger
2020-09-02 22:42 ` [PATCH 51/63] tpm_spapr: Rename VIO_SPAPR_VTPM to TPM_SPAPR Eduardo Habkost
2020-09-03 23:40   ` Stefan Berger
2020-09-02 22:43 ` [PATCH 52/63] usb: Rename USB_REDIRECT to USB_REDIR Eduardo Habkost
2020-09-02 22:43 ` [PATCH 53/63] usb: Rename USB_SERIAL_DEV to USB_SERIAL Eduardo Habkost
2020-09-03 13:04   ` Philippe Mathieu-Daudé
2020-09-02 22:43 ` [PATCH 54/63] usb: Rename USB_STORAGE_DEV to USB_STORAGE Eduardo Habkost
2020-09-02 22:43 ` [PATCH 55/63] vfio: Rename PCI_VFIO to VFIO_PCI Eduardo Habkost
2020-09-03  8:46   ` Auger Eric
2020-09-02 22:43 ` [PATCH 56/63] vmxnet3: Rename VMXNET3_DEVICE* to VMXNET3* Eduardo Habkost
2020-09-02 22:43 ` [PATCH 57/63] xen: Rename XENBACKEND_DEVICE to XENBACKEND Eduardo Habkost
2020-09-02 22:43   ` Eduardo Habkost
2020-09-28 16:15   ` Anthony PERARD
2020-09-28 16:15     ` Anthony PERARD via
2020-09-02 22:43 ` [PATCH 58/63] hvf: Rename HVF_STATE to HVF_ACCEL Eduardo Habkost
2020-09-02 22:43 ` [PATCH 59/63] kvm: Rename KVM_STATE to KVM_ACCEL Eduardo Habkost
2020-09-02 22:43   ` Eduardo Habkost
2020-09-02 22:43 ` [PATCH 60/63] tcg: Rename TCG_STATE to TCG_ACCEL Eduardo Habkost
2020-09-02 22:43 ` [PATCH 61/63] tests: Rename TYPE_DUMMY to TYPE_DUMMY_OBJECT Eduardo Habkost
2020-09-02 22:43 ` [PATCH 62/63] tests: Rename DYNAMIC_TYPE to DYNAMIC_PROPS Eduardo Habkost
2020-09-02 22:43 ` [PATCH 63/63] tests: Rename STATIC_TYPE to STATIC_PROPS Eduardo Habkost
2020-09-03 16:47 ` [PATCH 00/63] qom: Rename macros for consistency Eduardo Habkost

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=20200903165511.GP4940@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.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.