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
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
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
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
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
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
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/
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
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
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/
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
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
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
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
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
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
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
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
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
>> 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
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
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
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
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
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)
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
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
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/
>>> 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 =
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
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
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
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
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
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
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
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
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/
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
@@ -
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
@@
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
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
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
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
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
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
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:
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&
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
-
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
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
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
++
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
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/
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:
//-
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
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
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
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
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
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
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
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
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
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]>
--
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
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
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
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/
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
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
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
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
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
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
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);
>> +
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
}
...
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
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
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
80 matches
Mail list logo