Skip to contentSkip to conversation

Fix typo in code and comments

PATCH In review Stefan Weil 4 participants 7 messages Apr 26, 2011 – Apr 27, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix typo in code and comments

Replace writeable -> writable

---
 block.c                      |    2 +-
 block/sheepdog.c             |    4 +-
 hw/eepro100.c                |    2 +-
 hw/eeprom93xx.c              |   10 ++++----
 hw/msi.c                     |    2 +-
 hw/msix.c                    |    2 +-
 hw/pci.c                     |    6 ++--
 hw/pci.h                     |    2 +-
 hw/rtl8139.c                 |   44 ++++++++++++++++++++++-------------------
 hw/sun4m_iommu.c             |    2 +-
 target-mips/translate_init.c |    2 +-
 11 files changed, 41 insertions(+), 37 deletions(-)
block.c +1 -1
index f731c7a..8767d31 100644
@@ -455,7 +455,7 @@ static int bdrv_open_common(BlockDriverState *bs, const char *filename,
     open_flags = flags & ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);
 
     /*
-     * Snapshots should be writeable.
+     * Snapshots should be writable.
      */
     if (bs->is_temporary) {
         open_flags |= BDRV_O_RDWR;
block/sheepdog.c +2 -2
index 98946d7..0392ca8 100644
@@ -196,7 +196,7 @@ static inline uint64_t fnv_64a_buf(void *buf, size_t len, uint64_t hval)
     return hval;
 }
 
-static inline int is_data_obj_writeable(SheepdogInode *inode, unsigned int idx)
+static inline int is_data_obj_writable(SheepdogInode *inode, unsigned int idx)
 {
     return inode->vdi_id == inode->data_vdi_id[idx];
 }
