[PATCH] macintosh: wrong test in fan_{read,write}_reg()

2010-12-31 Thread roel kluin
Fix error test in fan_{read,write}_reg() Signed-off-by: Roel Kluin roel.kl...@gmail.com --- drivers/macintosh/therm_pm72.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ENODEV and EIO are positive (22 and 8), so the tests did not work. diff --git a/drivers/macintosh/therm_pm72

powerpc: should mem_end be assigned to dt_struct_end in flatten_device_tree()?

2010-01-14 Thread Roel Kluin
vi arch/powerpc/kernel/prom_init.c +1961 and note that in flatten_device_tree() we do a RELOC(dt_struct_end) = PAGE_ALIGN(mem_start); should that maybe be RELOC(dt_struct_end) = PAGE_ALIGN(mem_end); thanks, Roel ___ Linuxppc-dev

[PATCH] powerpc: Prevent unsigned wrap in htab_dt_scan_page_sizes()

2009-10-14 Thread Roel Kluin
Check to prevent unsigned wrap of size before subtraction. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Is this maybe better or are we certain that size can't wrap? diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 1ade7eb..dd2d263 100644 --- a/arch

Re: [Cbe-oss-dev] [PATCH] spufs: Fix test in spufs_switch_log_read()

2009-10-14 Thread Roel Kluin
size_t len cannot be less than 0. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Or can this test be removed? I'd prefer just to remove the test. Yes, sounds good. If you meant only the left-hand part, here you go: diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc

[PATCH] spufs: Fix test in spufs_switch_log_read()

2009-10-12 Thread Roel Kluin
size_t len cannot be less than 0. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Or can this test be removed? diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 884e8bc..d4f304f 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b

Re: linux-next: tree build failure

2009-09-29 Thread roel kluin
On Tue, Sep 29, 2009 at 11:28 AM, Jan Beulich jbeul...@novell.com wrote: Hollis Blanchard  09/29/09 2:00 AM First, I think there is a real bug here, and the code should read like this (to match the comment):    /* type has to be known at build time for optimization */ -    

[PATCH] 82xx: kmalloc failure ignored in ep8248e_mdio_probe()

2009-09-09 Thread Roel Kluin
Prevent NULL dereference if kmalloc() fails. Also clean up if of_mdiobus_register() returns an error. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Found with sed: http://kernelnewbies.org/roelkluin Please review. diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms

[PATCH] powerpc: kmalloc failure ignored in vio_build_iommu_table()

2009-09-09 Thread Roel Kluin
Prevent NULL dereference if kmalloc() fails. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Found with sed: http://kernelnewbies.org/roelkluin diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 819e59f..1f5266f 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc

[PATCH] powerpc: Read buffer overflow

2009-08-03 Thread Roel Kluin
Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index a0f6838..588a5b0 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c

[PATCH] powerpc/fsl-booke: Read buffer overflow

2009-07-31 Thread Roel Kluin
cam[tlbcam_index] is checked before tlbcam_index ARRAY_SIZE(cam) Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index bb3d659..dc93e95 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm

[PATCH] powerpc: missing tests after ioremap()?

2009-07-30 Thread Roel Kluin
Missing tests after ioremap() Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Shouldn't we test whether ioremaps fail? diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index e6c0040..3a4ebd3 100644 --- a/arch/powerpc/platforms/powermac

[PATCH] powerpc/cell: replace strncpy by strlcpy

2009-07-21 Thread Roel Kluin
Replace strncpy() and explicit null-termination by strlcpy() Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Arnd-san, Ken-san, Thanks for reviewing, We prefer to take the patch which is replacing the two lines with one. Doozo. diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b

[PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread Roel Kluin
With `sizeof(string) - 1` strncpy() will null terminate the string. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- To test this: #include stdio.h #include string.h char a[10]; char b[10]; int main() { const char* str = 0123456789012; strncpy(a, str, sizeof

Re: [PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread Roel Kluin
strlcpy() will always null terminate the string. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Please use this one instead diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c index 07c234f..1896cd8 100644 --- a/arch/powerpc/platforms/cell

Re: [PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread roel kluin
With `sizeof(string) - 1` strncpy() will null terminate the string. No, it won't. See the line after the strncpy. This is still required for proper zero-termination. You're right, sorry for the noise. Roel ___ Linuxppc-dev mailing list

[PATCH] Sky CPU: redundant or incorrect tests on unsigned

2009-06-22 Thread Roel Kluin
count is unsigned and cannot be less than 0. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Can these be removed or do we need an `if (count MAX)' test, and what should MAX be then? diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index 176fe4e

[PATCH] spufs: remove redundant test on unsigned

2009-06-22 Thread Roel Kluin
Unsigned `len' cannot be less than 0. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Or should it be `if (!buf || len MAX)' and what should MAX be then? diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c index d0b1f3f..8f799ee 100644

[PATCH] powerpc:beyond ARRAY_SIZE of args.args

2009-05-21 Thread Roel Kluin
Do not go beyond ARRAY_SIZE of args.args Signed-off-by: Roel Kluin roel.kl...@gmail.com --- I'm quite sure the first is correct, but should maybe `args.nret' and `nargs + args.nret' also be `= ARRAY_SIZE(args.args)'? diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index

[PATCH] KVM: powerpc: beyond ARRAY_SIZE of vcpu-arch.guest_tlb

2009-05-21 Thread Roel Kluin
Do not go beyond ARRAY_SIZE of vcpu-arch.guest_tlb Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 0fce4fb..c2cfd46 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -125,7 +125,7 @@ static int

[PATCH] powerpc/5200: beyond ARRAY_SIZE of mpc52xx_uart_{ports, nodes}

2009-05-19 Thread Roel Kluin
Do not go beyond ARRAY_SIZE of mpc52xx_uart_{ports,nodes} Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 7f72f8c..b3feb61 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -988,7

[PATCH] tape: beyond ARRAY_SIZE of viocd_diskinfo

2009-05-19 Thread Roel Kluin
Do not go beyond ARRAY_SIZE of tape_device and viotape_unitinfo Signed-off-by: Roel Kluin roel.kl...@gmail.com Acked-by: Stephen Rothwell s...@canb.auug.org.au --- diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index ffc9254..042c814 100644 --- a/drivers/char/viotape.c +++ b/drivers

[PATCH] ps3: remove driver_data direct access of struct device

2009-05-11 Thread Roel Kluin
To avoid direct access to the driver_data pointer in struct device, the functions dev_get_drvdata() and dev_set_drvdata() should be used. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Please review. especially note that I removed a kfree(dev-sbd.core.driver_data); Is that correct? arch

[PATCH] aoa: remove driver_data direct access of struct device

2009-05-11 Thread Roel Kluin
To avoid direct access to the driver_data pointer in struct device, the functions dev_get_drvdata() and dev_set_drvdata() should be used. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index fbf5c93..586965f 100644

[PATCH] powerpc/spufs: negative size in spufs_{regs/fpcr}_write

2009-03-03 Thread Roel Kluin
When stored in size_t size, the test 'size = 0' does no longer work. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 0da7f2b..05dba47 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c

Re: [PATCH] PS3 ps3av_set_video_mode() make id signed

2009-01-20 Thread Roel Kluin
? If not, is there more cleanup required? Can you please make these changes, too? Thx again! No problem. -8-8 Make id signed so a negative id will get noticed. Error out if ps3av_auto_videomode() fails. Signed-off-by: Roel Kluin roel.kl

[PATCH] therm_adt746x: signed/unsigned confusion

2009-01-18 Thread Roel Kluin
As suggested, this is used for signed rather than unsigned Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 82607ad..c0621d5 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh

[PATCH] PS3 ps3av_set_video_mode() make id signed

2009-01-17 Thread Roel Kluin
+763 static int ps3av_auto_videomode() ---^^^ +42 static struct ps3av { ... int ps3av_mode; ... }; -8---8--- make id signed so a negative id will get noticed Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/drivers/ps3

[PATCH] powerpc/mpc5121: fix NULL test

2009-01-04 Thread Roel Kluin
strcmp on NULL results in a segmentation fault, also, remove the second, redundant test on dev Signed-off-by: Roel Kluin roel.kl...@gmail.com --- Please verify whether this patch correct. diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index f416014

Re: [PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-16 Thread Roel Kluin
Olof Johansson wrote: On Sat, Dec 13, 2008 at 05:45:41PM +0100, Roel Kluin wrote: map_onedev can return NULL, so catch that. Also iounmap if DMA controller can't be found. + iob_regs = map_onedev(iob_pdev, 0); +if (iob_regs == NULL) { +BUG(); +printk

[PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-13 Thread Roel Kluin
map_onedev can return NULL, so catch that. Also iounmap if DMA controller can't be found. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- UNTESTED! I am a bit new, so please confirm whether this is correct. especially: * can we iounmap while init_lock is held? * is it ok to add another BUG

Re: [PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-13 Thread Roel Kluin
Roel Kluin wrote: map_onedev can return NULL, so catch that. Also iounmap if DMA controller can't be found. I think there may also be a problem with pasemi_mac_init_module(): if pci_register_driver() fails, then iob_regs won't get iounmapped. maybe something like the totally untested patch

[PATCH v2] hv{c,cs,si}_struct make *count signed

2008-12-02 Thread Roel Kluin
Otherwise count 0 will fail Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- This was not tested. Is this how it should be fixed? the locations where the failures occur are in the functions hv*_close, on: vi drivers/char/hvcs.c +1251 vi drivers/char/hvsi.c +911 vi drivers/char/drivers/char

powerpc: hv{cs, si}_close() both unsigned hp-count and hvcsd-open_count cannot be negative

2008-11-29 Thread roel kluin
unsigned hp-count and hvcsd-open_count cannot be negative Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- Both members of respectively struct hvcs_struct, see vi drivers/char/hvcs.c +262 and struct hvcs_struct, see vi drivers/char/hvsi.c +70 diff --git a/drivers/char/hvcs.c b/drivers/char

[PATCH] [POWERPC] smu_sat_get_sdb_partition() - unsigned len cannot be negative

2008-11-29 Thread roel kluin
i2c_smbus_read_word_data() returns a s32, which may be negative but unsigned len cannot be negative. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- for i2c_smbus_read_word_data(), see vi drivers/i2c/i2c-core.c +1663 diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh

[PATCH] powerpc: hvc_close() unsigned hp-count cannot be negative

2008-11-29 Thread roel kluin
unsigned hp-count cannot be negative Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- Similar to the previous patch but with lock. For hvc_struct, see vi drivers/char/hvc_console.h +47 diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 5b819b1..337f6c6 100644 --- a/drivers

Re: powerpc: hv{cs, si}_close() both unsigned hp-count and hvcsd-open_count cannot be negative

2008-11-29 Thread roel kluin
Andreas Schwab wrote: roel kluin [EMAIL PROTECTED] writes: -if (--hvcsd-open_count == 0) { +if (hvcsd-open_count == 1) { +hvcsd-open_count--; This is not the same. I think you're missing that I also decrement if (hvcsd-open_count 1) If not, please elaborate

[PATCH] [POWERPC] unsigned speed cannot be negative

2008-10-14 Thread roel kluin
unsigned speed cannot be negative Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- N.B. It could be possible that a different fix is needed. diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index cb01ebc..7b7da8c 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b

[PATCH] ibm_newemac: MAL[12]_IER_EVENTS definition: 2x *_OTE - *_DE

2008-08-30 Thread roel kluin
MAL[12]_IER_EVENTS definitions have MAL_IER_OTE twice but lack MAL_IER_DE Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- drivers/net/ibm_newemac/mal.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ibm_newemac/mal.h b/drivers/net/ibm_newemac/mal.h index

[PATCH v2] powerpc, scc: duplicate SCC_UHC_USBCEN

2008-08-19 Thread roel kluin
at once. Your patch does not contain 'Signed-off-by' line. Could you re-post it with your sign? Sorry for that and thanks for testing. --- duplicate SCC_UHC_USBCEN Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/cell/celleb_scc_uhc.c b/arch/powerpc/platforms

[alsa-devel] [PATCH v2] duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

2008-08-19 Thread roel kluin
Takashi Iwai wrote: At Tue, 19 Aug 2008 08:15:05 +0200 (CEST), Johannes Berg wrote: roel kluin wrote: untested, is it correct? not a clue, do you know how long ago that was? :) does the driver check endianness anywhere? AFAIK snd-aoa supports only bit-endian formats (at least in sound

[PATCH] powerpc, scc: duplicate SCC_UHC_USBCEN

2008-08-18 Thread roel kluin
untested, is it correct? --- arch/powerpc/platforms/cell/celleb_scc.h:224: #define SCC_UHC_USBEN 0x0001 #define SCC_UHC_USBCEN 0x0002 --- diff --git a/arch/powerpc/platforms/cell/celleb_scc_uhc.c b/arch/powerpc/platforms/cell/celleb_scc_uhc.c index d63b720..b086f33

[PATCH] duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

2008-08-18 Thread roel kluin
untested, is it correct? --- duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c index 7a16a33..c922505 100644 --- a/sound/aoa/codecs/snd-aoa-codec-tas.c +++ b/sound/aoa

Re: [GIT PULL] one kbuild fix for powerpc

2008-06-12 Thread roel kluin
2008/6/12 Sam Ravnborg [EMAIL PROTECTED]: diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 508c589..b763aba 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -467,6 +467,26 @@ static void parse_elf_finish(struct elf_info *info) release_file(info-hdr,

[PATCH] powerpc: mpic_pasemi_msi: failed allocation unnoticed

2008-04-23 Thread Roel Kluin
bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- The functions can be found respectively in: //---[ vi lib/bitmap.c +807 ]--- //---[ vi arch/powerpc/sysdev

[PATCH 2/2] powerpc: mpic_pasemi_msi: failed allocation unnoticed

2008-04-23 Thread Roel Kluin
A similar problem in arch/powerpc/sysdev/mpic_u3msi.c: --- bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- The functions can be found respectively in: //---[ vi

[PATCH 2/2] mpic_u3msi: mpic_u3msi: failed allocation unnoticed

2008-04-23 Thread Roel Kluin
A similar problem in arch/powerpc/sysdev/mpic_u3msi.c, sorry for the dup, fixed header. --- bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- The functions can

[PATCH] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

2008-04-23 Thread Roel Kluin
mpc83xx_spi-irq is unsigned, so the test fails Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index be15a62..033fd51 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -454,12 +454,12 @@ static int __init

[PATCH 1/2] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

2008-04-23 Thread Roel Kluin
mpc83xx_spi-irq is unsigned, so the test fails Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index be15a62..033fd51 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -454,12 +454,12 @@ static int __init

[PATCH 2/2 v2] mpic_u3msi: mpic_u3msi: failed allocation unnoticed

2008-04-23 Thread Roel Kluin
Segher Boessenkool wrote: bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned. list_for_each_entry(entry, pdev-msi_list, list) { hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1); -if (hwirq 0)

[PATCH 1/2 v2] powerpc: mpic_pasemi_msi: failed allocation unnoticed

2008-04-23 Thread Roel Kluin
also please add my signoff to [PATCH 2/2 v2] mpic_u3msi: mpic_u3msi: failed allocation unnoticed --- bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return signed, but hwirq is unsigned. A failed allocation remains unnoticed. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff

Re: [PATCH 2/2 v2] mpic_u3msi: mpic_u3msi: failed allocation unnoticed

2008-04-23 Thread Roel Kluin
Again thanks to Segher and Joe Perches --- bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return signed, but hwirq is unsigned. A failed allocation remains unnoticed. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc

[PATCH 1/1 resend][PPC] replace logical by bitand in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c

2008-04-07 Thread Roel Kluin
it (no hardware) please consider the patch below. -- replace logical by bit and for ISA_SPACE_MASK Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c index f0f49d1..406a9e6 100644 --- a/arch/powerpc/kernel/isa-bridge.c +++ b/arch

[PATCH 2/8] powerpc: replace `__attribute' by `__attribute__'

2008-04-01 Thread Roel Kluin
replace `__attribute' by `__attribute__' Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/iseries/main_store.h b/arch/powerpc/platforms/iseries/main_store.h index 1a7a3f5..976b23e 100644 --- a/arch/powerpc/platforms/iseries/main_store.h +++ b/arch/powerpc

Re: ADT746X: logical-bitwise confusion in set_max_duty_at_crit()

2008-03-10 Thread Roel Kluin
Benjamin Herrenschmidt wrote: On Mon, 2008-03-10 at 08:46 +0100, Colin Leroy wrote: On Mon, 10 Mar 2008 01:04:33 +0100, Roel Kluin wrote: logical-bitwise confusion Looks good to me, but I'm not really maintaining that anymore :-) I'm not sure who does, Cc:ing Benjamin as he'll probably know

Re: ADT746X: logical-bitwise confusion in set_max_duty_at_crit()

2008-03-10 Thread Roel Kluin
as an u8, so just declare it as that, or do proper overflow/underflow checking on it. The patch will need testing on hardware too, since it changes behaviour (it should be a bugfix, but who knows). Maybe someone can test this? --- logical-bitwise confusion Signed-off-by: Roel Kluin [EMAIL

Re: ADT746X: logical-bitwise confusion in set_max_duty_at_crit()

2008-03-10 Thread Roel Kluin
Andrew, I think you may want this patch instead of the other adt746x-logical-bitwise-confusion-in-set_max_duty_at_crit.patch It includes suggested changes by Segher Boessenkool and I think this version was tested by Darrick J. Wong --- logical-bitwise confusion Signed-off-by: Roel Kluin [EMAIL

Re: ADT746X: logical-bitwise confusion in set_max_duty_at_crit()

2008-03-10 Thread Roel Kluin
temp = simple_strtol(buf, NULL, 10); -temp = temp 0xFF; + +temp = simple_strtol(buf, NULL, 10) 0xFF; It still does this superfluous 0xff, which hides the lack of range checking. Sorry didn't quite grep that --- logical-bitwise confusion Signed-off-by: Roel Kluin [EMAIL PROTECTED

[PATCH] PPC: in celleb_show_cpuinfo() convert strncpy(x, y, sizeof(x)) to strlcpy

2008-03-06 Thread Roel Kluin
This patch was not yet tested. Please confirm it's right. --- strncpy does not append '\0' if the length of the source string equals the size parameter, strlcpy does. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms

Re: [PATCH] PPC: in celleb_show_cpuinfo() convert strncpy(x, y, sizeof(x)) to strlcpy

2008-03-06 Thread Roel Kluin
Roel Kluin wrote: This patch was not yet tested. Please confirm it's right. was too quick with the send button. the batch below is probably better --- strncpy does not append '\0' if the length of the source string equals the size parameter, strlcpy does. Signed-off-by: Roel Kluin [EMAIL

Re: [PATCH 1/3] Fix Unlikely(x) == y

2008-02-18 Thread Roel Kluin
David Howells wrote: Geert Uytterhoeven [EMAIL PROTECTED] wrote: Hence shouldn't we ask the gcc people what's the purpose of __builtin_expect(), if it doesn't live up to its promise? __builtin_expect() is useful on FRV where you _have_ to give each branch and conditional branch

[PATCH 1/3] Fix Unlikely(x) == y

2008-02-16 Thread Roel Kluin
The patch below was not yet tested. If it's correct as it is, please comment. --- Fix Unlikely(x) == y Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 3a6db04..a14e5cd 100644 --- a/arch/powerpc

[PATCH][drivers/net/fec_mpc52xx.c] duplicate NETIF_MSG_IFDOWN in MPC52xx_MESSAGES_DEFAULT

2008-01-30 Thread Roel Kluin
Untested patch below, please confirm it's the right fix. -- duplicate NETIF_MSG_IFDOWN, 2nd should be NETIF_MSG_IFUP Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index f91ee70..ca3c3b3 100644 --- a/drivers/net/fec_mpc52xx.c

Re: [PATCH][ppc] logical/bitand typo in powerpc/boot/4xx.c

2008-01-29 Thread Roel Kluin
On Wed, 2008-01-23 at 23:37 +0100, Roel Kluin wrote: - if (val 0x1) + if (val 0x1) Joe Perches wrote: I think this pattern should be added to checkpatch + if ($line =~ /\\\s*0[xX]/) { On Thu, Jan 24, 2008 at 01:18:48AM +0100, Roel Kluin wrote: I agree

[PATCH 1/1][PPC] Test value, not 1 in print_insn_spu(), arch/powerpc/xmon/spu-dis.c

2008-01-28 Thread Roel Kluin
untested, please confirm: The '|| 1' does nothing, should this be corrected like my patch does? -- Test value, not 1. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/xmon/spu-dis.c b/arch/powerpc/xmon/spu-dis.c index e5f8983..74d45fb 100644 --- a/arch/powerpc/xmon/spu

[PATCH][ppc] logical/bitand typo in powerpc/boot/4xx.c

2008-01-23 Thread Roel Kluin
logical/bitand typo Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c index ebf9e21..dcfb459 100644 --- a/arch/powerpc/boot/4xx.c +++ b/arch/powerpc/boot/4xx.c @@ -104,7 +104,7 @@ void ibm4xx_denali_fixup_memsize(void) val

Re: [PATCH] balance ioremap/iounmap in {sycamore, walnut}_setup_arch()

2007-11-09 Thread Roel Kluin
Valentine Barshak wrote: Roel Kluin wrote: I guess it should be done after the last usage of kb_data or fpga_status? I think no iounmap(kb_data) needed. Looks like the pointer kn_cs (kb_cs = kb_data + 1) is used by the serio driver (drivers/input/serio/i8042-ppcio.h). Please note that we

[PATCH] balance ioremap/iounmap in {sycamore, walnut}_setup_arch()

2007-11-08 Thread Roel Kluin
I guess it should be done after the last usage of kb_data or fpga_status? -- Balance ioremap/iounmap Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index 8689f3e..4f3bac1 100644 --- a/arch/ppc/platforms/4xx

[PATCH] mpc8xx_pic_init(); arch/powerpc/sysdev/mpc8xx_pic.c

2007-11-07 Thread Roel Kluin
Again: untested -- iounmap siu_reg on error Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index 7aa4ff5..1a51251 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c @@ -177,14

[PATCH] another ioremap/iounmap issue in sycamore_setup_arch(); arch/ppc/platforms/4xx/sycamore.c

2007-11-07 Thread Roel Kluin
not yet tested -- iounmap kb_data on error Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index 8689f3e..c4ac63d 100644 --- a/arch/ppc/platforms/4xx/sycamore.c +++ b/arch/ppc/platforms/4xx/sycamore.c @@ -99,22

[PATCH] very similar, now in walnut_setup_arch(); arch/ppc/platforms/4xx/walnut.c

2007-11-07 Thread Roel Kluin
iounmap kb_data on error Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c index 2f97723..04d3f3f 100644 --- a/arch/ppc/platforms/4xx/walnut.c +++ b/arch/ppc/platforms/4xx/walnut.c @@ -81,22 +81,23 @@ walnut_setup_arch

[PATCH] ioremap/iounmap issue in yucca_setup_pcie_fpga_rootpoint(); arch/ppc/platforms/4xx/yucca.c

2007-11-07 Thread Roel Kluin
iounmap pcie_reg_fpga_base in default case Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index a83b0ba..66a44ff 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c @@ -211,6 +211,7

[PATCH] Balance alloc/free and ioremap/iounmap in gpio_mdio_probe (powerpc/platforms/pasemi/gpio_mdio.c)

2007-11-04 Thread Roel Kluin
I think this is how it should be done, but please review: it was not tested. -- Balance alloc/free and ioremap/iounmap Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index dae9f65..f250ba4 100644

Re: [PATCH] Balance alloc/free and ioremap/iounmap in gpio_mdio_probe (powerpc/platforms/pasemi/gpio_mdio.c)

2007-11-04 Thread Roel Kluin
of the allocation of new_bus-irq was missing as well. This patch creates a new function __gpio_mdio_register_bus to allow the iounmapping after an ioremap. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c

Re: [PATCH] Balance alloc/free and ioremap/iounmap in gpio_mdio_probe (powerpc/platforms/pasemi/gpio_mdio.c)

2007-11-04 Thread Roel Kluin
Olof Johansson wrote: On Sun, Nov 04, 2007 at 05:53:40PM +0100, Roel Kluin wrote: I think this is how it should be done, but please review: it was not tested. Hi, Thanks for the bug report. The mdio driver needs a set of other cleanups as well. I have a more comprehensive patch that I'll

[PATCH] allocation fix in ppc/platforms/4xx/luan.c

2007-10-27 Thread Roel Kluin
Don't allocate hose2 when when hose1 can't be allocated and free hose1 when hose2 can't be allocated. Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 4b16961..b79ebb8 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b

[PATCH] Free when ioremap fails in powerpc/platforms/52xx/mpc52xx_pci.c

2007-10-27 Thread Roel Kluin
Free hose when ioremap fails Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c index 4c6c82a..50f9655 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c +++ b/arch/powerpc/platforms/52xx