[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 --- 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.c b/drivers

[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 --- Found with sed: http://kernelnewbies.org/roelkluin Please review. diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c

[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 --- 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/kernel/vio.c

Re: linux-next: tree build failure

2009-09-29 Thread roel kluin
On Tue, Sep 29, 2009 at 11:28 AM, Jan Beulich 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 */ >>-    BUILD_BUG_ON(__builtin_con

[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 --- 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/arch/powerpc

[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 --- 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/powerpc/mm/hash_uti

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 --- >>> 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/

[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 --- 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 +++ b

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 maili

[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 --- Please review. especially note that I removed a kfree(dev->sbd.core.driver_data); Is that correct? arch/powerpc/include/

[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 --- diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index fbf5c93..586965f 100644 --- a/sound/aoa/fabrics

[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 --- 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 +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 Acked-by: Stephen Rothwell --- diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index ffc9254..042c814 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -867,7 +867,7

[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 --- 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 --- 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 kvmppc_emul_tl

[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 --- 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..35000cf 1006

[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 --- 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 --- a

[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 --- To test this: #include #include char a[10]; char b[10]; int main() { const char* str = "0123456789012"; strncpy(a, str, sizeof(a)); strncpy(b, str, siz

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 --- 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/celleb_setup.c +++ b

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 Linu

[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 --- 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/arch/powe

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

2009-07-30 Thread Roel Kluin
Missing tests after ioremap() Signed-off-by: Roel Kluin --- 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/feature.c +++ b

[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 --- 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/fsl_booke_mmu.c @@ -16

[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 --- 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 @@ -294,10 +294,11

[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)

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

2008-01-23 Thread Roel Kluin
Joe Perches wrote: > On Wed, 2008-01-23 at 23:37 +0100, Roel Kluin wrote: >> 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

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

2008-01-28 Thread Roel Kluin
if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) shouldn't these be a single &? then consider the untested patch below. -- replace logical "&&" by bit "&" for ISA_SPACE_MASK Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git

[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/

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 =

[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/fe

[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/a

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] 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

[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/platform

[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..f

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

2007-11-04 Thread Roel Kluin
ng succes 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

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 h

inbalanced ioremap/iounmap? in cpm_pic_init(); arch/powerpc/sysdev/commproc.c

2007-11-07 Thread Roel Kluin
It appears to me that ioremap/iounmap in cpm_pic_init() is imbalanced. I am not certain about this, nor was the patch tested. please review. -- fix ioremap/iounmap imbalance Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/

[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 @@ -

[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 @@

[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_setu

[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

[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/platfor

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-pp

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

[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/a

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:

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&

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

2008-03-10 Thread Roel Kluin
oo, 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 PROTECTED]> --- diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c index 9587869..2a2de73 100644 -

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 K

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

2008-03-10 Thread Roel Kluin
of > range checking. Sorry didn't quite grep that --- logical-bitwise & confusion Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c index 9587869..98937d3 100644 --- a/drivers/hwmon/adt

[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 ++

[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
e &'s, I can't test 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 100

[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/

[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: //-

[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

[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 @@ s

[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 @@ s

[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

[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 PROTEC

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/p

[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 1006

[PATCH] POWERPC: duplicate test of MACIO_FLAG_SCCB_ON

2008-08-18 Thread roel kluin
untested, is it correct? arch/powerpc/include/asm/pmac_feature.h:359: #define MACIO_FLAG_SCCA_ON 0x0001 #define MACIO_FLAG_SCCB_ON 0x0002 --- duplicate test of MACIO_FLAG_SCCB_ON Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/platforms/powermac/featur

[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/sou

[PATCH v2] powerpc, scc: duplicate SCC_UHC_USBCEN

2008-08-19 Thread roel kluin
the SCC-UHC > sets SCC_UHC_USBEN and SCC_UHC_USBCEN 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]> --

[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 sup

[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

[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_1

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/

[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/mac

[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 100

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 d

[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/dri

[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 --- 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() here? diff

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 t

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); >> +

[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 --- Please verify whether this patch correct. diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index f416014..1bcff94 100644 --- a/arch

[PATCH] PS3 ps3av_set_video_mode() make id signed

2009-01-17 Thread Roel Kluin
} ... ps3av->ps3av_mode = id; vi drivers/ps3/ps3av.c +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 Signe

[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 --- 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/therm_adt746x.c @@ -498,8

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

2009-01-20 Thread Roel Kluin
ed to ps3av->ps3av_mode? 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_vid