diff mbox

[applied] ich: get rid of spaces in type name

Message ID 1402242359-8566-1-git-send-email-mst@redhat.com
State New
Headers show

Commit Message

Michael S. Tsirkin June 8, 2014, 3:46 p.m. UTC
Names with spaces in them are nasty, let's not go there.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

Already in my tree, let me know if you see issues.

 include/hw/i386/ich9.h | 2 +-
 include/hw/i386/pc.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Markus Armbruster June 12, 2014, 8:27 a.m. UTC | #1
"Michael S. Tsirkin" <mst@redhat.com> writes:

> Names with spaces in them are nasty, let's not go there.

Yes, they are, but please use '-' instead of '_'.  I can see just a few
devices with '_' in their name, but more than a hundred with '-'.
Michael S. Tsirkin June 12, 2014, 8:32 a.m. UTC | #2
On Thu, Jun 12, 2014 at 10:27:53AM +0200, Markus Armbruster wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
> > Names with spaces in them are nasty, let's not go there.
> 
> Yes, they are, but please use '-' instead of '_'.  I can see just a few
> devices with '_' in their name, but more than a hundred with '-'.

No problem, I made this change.
Result pushed to the pci branch, pls take a look there.

Thanks!
Markus Armbruster June 12, 2014, 2:33 p.m. UTC | #3
"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Thu, Jun 12, 2014 at 10:27:53AM +0200, Markus Armbruster wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> writes:
>> 
>> > Names with spaces in them are nasty, let's not go there.
>> 
>> Yes, they are, but please use '-' instead of '_'.  I can see just a few
>> devices with '_' in their name, but more than a hundred with '-'.
>
> No problem, I made this change.
> Result pushed to the pci branch, pls take a look there.
>
> Thanks!

The change is good, but I have more questions now.

What about "ICH9 SMB" in hw/i2c/smbus_ich9.c?

Technically, device names are ABI.  These two are onboard devices, so
changing their names can't break -device / device_add use.  It still
could break -global use.  Do we care?

If yes, the obvious fix is to keep the old name as alias.
Michael S. Tsirkin June 12, 2014, 2:57 p.m. UTC | #4
On Thu, Jun 12, 2014 at 04:33:11PM +0200, Markus Armbruster wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
> > On Thu, Jun 12, 2014 at 10:27:53AM +0200, Markus Armbruster wrote:
> >> "Michael S. Tsirkin" <mst@redhat.com> writes:
> >> 
> >> > Names with spaces in them are nasty, let's not go there.
> >> 
> >> Yes, they are, but please use '-' instead of '_'.  I can see just a few
> >> devices with '_' in their name, but more than a hundred with '-'.
> >
> > No problem, I made this change.
> > Result pushed to the pci branch, pls take a look there.
> >
> > Thanks!
> 
> The change is good, but I have more questions now.
> 
> What about "ICH9 SMB" in hw/i2c/smbus_ich9.c?

Same thing I guess. I noticed the other one because Igor
touched it in his patch.
Pls go ahead and submit a patch.

> Technically, device names are ABI.  These two are onboard devices, so
> changing their names can't break -device / device_add use.  It still
> could break -global use.  Do we care?
> 
> If yes, the obvious fix is to keep the old name as alias.

I don't think we care practically, but sure, go ahead and submit the
patch if you feel like it.
diff mbox

Patch

diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
index e191435..2c883f2 100644
--- a/include/hw/i386/ich9.h
+++ b/include/hw/i386/ich9.h
@@ -24,7 +24,7 @@  I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
 
 #define ICH9_CC_SIZE                            (16 * 1024)     /* 16KB */
 
-#define TYPE_ICH9_LPC_DEVICE "ICH9 LPC"
+#define TYPE_ICH9_LPC_DEVICE "ICH9_LPC"
 #define ICH9_LPC_DEVICE(obj) \
      OBJECT_CHECK(ICH9LPCState, (obj), TYPE_ICH9_LPC_DEVICE)
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index a2bf22c..fe9e18b 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -295,7 +295,7 @@  bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 #define PC_Q35_COMPAT_2_0 \
         PC_COMPAT_2_0, \
         {\
-            .driver   = "ICH9 LPC",\
+            .driver   = "ICH9_LPC",\
             .property = "memory-hotplug-support",\
             .value    = "off",\
         }