Skip to contentSkip to conversation

misc: Fix typos in comments

PATCH Applied Stefan Weil 3 participants 3 messages Mar 7, 2014 – Mar 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: Fix typos in comments

Codespell found and fixed these new typos:

* doesnt -> doesn't
* funtion -> function
* perfomance -> performance
* remaing -> remaining

A code style issue (line too long) was fixed manually.

---
 hw/intc/arm_gic_kvm.c    |    2 +-
 hw/net/fsl_etsec/rings.c |    4 ++--
 target-arm/helper.c      |    2 +-
 target-ppc/int_helper.c  |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
hw/intc/arm_gic_kvm.c +1 -1
index 100b6bf..719d227 100644
@@ -148,7 +148,7 @@ typedef void (*vgic_translate_fn)(GICState *s, int irq, int cpu,
                                   uint32_t *field, bool to_kernel);
 
 /* synthetic translate function used for clear/set registers to completely
- * clear a setting using a clear-register before setting the remaing bits
+ * clear a setting using a clear-register before setting the remaining bits
  * using a set-register */
 static void translate_clear(GICState *s, int irq, int cpu,
                             uint32_t *field, bool to_kernel)
hw/net/fsl_etsec/rings.c +2 -2
index 7760272..d7c38fa 100644
@@ -195,8 +195,8 @@ static void process_tx_fcb(eTSEC *etsec)
 
     /* if packet is IP4 and IP checksum is requested */
     if (flags & FCB_TX_IP && flags & FCB_TX_CIP) {
-        /* do IP4 checksum (TODO This funtion does TCP/UDP checksum but not sure
-         * if it also does IP4 checksum. */
+        /* do IP4 checksum (TODO This function does TCP/UDP checksum
+         * but not sure if it also does IP4 checksum. */
         net_checksum_calculate(etsec->tx_buffer + 8,
                 etsec->tx_buffer_len - 8);
     }
target-arm/helper.c +1 -1
index 90f85f1..3495220 100644
@@ -469,7 +469,7 @@ static const ARMCPRegInfo v6_cp_reginfo[] = {
 
 static CPAccessResult pmreg_access(CPUARMState *env, const ARMCPRegInfo *ri)
 {
-    /* Perfomance monitor registers user accessibility is controlled
+    /* Performance monitor registers user accessibility is controlled
      * by PMUSERENR.
      */
     if (arm_current_pl(env) == 0 && !env->cp15.c9_pmuserenr) {
target-ppc/int_helper.c +1 -1
index 63dde94..e14e304 100644
@@ -2216,7 +2216,7 @@ static int bcd_cmp_mag(ppc_avr_t *a, ppc_avr_t *b)
         uint8_t dig_a = bcd_get_digit(a, i, &invalid);
         uint8_t dig_b = bcd_get_digit(b, i, &invalid);
         if (unlikely(invalid)) {
-            return 0; /* doesnt matter */
+            return 0; /* doesn't matter */
         } else if (dig_a > dig_b) {
             return 1;
         } else if (dig_a < dig_b) {
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw

Am 07.03.2014 19:48, schrieb Stefan Weil:

Quoted 8 lines

Codespell found and fixed these new typos:

* doesnt -> doesn't
* funtion -> function
* perfomance -> performance
* remaing -> remaining

A code style issue (line too long) was fixed manually.

"coding style"?

Quoted 2 lines

[...]

hw/net/fsl_etsec/rings.c static void process_tx_fcb(eTSEC *etsec) · line 199

Quoted 12 lines
hw/net/fsl_etsec/rings.c +2 -2
index 7760272..d7c38fa 100644
@@ -195,8 +195,8 @@ static void process_tx_fcb(eTSEC *etsec)
 
     /* if packet is IP4 and IP checksum is requested */
     if (flags & FCB_TX_IP && flags & FCB_TX_CIP) {
-        /* do IP4 checksum (TODO This funtion does TCP/UDP checksum but not sure
-         * if it also does IP4 checksum. */
+        /* do IP4 checksum (TODO This function does TCP/UDP checksum
+         * but not sure if it also does IP4 checksum. */

While rebreaking it, you could've also added the missing parenthesis, after the dot I guess. Apart from that,

Thanks,
Andreas

Quoted 3 lines
hw/net/fsl_etsec/rings.c +0 -0
         net_checksum_calculate(etsec->tx_buffer + 8,
                 etsec->tx_buffer_len - 8);
     }

[snip]

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#2 lore raw
Quoted 1 line · Andreas Färber

Am 07.03.2014 19:48, schrieb Stefan Weil:

[]

Quoted 8 lines

hw/net/fsl_etsec/rings.c static void process_tx_fcb(eTSEC *etsec) · line 199

Quoted 5 lines
     if (flags & FCB_TX_IP && flags & FCB_TX_CIP) {
hw/net/fsl_etsec/rings.c +2 -2
-        /* do IP4 checksum (TODO This funtion does TCP/UDP checksum but not sure
-         * if it also does IP4 checksum. */
+        /* do IP4 checksum (TODO This function does TCP/UDP checksum
+         * but not sure if it also does IP4 checksum. */

While rebreaking it, you could've also added the missing parenthesis, after the dot I guess. Apart from that,

Actually, that's a fun comment. "do IP4 checksum, but unsure if it also does IP4 checksum". Ie, do something but I'm not sure if it actually does that... ;)

Applied to -trivial, fixing both the commit comment and this parenthesis.

Thanks,

/mjt