@@ -1577,7 +1577,7 @@ static void sd_readv_writev_bh_cb(void *p)
 
             create = 1;
         } else if (acb->aiocb_type == AIOCB_WRITE_UDATA
-                   && !is_data_obj_writeable(inode, idx)) {
+                   && !is_data_obj_writable(inode, idx)) {
             /* Copy-On-Write */
             create = 1;
             old_oid = oid;
hw/eepro100.c +1 -1
index ffcbc3d..dabb64a 100644
@@ -1125,7 +1125,7 @@ static void eepro100_write_eeprom(eeprom_t * eeprom, uint8_t val)
 {
     TRACE(EEPROM, logout("val=0x%02x\n", val));
 
-    /* mask unwriteable bits */
+    /* mask unwritable bits */
 #if 0
     val = SET_MASKED(val, 0x31, eeprom->value);
 #endif
hw/eeprom93xx.c +5 -5
index 660b28f..7b21f98 100644
@@ -75,7 +75,7 @@ struct _eeprom_t {
     uint8_t  tick;
     uint8_t  address;
     uint8_t  command;
-    uint8_t  writeable;
+    uint8_t  writable;
 
     uint8_t eecs;
     uint8_t eesk;
@@ -130,7 +130,7 @@ static const VMStateDescription vmstate_eeprom = {
         VMSTATE_UINT8(tick, eeprom_t),
         VMSTATE_UINT8(address, eeprom_t),
         VMSTATE_UINT8(command, eeprom_t),
-        VMSTATE_UINT8(writeable, eeprom_t),
+        VMSTATE_UINT8(writable, eeprom_t),
 
         VMSTATE_UINT8(eecs, eeprom_t),
         VMSTATE_UINT8(eesk, eeprom_t),
@@ -165,7 +165,7 @@ void eeprom93xx_write(eeprom_t *eeprom, int eecs, int eesk, int eedi)
         address = 0x0;
     } else if (eeprom->eecs && ! eecs) {
         /* End chip select cycle. This triggers write / erase. */
-        if (eeprom->writeable) {
+        if (eeprom->writable) {
             uint8_t subcommand = address >> (eeprom->addrbits - 2);
             if (command == 0 && subcommand == 2) {
                 /* Erase all. */
@@ -232,7 +232,7 @@ void eeprom93xx_write(eeprom_t *eeprom, int eecs, int eesk, int eedi)
                     switch (address >> (eeprom->addrbits - 2)) {
                         case 0:
                             logout("write disable command\n");
-                            eeprom->writeable = 0;
+                            eeprom->writable = 0;
                             break;
                         case 1:
                             logout("write all command\n");
@@ -242,7 +242,7 @@ void eeprom93xx_write(eeprom_t *eeprom, int eecs, int eesk, int eedi)
                             break;
                         case 3:
                             logout("write enable command\n");
-                            eeprom->writeable = 1;
+                            eeprom->writable = 1;
                             break;
                     }
                 } else {
hw/msi.c +1 -1
index 3dc3a24..b81ac79 100644
@@ -155,7 +155,7 @@ int msi_init(struct PCIDevice *dev, uint8_t offset,
     pci_set_word(dev->wmask + msi_data_off(dev, msi64bit), 0xffff);
 
     if (msi_per_vector_mask) {
-        /* Make mask bits 0 to nr_vectors - 1 writeable. */
+        /* Make mask bits 0 to nr_vectors - 1 writable. */
         pci_set_long(dev->wmask + msi_mask_off(dev, msi64bit),
                      0xffffffff >> (PCI_MSI_VECTORS_MAX - nr_vectors));
     }
hw/msix.c +1 -1
index daaf9b7..af40e26 100644
@@ -87,7 +87,7 @@ static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries,
     pci_set_long(config + MSIX_PBA_OFFSET, (bar_size + MSIX_PAGE_PENDING) |
                  bar_nr);
     pdev->msix_cap = config_offset;
-    /* Make flags bit writeable. */
+    /* Make flags bit writable. */
     pdev->wmask[config_offset + MSIX_CONTROL_OFFSET] |= MSIX_ENABLE_MASK |
 	    MSIX_MASKALL_MASK;
     return 0;
hw/pci.c +3 -3
index 6b577e1..5026303 100644
@@ -161,7 +161,7 @@ void pci_device_reset(PCIDevice *dev)
     dev->irq_state = 0;
     pci_update_irq_status(dev);
     pci_device_deassert_intx(dev);
-    /* Clear all writeable bits */
+    /* Clear all writable bits */
     pci_word_test_and_clear_mask(dev->config + PCI_COMMAND,
                                  pci_get_word(dev->wmask + PCI_COMMAND) |
                                  pci_get_word(dev->w1cmask + PCI_COMMAND));
@@ -863,7 +863,7 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num,
     wmask = ~(size - 1);
     addr = pci_bar(pci_dev, region_num);
     if (region_num == PCI_ROM_SLOT) {
-        /* ROM enable bit is writeable */
+        /* ROM enable bit is writable */
         wmask |= PCI_ROM_ADDRESS_ENABLE;
     }
     pci_set_long(pci_dev->config + addr, type);
@@ -1950,7 +1950,7 @@ void pci_del_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t size)
     if (!offset)
         return;
     pdev->config[prev] = pdev->config[offset + PCI_CAP_LIST_NEXT];
-    /* Make capability writeable again */
+    /* Make capability writable again */
     memset(pdev->wmask + offset, 0xff, size);
     memset(pdev->w1cmask + offset, 0, size);
     /* Clear cmask as device-specific registers can't be checked */
hw/pci.h +1 -1
index 52ee8c9..90121ca 100644
@@ -131,7 +131,7 @@ struct PCIDevice {
     /* PCI config space */
     uint8_t *config;
 
-    /* Used to enable config checks on load. Note that writeable bits are
+    /* Used to enable config checks on load. Note that writable bits are
      * never checked even if set in cmask. */
     uint8_t *cmask;
 
hw/rtl8139.c +24 -20

144 lines not on this page · raw message

hw/sun4m_iommu.c +1 -1
index bba69ee..7f5dad5 100644
@@ -118,7 +118,7 @@
 #define IOPTE_PAGE          0xffffff00 /* Physical page number (PA[35:12]) */
 #define IOPTE_CACHE         0x00000080 /* Cached (in vme IOCACHE or
                                           Viking/MXCC) */
-#define IOPTE_WRITE         0x00000004 /* Writeable */
+#define IOPTE_WRITE         0x00000004 /* Writable */
 #define IOPTE_VALID         0x00000002 /* IOPTE is valid */
 #define IOPTE_WAZ           0x00000001 /* Write as zeros */
 
target-mips/translate_init.c +1 -1
index 590e092..8d9b5b9 100644
@@ -477,7 +477,7 @@ static const mips_def_t mips_defs[] =
       .CP0_Config1 = (1 << CP0C1_FP) | (47 << CP0C1_MMU),
       .SYNCI_Step = 16,
       .CCRes = 2,
-      .CP0_Status_rw_bitmask = 0xF5D0FF1F,   /*bit5:7 not writeable*/
+      .CP0_Status_rw_bitmask = 0xF5D0FF1F,   /*bit5:7 not writable*/
       .CP1_fcr0 = (0x5 << FCR0_PRID) | (0x1 << FCR0_REV),
       .SEGBITS = 40,
       .PABITS = 40,
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 1 line · Stefan Weil

Replace writeable -> writable

Why make this change? writeable and writable are both commonly used spellings.

Stefan

#2 lore raw

Am Dienstag 26 April 2011 11:25:58 schrieb Stefan Hajnoczi:

Quoted 5 lines · Stefan Weil
Quoted 1 line

Replace writeable -> writable

Why make this change? writeable and writable are both commonly used spellings.

It seems like "writeable" is the commonly used term in computer sciences and "writable" is the normal english adjective formed from "to write" + "-able" in general English.[1]

As we are refering to computer science related "writeable" it should be left as is imho. But as I'm no native speaker, you might feel different on this. On a side note: Samba offers both spellings as valid for thier configuration files. [2]

[1] http://www.thefreedictionary.com/writeable
[2] http://forums.contribs.org/index.php?topic=22258.0

With regards,

Dipl. Phys.
Jan M. Simons

Institute of Crystallography
RWTH Aachen University

#3 lore raw

Am 26.04.2011 19:04, schrieb Jan Marten Simons:

Quoted 19 lines

Am Dienstag 26 April 2011 11:25:58 schrieb Stefan Hajnoczi:

Quoted 5 lines · Stefan Weil
Quoted 1 line

Replace writeable -> writable

Why make this change? writeable and writable are both commonly used spellings.

It seems like "writeable" is the commonly used term in computer sciences and "writable" is the normal english adjective formed from "to write" + "-able" in general English.[1]

As we are refering to computer science related "writeable" it should be left as is imho. But as I'm no native speaker, you might feel different on this. On a side note: Samba offers both spellings as valid for thier configuration files. [2]

[1] http://www.thefreedictionary.com/writeable
[2] http://forums.contribs.org/index.php?topic=22258.0

Quoted 7 lines

With regards,

Dipl. Phys.
Jan M. Simons

Institute of Crystallography
RWTH Aachen University

Commonly used is not necessarily correct.

The Oxford dictionary only accepts writable (even when I select american english). Same result with Merriam-Webster. Google suggests writable instead of writeable.

I see "writeable" only in computer programs and related contexts, therefore I assume that it is simply a very common spelling error contributed by non-native speakers (like myself). Interesting
detail: The spelling checker of my mailing client (Icedove) marks writeable as correct and writable as wrong (which is obviously wrong). Maybe I should send a bug report to Debian.

The ratio of writeable:writable in unpatched qemu is 37:47. Even if both writings were correct, I might argue that a uniform spelling is better and choose the form which is more commonly used.

Let's improve the spelling for computer programs a little bit!

#4 lore raw

Am 26.04.2011 19:26, schrieb Stefan Weil:

Quoted 41 lines

Am 26.04.2011 19:04, schrieb Jan Marten Simons:

Quoted 19 lines

Am Dienstag 26 April 2011 11:25:58 schrieb Stefan Hajnoczi:

Quoted 5 lines · Stefan Weil
Quoted 1 line

Replace writeable -> writable

Why make this change? writeable and writable are both commonly used spellings.

It seems like "writeable" is the commonly used term in computer sciences and "writable" is the normal english adjective formed from "to write" + "-able" in general English.[1]

As we are refering to computer science related "writeable" it should be left as is imho. But as I'm no native speaker, you might feel different on this. On a side note: Samba offers both spellings as valid for thier configuration files. [2]

[1] http://www.thefreedictionary.com/writeable
[2] http://forums.contribs.org/index.php?topic=22258.0

Quoted 7 lines

With regards,

Dipl. Phys.
Jan M. Simons

Institute of Crystallography
RWTH Aachen University

Commonly used is not necessarily correct.

The Oxford dictionary only accepts writable (even when I select american english). Same result with Merriam-Webster. Google suggests writable instead of writeable.

I see "writeable" only in computer programs and related contexts, therefore I assume that it is simply a very common spelling error contributed by non-native speakers (like myself). Interesting
detail: The spelling checker of my mailing client (Icedove) marks writeable as correct and writable as wrong (which is obviously wrong). Maybe I should send a bug report to Debian.

Quoted 6 lines

The ratio of writeable:writable in unpatched qemu is 37:47. Even if both writings were correct, I might argue that a uniform spelling is better and choose the form which is more commonly used.

Let's improve the spelling for computer programs a little bit!

Debian's myspell-en-gb is wrong, so I just sent a bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624249

Several other spelling lists included in Debian are correct, e.g. hunspell-en-us, iamerican, ibritish, aspell-en.

Here is a list from a native (american) speaker with common spelling bugs: http://marvin.cs.uidaho.edu/misspell.html
It also includes "writeable".

Cheers,
Stefan W.

#5 lore raw
In reply to Stefan Weil
Quoted 3 lines · Stefan Weil

The Oxford dictionary only accepts writable (even when I select american english). Same result with Merriam-Webster. Google suggests writable instead of writeable.

For what it's worth, the full Oxford English Dictionary has:
# writable, adj.
# Forms: Also writeable.

with quotes including:
# 1913 G. B. Shaw Let. 26 Mar. in Bernard Shaw & Mrs. P.
# Campbell (1952) 104, I have written everything that is
# writeable: The rest must be viva voce.

-- PMM

#6 lore raw
In reply to Stefan Weil
Quoted 50 lines · Stefan Weil

Am 26.04.2011 19:04, schrieb Jan Marten Simons:

Quoted 28 lines

Am Dienstag 26 April 2011 11:25:58 schrieb Stefan Hajnoczi:

Quoted 8 lines
Quoted 2 lines · Stefan Weil

Replace writeable -> writable

Why make this change? writeable and writable are both commonly used spellings.

It seems like "writeable" is the commonly used term in computer sciences and
"writable" is the normal english adjective formed from "to write" + "-able" in
general English.[1]

As we are refering to computer science related "writeable" it should be left
as is imho. But as I'm no native speaker, you might feel different on this.
On a side note: Samba offers both spellings as valid for thier configuration
files. [2]

[1] http://www.thefreedictionary.com/writeable
[2] http://forums.contribs.org/index.php?topic=22258.0

Quoted 7 lines

With regards,

Dipl. Phys.
Jan M. Simons

Institute of Crystallography
RWTH Aachen University

Commonly used is not necessarily correct.

The Oxford dictionary only accepts writable (even when I select american english). Same result with Merriam-Webster. Google suggests writable instead of writeable.

I see "writeable" only in computer programs and related contexts, therefore I assume that it is simply a very common spelling error contributed by non-native speakers (like myself). Interesting
detail: The spelling checker of my mailing client (Icedove) marks writeable as correct and writable as wrong (which is obviously wrong). Maybe I should send a bug report to Debian.

Quoted 4 lines

The ratio of writeable:writable in unpatched qemu is 37:47. Even if both writings were correct, I might argue that a uniform spelling is better and choose the form which is more commonly used.

The patch mostly touches comments and won't affect external interfaces, it makes the code consistent. So let's take it and move on:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan