qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 33/63] net/can: Rename TYPE_CAN_CPI constants


From: Eduardo Habkost
Subject: Re: [PATCH 33/63] net/can: Rename TYPE_CAN_CPI constants
Date: Thu, 3 Sep 2020 12:35:13 -0400

On Thu, Sep 03, 2020 at 02:59:00PM +0200, Philippe Mathieu-Daudé wrote:
> On 9/3/20 12:42 AM, Eduardo Habkost wrote:
> > Rename macros to names that are unique in the source tree, to
> > reduce confusion and make automated conversion of the code
> > easier.
> > 
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> > Cc: Jason Wang <jasowang@redhat.com>
> > Cc: qemu-devel@nongnu.org
> > ---
> >  hw/net/can/can_kvaser_pci.c   | 6 +++---
> >  hw/net/can/can_mioe3680_pci.c | 6 +++---
> >  hw/net/can/can_pcm3680_pci.c  | 6 +++---
> >  3 files changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/hw/net/can/can_kvaser_pci.c b/hw/net/can/can_kvaser_pci.c
> > index 168b3a620d..12d4f8df33 100644
> > --- a/hw/net/can/can_kvaser_pci.c
> > +++ b/hw/net/can/can_kvaser_pci.c
> > @@ -45,11 +45,11 @@
> >  #include "can_sja1000.h"
> >  #include "qom/object.h"
> >  
> > -#define TYPE_CAN_PCI_DEV "kvaser_pci"
> > +#define TYPE_KVASER_PCI "kvaser_pci"
> 
> Why keep "PCI" and not keep the "CAN" part?
> To be consistent we should use both busses or none.

Because the type name is "kvaser_pci", the device state struct is
called KVaserPCIState, the type checking macro is called
KVASER_PCI_DEV, and most functions inside that file are called
kvaser_pci_*().

-- 
Eduardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]