trivial: fix assorted "through" typos
Subsystems (14)
PATCH 3/16 trivial: fix assorted "through" typos
Quoted 1 line
From
f5d73ba151304056e4f7ea37e515493d1d3df38fMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Goddard=20Rosa?= <[email protected]>
Date: Fri, 30 Oct 2009 06:16:07 -0200
Subject: [PATCH 03/16] trivial: fix assorted "through" typos
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
(quoted diff) +0 -0
b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
index 446f867..0c7802b 100644
arch/arm/plat-mxc/include/mach/iomux-mx3.h +1 -1
@@ -112,7 +112,7 @@ enum iomux_gp_func {* setups a single pin: * - reserves the pin so that it is not claimed by another driver * - setups the iomux according to the configuration -* - if the pin is configured as a GPIO, we claim it throug kernel gpiolib +* - if the pin is configured as a GPIO, we claim it through kernel gpiolib */ int mxc_iomux_alloc_pin (const unsigned int pin,const char *label);/*
(quoted diff) +0 -0
b/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h
index 9f13061..3887f3f 100644
arch/arm/plat-mxc/include/mach/iomux-mxc91231.h +1 -1
@@ -48,7 +48,7 @@* setups a single pin: * - reserves the pin so that it is not claimed by another driver * - setups the iomux according to the configuration -* - if the pin is configured as a GPIO, we claim it throug kernel gpiolib +* - if the pin is configured as a GPIO, we claim it through kernel gpiolib */ int mxc_iomux_alloc_pin (const unsigned int pin_mode,const char *label);/*
(quoted diff) +0 -0
b/arch/avr32/boards/hammerhead/Kconfig
index fda2331..5c13d78 100644
arch/avr32/boards/hammerhead/Kconfig +1 -1
@@ -24,7 +24,7 @@ config BOARD_HAMMERHEAD_SND bool "Atmel AC97 Sound support" help This enables Sound support for the Hammerhead board. You may - also go trough the ALSA settings to get it working. + also go through the ALSA settings to get it working. Choose 'Y' here if you have ordered a Corona daugther board and want to make your board funky.
(quoted diff) +0 -0
b/arch/blackfin/kernel/cplb-mpu/cplbinit.c
index f7b9cdc..b52c1f8 100644
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1 -1
@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache =CPLB_L1_CHBL ; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH d_cache |=CPLB_L1_AOW |CPLB_WT ;#endif #endif
arch/ia64/ia32/ia32_entry.S +1 -1
@@ -79,7 +79,7 @@ GLOBAL_ENTRY(ia32_ret_from_clone) (p6) br.cond.spnt .ia32_strace_check_retval ;; // prevent RAW on r8 END(ia32_ret_from_clone) - // fall thrugh + // fall through GLOBAL_ENTRY(ia32_ret_from_syscall) PT_REGS_UNWIND_INFO(0)
arch/mips/math-emu/dp_sub.c +1 -1
@@ -110,7 +110,7 @@ ieee754dp ieee754dp_sub(ieee754dp x, ieee754dp y)case CLPAIR (IEEE754_CLASS_DNORM ,IEEE754_CLASS_DNORM ):DPDNORMX ; -/* FAAL THOROUGH */ +/* FALL THROUGH */ case CLPAIR (IEEE754_CLASS_NORM ,IEEE754_CLASS_DNORM ):/* normalize ym,ye */
arch/x86/kernel/amd_iommu.c +1 -1
@@ -2394,7 +2394,7 @@ int __init amd_iommu_init_passthrough(void)struct pci_dev *dev =NULL ;u16 devid, devid2; -/* allocate passthroug domain */ +/* allocate passthrough domain */ pt_domain =protection_domain_alloc ();if (!pt_domain)return -ENOMEM ;
arch/x86/kernel/kprobes.c +0 -0
@@ -481,7 +481,7 @@ static int __kprobes reenter_kprobe(struct kprobe
*p, struct pt_regs *regs,
/*
* Interrupts are disabled on entry as trap3 is an interrupt gate and they
- * remain disabled thorough out this function.
+ * remain disabled throughout this function.
*/
static int __kprobes kprobe_handler(struct pt_regs *regs)
{
@@ -818,7 +818,7 @@ no_change:
/*
* Interrupts are disabled on entry as trap1 is an interrupt gate and they
- * remain disabled thoroughout this function.
+ * remain disabled throughout this function.
*/
static int __kprobes post_kprobe_handler(struct pt_regs *regs) {
arch/x86/mm/kmmio.c +0 -0
@@ -203,7 +203,7 @@ static void disarm_kmmio_fault_page(struct
kmmio_fault_page *f)
*/
/*
* Interrupts are disabled on entry as trap3 is an interrupt gate
- * and they remain disabled thorough out this function.
+ * and they remain disabled throughout this function. */
int kmmio_handler(struct pt_regs *regs, unsigned long addr) {
@@ -302,7 +302,7 @@ no_kmmio:
/*
* Interrupts are disabled on entry as trap1 is an interrupt gate
- * and they remain disabled thorough out this function.
+ * and they remain disabled throughout this function.
* This must always get called as the pair to kmmio_handler(). */
static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
drivers/char/n_r3964.c +0 -0
@@ -602,7 +602,7 @@ static void receive_char(struct r3964_info *pInfo,
const unsigned char c)
}
break;
case R3964_WAIT_FOR_RX_REPEAT:
- /* FALLTROUGH */
+ /* FALLTHROUGH */
case R3964_IDLE:
if (c == STX) {
/* Prevent rx_queue from overflow: */
drivers/char/rio/route.h +1 -1
@@ -67,7 +67,7 @@typedef struct COST_ROUTE COST_ROUTE ;struct COST_ROUTE {unsigned char cost;/* Cost down this link */ -unsigned char route[NODE_BYTES ];/* Nodes thorough this route */ +unsigned char route[NODE_BYTES ];/* Nodes through this route */ };typedef struct ROUTE_STR ROUTE_STR ;
(quoted diff) +0 -0
b/drivers/isdn/hardware/mISDN/hfcsusb.c
index fc46a26..a64bb6c 100644
drivers/isdn/hardware/mISDN/hfcsusb.c +1 -1
@@ -721,7 +721,7 @@ hfcsusb_setup_bch(struct bchannel *bch, int protocol)switch (protocol) {case (-1 ):/* used for init */ bch->state =-1 ; -/* fall trough */ +/* fall through */ case (ISDN_P_NONE ):if (bch->state ==ISDN_P_NONE )return 0 ;/* already in idle state */
(quoted diff) +0 -0
b/drivers/media/common/saa7146_i2c.c
index 7e8f568..48cb154 100644
drivers/media/common/saa7146_i2c.c +0 -0
@@ -98,7 +98,7 @@ static int saa7146_i2c_msg_cleanup(const struct
i2c_msg *m, int num, __le32 *op)
op_count++;
- /* loop throgh all bytes of message i */
+ /* loop through all bytes of message i */
for(j = 0; j < m[i].len; j++) {
/* write back all bytes that could have been read */ m[i].buf[j] = (le32_to_cpu(op[op_count/3]) >> ((3-(op_count%3))*8));
(quoted diff) +0 -0
b/drivers/media/radio/radio-mr800.c
index a123908..5f79acb 100644
drivers/media/radio/radio-mr800.c +1 -1
@@ -28,7 +28,7 @@* http://av-usbradio.sourceforge.net/index.php * http://sourceforge.net/projects/av-usbradio/ * Latest release of theirs project was in 2005. -* Probably, this driver could be improved trough using their +* Probably, this driver could be improved through using their * achievements (specifications given). * Also, Faidon Liambotis <[email protected]> wrote nice driver for
this radio
* in 2007. He allowed to use his driver to improve current mr800 radio driver.
(quoted diff) +0 -0
b/drivers/media/video/cx231xx/cx231xx-avcore.c
index 28f48f4..c217441 100644
drivers/media/video/cx231xx/cx231xx-avcore.c +5 -3
@@ -2414,9 +2414,11 @@ int cx231xx_gpio_i2c_read_ack(struct cx231xx *dev)cx231xx_info ("No ACK after %d msec -GPIO I2C failed!" , nInit *10 ); -/* readAck -throuth clock stretch ,slave has given a SCL signal, -so the SDA data can be directly read. */ +/* +* readAck +* through clock stretch, slave has given a SCL signal, +* so the SDA data can be directly read. +*/ status =cx231xx_get_gpio_bit (dev, dev->gpio_dir, (u8 *)&dev->gpio_val);if ((dev->gpio_val &1 << dev->board.tuner_sda_gpio) ==0 ) {
(quoted diff) +0 -0
b/drivers/media/video/gspca/sonixb.c
index cf3af8d..e39efb4 100644
drivers/media/video/gspca/sonixb.c +1 -1
@@ -304,7 +304,7 @@ static const __u8 initOv6650[] = { };static const __u8 ov6650_sensor_init[][8 ] = { -/* Bright, contrast, etc are set througth SCBB interface. +/* Bright, contrast, etc are set through SCBB interface. * AVCAP on win2 do not send any data on this controls. */ /* Anyway, some registers appears to alter bright and constrat */
(quoted diff) +0 -0
b/drivers/net/wireless/iwmc3200wifi/commands.c
index 84158b6..8d154fa 100644
drivers/net/wireless/iwmc3200wifi/commands.c +2 -2
@@ -49,7 +49,7 @@#include "commands.h" #include "debug.h" -static int iwm_send_lmac_ptrough_cmd(struct iwm_priv *iwm, +static int iwm_send_lmac_pthrough_cmd(struct iwm_priv *iwm, u8 lmac_cmd_id, const void *lmac_payload, u16 lmac_payload_size,
@@ -185,7 +185,7 @@ int iwm_send_prio_table(struct iwm_priv *iwm) }else IWM_WARN (iwm,"coexistense disabled\n" ); -return iwm_send_lmac_ptrough_cmd (iwm,COEX_PRIORITY_TABLE_CMD , +return iwm_send_lmac_pthrough_cmd (iwm,COEX_PRIORITY_TABLE_CMD , &coex_table_cmd,sizeof (struct iwm_coex_prio_table_cmd ),1 ); }
@@ -202,7 +202,7 @@ int iwm_send_init_calib_cfg(struct iwm_priv *iwm,
u8 calib_requested)
cal_cfg_cmd.ucode_cfg.flags =
cpu_to_le32(CALIB_CFG_FLAG_SEND_COMPLETE_NTFY_AFTER_MSK);
- return iwm_send_lmac_ptrough_cmd(iwm, CALIBRATION_CFG_CMD, &cal_cfg_cmd,
+ return iwm_send_lmac_pthrough_cmd(iwm, CALIBRATION_CFG_CMD, &cal_cfg_cmd,
sizeof(struct iwm_lmac_cal_cfg_cmd), 1);
}
@@ -215,7 +215,7 @@ int iwm_send_periodic_calib_cfg(struct iwm_priv *iwm, u8 calib_requested)
cal_cfg_cmd.ucode_cfg.periodic.enable = cpu_to_le32(calib_requested); cal_cfg_cmd.ucode_cfg.periodic.start = cpu_to_le32(calib_requested);
- return iwm_send_lmac_ptrough_cmd(iwm, CALIBRATION_CFG_CMD, &cal_cfg_cmd,
+ return iwm_send_lmac_pthrough_cmd(iwm, CALIBRATION_CFG_CMD, &cal_cfg_cmd,
sizeof(struct iwm_lmac_cal_cfg_cmd), 0);
}
@@ -261,7 +261,7 @@ int iwm_send_calib_results(struct iwm_priv *iwm)
&iwm->calib_done_map)) {
IWM_DBG_CMD(iwm, DBG,
"Send calibration %d result\n", i);
- ret |= iwm_send_lmac_ptrough_cmd(iwm,
+ ret |= iwm_send_lmac_pthrough_cmd(iwm,
REPLY_PHY_CALIBRATION_CMD, iwm->calib_res[i].buf, iwm->calib_res[i].size, 0);
(quoted diff) +0 -0
b/drivers/net/wireless/iwmc3200wifi/hal.c
index c430418..d13c885 100644
drivers/net/wireless/iwmc3200wifi/hal.c +0 -0
@@ -411,7 +411,7 @@ static void iwm_build_lmac_hdr(struct iwm_priv
*iwm, struct iwm_lmac_hdr *hdr,
/*
* iwm_hal_send_host_cmd(): sends commands to the UMAC or the LMAC.
* Sending command to the LMAC is equivalent to sending a
- * regular UMAC command with the LMAC passtrough or the LMAC
+ * regular UMAC command with the LMAC passthrough or the LMAC
* wrapper UMAC command IDs.
*/
int iwm_hal_send_host_cmd(struct iwm_priv *iwm,
(quoted diff) +0 -0
b/drivers/staging/rt3090/common/spectrum.c
index c26f057..f0e5508 100644
drivers/staging/rt3090/common/spectrum.c +1 -1
@@ -1362,7 +1362,7 @@ VOID NotifyChSwAnnToPeerAPs(if (!((pRA[0 ] &0xff ) ==0xff ))// is pRA a broadcase address. {INT i; -// info neighbor APs that Radar signal found throgh WDS link. +// info neighbor APs that Radar signal found through WDS link. for (i =0 ; i <MAX_WDS_ENTRY ; i++) {if (ValidWdsEntry (pAd, i))
(quoted diff) +0 -0
b/drivers/staging/rtl8187se/r8180_core.c
index 53e654d..c65de92 100644
drivers/staging/rtl8187se/r8180_core.c +2 -2
@@ -1919,8 +1919,8 @@ rate)/* * This function doesn't require lock because we make * sure it's called with the tx_lock already acquired. -* this come from the kernel's hard_xmit callback (trought -* the ieee stack, or from the try_wake_queue (again trought +* this come from the kernel's hard_xmit callback (throught +* the ieee stack, or from the try_wake_queue (again throught * the ieee stack. */ priority =AC2Q (skb->priority);
include/net/wimax.h +1 -1
@@ -79,7 +79,7 @@* drivers have to only report state changes due to external * conditions. * -* All API operations are 'atomic', serialized thorough a mutex in the +* All API operations are 'atomic', serialized through a mutex in the * `struct wimax_dev`. * * EXPORTING TO USER SPACE THROUGH GENERIC NETLINK
net/irda/irlap.c +4 -4
@@ -450,10 +450,10 @@ void irlap_disconnect_request(struct irlap_cb *self)/* Check if we are in the right state for disconnecting */ switch (self->state) { -case LAP_XMIT_P :/* FALLTROUGH */ -case LAP_XMIT_S :/* FALLTROUGH */ -case LAP_CONN :/* FALLTROUGH */ -case LAP_RESET_WAIT :/* FALLTROUGH */ +case LAP_XMIT_P :/* FALLTHROUGH */ +case LAP_XMIT_S :/* FALLTHROUGH */ +case LAP_CONN :/* FALLTHROUGH */ +case LAP_RESET_WAIT :/* FALLTHROUGH */ case LAP_RESET_CHECK :irlap_do_event (self,DISCONNECT_REQUEST ,NULL ,NULL );break ;
@@ -485,9 +485,9 @@ void irlap_disconnect_indication(struct irlap_cb
*self, LAP_REASON reason)
IRDA_DEBUG(1, "%s(), Sending reset request!\n", __func__); irlap_do_event(self, RESET_REQUEST, NULL, NULL); break;
- case LAP_NO_RESPONSE: /* FALLTROUGH */
- case LAP_DISC_INDICATION: /* FALLTROUGH */
- case LAP_FOUND_NONE: /* FALLTROUGH */
+ case LAP_NO_RESPONSE: /* FALLTHROUGH */
+ case LAP_DISC_INDICATION: /* FALLTHROUGH */
+ case LAP_FOUND_NONE: /* FALLTHROUGH */
case LAP_MEDIA_BUSY:
irlmp_link_disconnect_indication(self->notify.instance, self,
reason, NULL);
sound/pci/cs46xx/imgs/cwcdma.asp +0 -1
@@ -26,10 +26,11 @@ // // // The purpose of this code is very simple: make it possible to tranfser -// the samples 'as they are' with no alteration from a PCMreader SCB
(DMA from host)
-// to any other SCB. This is useful for AC3 throug SPDIF. SRC (source rate converters)
-// task always alters the samples in some how, however it's from 48khz -> 48khz. The
-// alterations are not audible, but AC3 wont work.
+// the samples 'as they are' with no alteration from a PCMreader +// SCB (DMA from host) to any other SCB. This is useful for AC3 through SPDIF. +// SRC (source rate converters) task always alters the samples in somehow, +// however it's from 48khz -> 48khz.
+// The alterations are not audible, but AC3 wont work.
//
// ...
// |
Signature · 1 line
1.6.5.2.101.gcd0f8
I've only looked at this one, but something caught my eye...
Quoted 6 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +0
-0
arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 44
Quoted 8 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache =CPLB_L1_CHBL ; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH d_cache |=CPLB_L1_AOW |CPLB_WT ;#endif #endif
"Surely that can't be the only time?", I thought. But it is - all of the other #ifdefs are spelled correctly, so you're probably fixing a hard-to-find bug here! Good catch!
Makes me wonder if anyone's written a tool to find things like this - #ifdefs that will never be defined...
Regards,
Nigel
Quoted 10 lines · Nigel Cunningham
I've only looked at this one, but something caught my eye...
Quoted 7 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +0
-0@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
Quoted 11 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 44
Quoted 7 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache = CPLB_L1_CHBL; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH d_cache |= CPLB_L1_AOW | CPLB_WT; #endif #endif"Surely that can't be the only time?", I thought. But it is - all of the other #ifdefs are spelled correctly, so you're probably fixing a hard-to-find bug here! Good catch!
Good, that's why I made it a separate patch.
Quoted 2 lines
Makes me wonder if anyone's written a tool to find things like this - #ifdefs that will never be defined...
Yeah, I thought the same thing; surely it would be nice... Probably it's not only the one case, I suppose.
With regards,
André
Am 31.10.2009 11:17 schrieb Nigel Cunningham:
Quoted 22 lines
I've only looked at this one, but something caught my eye...
Quoted 6 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +0
-0arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 44
Quoted 8 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache =CPLB_L1_CHBL ; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH d_cache |=CPLB_L1_AOW |CPLB_WT ;#endif #endif "Surely that can't be the only time?", I thought. But it is - all of the other #ifdefs are spelled correctly, so you're probably fixing a hard-to-find bug here! Good catch!
Quoted 2 lines
Makes me wonder if anyone's written a tool to find things like this - #ifdefs that will never be defined...
I seem to remember someone (Joe Perches?) did, and regularly posted results to LKML in the past, but at some point switched to publishing them on a web page instead.
Signature · 4 lines
Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Quoted 23 lines · On Sat, 31 Oct 2009 13:11:29 +0100 Tilman Schmidt wrote:
Am 31.10.2009 11:17 schrieb Nigel Cunningham:
Quoted 22 lines
I've only looked at this one, but something caught my eye...
Quoted 6 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +0
-0arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 44
Quoted 8 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache =CPLB_L1_CHBL ; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH d_cache |=CPLB_L1_AOW |CPLB_WT ;#endif #endif "Surely that can't be the only time?", I thought. But it is - all of the other #ifdefs are spelled correctly, so you're probably fixing a hard-to-find bug here! Good catch!
Quoted 6 lines
Quoted 2 lines
Makes me wonder if anyone's written a tool to find things like this - #ifdefs that will never be defined...
I seem to remember someone (Joe Perches?) did, and regularly posted results to LKML in the past, but at some point switched to publishing them on a web page instead.
It was Robert PJ Day.
See http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup
---
~Randy
Quoted 2 lines · Randy Dunlap
It was Robert PJ Day.
See http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup
Talking about cleanup, there are many definitions of ARRAY_SIZE, found using cscope:
0 spidev_test.c 24 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) 1 page-types.c 194 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
2 types.h 4 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
3 user.h 17 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 4 boot.h 35 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) 5 relocs.c 13 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 6 kernel.h 46 #define ARRAY_SIZE(arr) (sizeof(arr) /
sizeof((arr)[0]) + __must_be_array(arr))
7 dtc.h 83 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
8 genksyms.c 314 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
9 kallsyms.c 27 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
a file2alias.c 520 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
b util.h 28 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
Please forgive me if this is not the right place to post this.
ARRAY_SIZE (was: [PATCH 03/16] trivial: fix assorted "through" typos)
Am 01.11.2009 22:13 schrieb Thiago Farina:
Quoted 10 lines
Talking about cleanup, there are many definitions of
ARRAY_SIZE, found using cscope:
0spidev_test.c24 #defineARRAY_SIZE(a)(sizeof(a) / sizeof((a)[0])) 1page-types.c194 #defineARRAY_SIZE(x)(sizeof(x) / sizeof((x)[0]))
2types.h4 #defineARRAY_SIZE(x)(sizeof(x) / sizeof((x)[0]))3 user.h 17 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 4 boot.h 35 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) 5 relocs.c 13 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 6 kernel.h 46 #define ARRAY_SIZE(arr) (sizeof(arr) /
Quoted 6 lines
sizeof((arr)[0]) +
__must_be_array(arr))
7dtc.h83 #defineARRAY_SIZE(x)(sizeof(x) / sizeof((x)[0]))
8genksyms.c314 #defineARRAY_SIZE(arr)(sizeof(arr) / sizeof((arr)[0]))
9kallsyms.c27 #defineARRAY_SIZE(arr)(sizeof(arr) /sizeof(arr[0]))
afile2alias.c520 #defineARRAY_SIZE(x)(sizeof(x) / sizeof((x)[0]))
butil.h28 #defineARRAY_SIZE(x)(sizeof(x)/sizeof(x[0]))
You should have included the files' directory paths. That would have shown that seven of these aren't in actual kernel source files at all:
two in the Documentation tree, four in scripts, and one in tools. Four are in the arch tree, and are needed for boot or userspace code. There only remains one: the definition in include/linux/kernel.h which is the "official" one for regular kernel code.
Now the number of places which could use that macro but open-code it instead is a completely different story. See
http://www.crashcourse.ca/wiki/index.php/The_style_script
for a list of candidates.
Signature · 4 lines
Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Kernel cleanup Wiki (was: [PATCH 03/16] trivial: fix assorted "through" typos)
In reply to Randy DunlapAm 01.11.2009 18:52 schrieb Randy Dunlap:
Quoted 24 lines · On Sat, 31 Oct 2009 13:11:29 +0100 Tilman Schmidt wrote:
Quoted 23 lines
Am 31.10.2009 11:17 schrieb Nigel Cunningham:
Quoted 21 lines
I've only looked at this one, but something caught my eye...
Quoted 6 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +0
-0arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 44
Quoted 8 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache =CPLB_L1_CHBL ; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH d_cache |=CPLB_L1_AOW |CPLB_WT ;#endif #endif "Surely that can't be the only time?", I thought. But it is - all of the other #ifdefs are spelled correctly, so you're probably fixing a hard-to-find bug here! Good catch!
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Makes me wonder if anyone's written a tool to find things like this - #ifdefs that will never be defined...
I seem to remember someone (Joe Perches?) did, and regularly posted results to LKML in the past, but at some point switched to publishing them on a web page instead.
It was Robert PJ Day.
Indeed it was, and kudos to him for doing it. Please forgive my middle-aged brain for the misattribution.
Quoted 1 line
And sure enough, CONFIG_BFIN_EXTMEM_WRITETROUGH is listed there on the "Badref CONFIG variables" page.
It seems that page would merit a bit of advertising. :-)
Signature · 4 lines
Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
arch/x86/kernel/amd_iommu.c
Quoted 20 lines · André Goddard Rosa
Quoted 1 line
From
f5d73ba151304056e4f7ea37e515493d1d3df38fMon Sep 17 00:00:00 2001From: =?UTF-8?q?Andr=C3=A9=20Goddard=20Rosa?= <[email protected]>
Date: Fri, 30 Oct 2009 06:16:07 -0200
Subject: [PATCH 03/16] trivial: fix assorted "through" typos
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitSigned-off-by André Goddard Rosa <[email protected]>arch/arm/plat-mxc/include/mach/iomux-mx3.h +0
-0arch/x86/kernel/amd_iommu.c +0
-0
Please _always_ generate a diffstat as well, so that people reviewing patches can see the scope of your patch at a glance.
Ingo
arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 41
Quoted 11 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache =CPLB_L1_CHBL ; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH
As this one is fixing a *real* bug, please separate it out from the other changes which basically just fix typos in comments.
On the other hand, please merge all the other changes together into one larger patch. We don't want gazillions of commits because you have found gazillions of words typed wrongly in comments.
Thanks for taking care,
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Hi, Jiri!
Quoted 9 lines · Jiri Kosina
Quoted 7 lines · André Goddard Rosa
arch/blackfin/kernel/cplb-mpu/cplbinit.c +0
-0@@ -38,7 +38,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
Quoted 7 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c void __init generate_cplb_tables_cpu(unsigned int cpu) · line 41
Quoted 4 lines
arch/blackfin/kernel/cplb-mpu/cplbinit.c +1
-1#ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE d_cache = CPLB_L1_CHBL; -#ifdef CONFIG_BFIN_EXTMEM_WRITETROUGH +#ifdef CONFIG_BFIN_EXTMEM_WRITETHROUGH As this one is fixing a *real* bug, please separate it out from the other changes which basically just fix typos in comments.
Already done and taken care here:
http://marc.info/?l=linux-kernel&m=125701706006147&w=2
Quoted 5 lines
On the other hand, please merge all the other changes together into one larger patch. We don't want gazillions of commits because you have found gazillions of words typed wrongly in comments.
Thanks for taking care,
Sure thing, I will send a consolidated patch with these.
Thank you,
André