Re: [PATCH 13/13] drivers/media/tuners/e4000.c: use macros for i2c_msg initialization

2012-10-07 Thread walter harms
Am 07.10.2012 17:38, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Introduce use of I2c_MSG_READ/WRITE/OP, for readability. In the second i2c_msg structure, a length expressed as an explicit constant is also re-expressed as the size of the buffer, reg. A simplified

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread walter harms
Am 07.10.2012 17:38, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Introduce use of I2c_MSG_READ/WRITE/OP, for readability. A length expressed as an explicit constant is also re-expressed as the size of the buffer in each case. A simplified version of the semantic

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread walter harms
Am 07.10.2012 18:50, schrieb Julia Lawall: On Sun, 7 Oct 2012, walter harms wrote: Am 07.10.2012 17:38, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Introduce use of I2c_MSG_READ/WRITE/OP, for readability. A length expressed as an explicit constant is also re

Re: [PATCH 13/13] drivers/media/tuners/e4000.c: use macros for i2c_msg initialization

2012-10-07 Thread walter harms
Am 07.10.2012 18:44, schrieb Julia Lawall: On Sun, 7 Oct 2012, walter harms wrote: Am 07.10.2012 17:38, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Introduce use of I2c_MSG_READ/WRITE/OP, for readability. In the second i2c_msg structure, a length expressed

Re: [PATCH 10/16] drivers/net/ethernet/ibm/emac/mal.c: use WARN

2012-11-03 Thread walter harms
Am 03.11.2012 11:58, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // smpl @@

Re: [PATCH 11/16] drivers/misc/kgdbts.c: use WARN

2012-11-03 Thread walter harms
Am 03.11.2012 11:58, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // smpl @@

Re: [PATCH 10/16] drivers/net/ethernet/ibm/emac/mal.c: use WARN

2012-11-03 Thread walter harms
Am 03.11.2012 15:14, schrieb Julia Lawall: On Sat, 3 Nov 2012, walter harms wrote: Am 03.11.2012 11:58, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch

Re: crash with 2.6.22.1 crash:ll_rw_blk.c blk_remove_plug()

2007-07-22 Thread walter harms
hello all, on my asus notebook tm620 there is a crash with 2.6.22 and 2.6.21 Using IPI Shortcut mode WARNING: at block/ll_rw_blk.c:1575 blk_remove_plug() [c01ac87e] blk_remove_plug+0x36/0x5a [c01ac8b6] __generic_unplug_device+0x14/0x1f [c01ad587] __make_request+0x39b/0x49c [c01abc8c]

Re: crash with 2.6.22.1 crash:ll_rw_blk.c blk_remove_plug()

2007-07-23 Thread walter harms
Satyam Sharma wrote: Hi Walter, Thanks for reporting this. On 7/22/07, walter harms [EMAIL PROTECTED] wrote: hello all, on my asus notebook tm620 there is a crash with 2.6.22 and 2.6.21 Did this happen when you were resuming from a suspend-to-ram/disk? [ I ask because I see swsusp

Re: crash with 2.6.22.1 crash:ll_rw_blk.c blk_remove_plug()

2007-07-25 Thread walter harms
Satyam Sharma wrote: On 7/23/07, Jens Axboe [EMAIL PROTECTED] wrote: On Sun, Jul 22 2007, Satyam Sharma wrote: Hi Walter, Thanks for reporting this. On 7/22/07, walter harms [EMAIL PROTECTED] wrote: hello all, on my asus notebook tm620 there is a crash with 2.6.22 and 2.6.21

Re: crash with 2.6.22.1 crash:ll_rw_blk.c blk_remove_plug()

2007-07-25 Thread walter harms
Jens Axboe wrote: On Wed, Jul 25 2007, Satyam Sharma wrote: On 7/23/07, Jens Axboe [EMAIL PROTECTED] wrote: On Sun, Jul 22 2007, Satyam Sharma wrote: Hi Walter, Thanks for reporting this. On 7/22/07, walter harms [EMAIL PROTECTED] wrote: hello all, on my asus notebook tm620

Re: crash with 2.6.22.1 crash:ll_rw_blk.c blk_remove_plug()

2007-07-26 Thread walter harms
Jens Axboe wrote: On Wed, Jul 25 2007, Satyam Sharma wrote: On 7/23/07, Jens Axboe [EMAIL PROTECTED] wrote: On Sun, Jul 22 2007, Satyam Sharma wrote: Hi Walter, Thanks for reporting this. On 7/22/07, walter harms [EMAIL PROTECTED] wrote: hello all, on my asus notebook tm620

Re: Ideas on column length in kernel problem?

2007-08-23 Thread walter harms
Paolo Ornati wrote: On Wed, 22 Aug 2007 23:54:41 -0400 Scott Thompson [EMAIL PROTECTED] wrote: if anyone knows of a free/inexpensive mail client that will be able to handle the wordwrap requirements for the current state of the linux tree please advise. http://www.claws-mail.org/

Re: crash with 2.6.22.1 crash:ll_rw_blk.c blk_remove_plug()

2007-07-29 Thread walter harms
On 7/22/07, walter harms [EMAIL PROTECTED] wrote: hello all, on my asus notebook tm620 there is a crash with 2.6.22 and 2.6.21 Did this happen when you were resuming from a suspend-to-ram/disk? [ I ask because I see swsusp in the trace below, linux-pm added to Cc: ] Using IPI Shortcut

Re: [patch] gru: info leak in gru_get_config_info()

2013-04-21 Thread walter harms
Am 21.04.2013 13:10, schrieb Dan Carpenter: The info.fill array isn't initialized so it can leak uninitialized stack information to user space. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index

Re: [patch v2] x86, UV: integer wrap bug in uv_hub_ipi_value()

2012-12-02 Thread walter harms
Am 02.12.2012 11:44, schrieb Dan Carpenter: This is a static checker fix. The problem is that we store the bits from uv_apicid_hibits into apicid (the high 16 bits) but then we shift it 16 bit to the left. apicid is an int so it wraps and we lose them. Signed-off-by: Dan Carpenter

Re: [PATCH] staging: rtl8712: avoid a useless call to memset().

2012-12-05 Thread walter harms
Hi Cyril, you patch is correct ..but being an advocate of defensive programming i would say the original version especially since the number of bytes is small. re, wh Am 05.12.2012 02:22, schrieb Cyril Roelandt: In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that

Re: coccinelle and bitmask arithmetic

2013-01-30 Thread walter harms
Am 29.01.2013 19:03, schrieb Joe Perches: On Tue, 2013-01-29 at 18:49 +0100, Julia Lawall wrote: How about the following (from today's linux-next). They appear to be trying to do the same calculation, once with + and once with |. (cc'ing the original developer and Russell King) Likely

Re: [patch] TTY: synclink, small cleanup in dtr_rts()

2013-01-28 Thread walter harms
Am 27.01.2013 22:00, schrieb Joe Perches: On Sun, 2013-01-27 at 23:19 +0300, Dan Carpenter wrote: On Sun, Jan 27, 2013 at 12:04:38PM -0800, Joe Perches wrote: Wouldn't it be clearer still to use | instead of + Yeah. I think it would be, but adding bitflags together instead of doing bitwise

Re: [PATCH] ethernet: neterion: vxge: vxge-traffic.c: fix for a potential NULL pointer dereference

2013-02-17 Thread walter harms
Am 16.02.2013 18:56, schrieb Kumar Amit Mehta: fix for a potential NULL pointer dereference and removal of a redundant assignment operation. Found using smatch. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/net/ethernet/neterion/vxge/vxge-traffic.c |8 ++-- 1

Re: [PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack

2013-02-22 Thread walter harms
Am 22.02.2013 19:07, schrieb Kumar Amit Mehta: fix for instances of DMA buffer on stack(being passed to usb_control_msg) for the USB-DUXfast Board driver. Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/usbduxfast.c | 30

Re: [PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack

2013-02-23 Thread walter harms
Am 22.02.2013 20:06, schrieb Greg KH: On Fri, Feb 22, 2013 at 07:58:35PM +0100, walter harms wrote: Am 22.02.2013 19:07, schrieb Kumar Amit Mehta: fix for instances of DMA buffer on stack(being passed to usb_control_msg) for the USB-DUXfast Board driver. Signed-off-by: Kumar Amit Mehta

Re: [PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack

2013-02-23 Thread walter harms
Am 23.02.2013 18:34, schrieb Dan Carpenter: On Sat, Feb 23, 2013 at 04:59:43PM +0100, walter harms wrote: or is it possible to pass one byte in a register ? (aka char/int) without allocating ? Nope, the USB host controllers must be able to DMA to this memory location, so you have

Re: [PATCH] ../linux-next/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c: fix error return code

2012-09-07 Thread walter harms
Am 07.09.2012 15:38, schrieb Peter Senna Tschudin: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows:

Re: [PATCH v2] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c: fix error return code

2012-09-09 Thread walter harms
looks ok to me, note: i do not have the hardware Reviewed-by: walter harms wha...@bfs.de Am 08.09.2012 16:01, schrieb Peter Senna Tschudin: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function

Re: [PATCH 1/9] drivers/block/aoe/aoecmd.c: Remove useless kfree

2012-09-13 Thread walter harms
Am 12.09.2012 17:06, schrieb Peter Senna Tschudin: From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position

Re: [PATCH 5/9] drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree

2012-09-13 Thread walter harms
Am 12.09.2012 17:06, schrieb Peter Senna Tschudin: From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position

Re: [PATCH v2 5/9] drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree

2012-09-14 Thread walter harms
Am 14.09.2012 10:15, schrieb Peter Senna Tschudin: From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position

Re: [PATCH v3 5/9] drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree

2012-09-15 Thread walter harms
it looks ok to me Reviewed-by: walter harms wha...@bfs.de Am 14.09.2012 17:13, schrieb Peter Senna Tschudin: From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http

Re: [PATCH] netfilter: PTR_RET can be used

2012-07-29 Thread walter harms
Am 29.07.2012 02:45, schrieb Fengguang Wu: This quiets the coccinelle warnings: net/bridge/netfilter/ebtable_filter.c:107:1-3: WARNING: PTR_RET can be used net/bridge/netfilter/ebtable_nat.c:107:1-3: WARNING: PTR_RET can be used net/ipv6/netfilter/ip6table_filter.c:65:1-3: WARNING: PTR_RET

Re: [patch] da9052-battery: don't free IRQ that wasn't requested

2012-09-05 Thread walter harms
Am 05.09.2012 14:34, schrieb Dan Carpenter: We should decrement i before doing the free_irq(). If we call this because request_threaded_irq() failed then we don't want to free the thing which failed. Or in the case where we get here because power_supply_register() failed then the original

Re: [PATCH] UVC: use GFP_ATOMIC under spin lock.

2012-11-22 Thread walter harms
Am 19.11.2012 22:34, schrieb Cyril Roelandt: Found using the following semantic patch: spml @@ @@ spin_lock_irqsave(...); ... when != spin_unlock_irqrestore(...); * GFP_KERNEL /spml Signed-off-by: Cyril Roelandt tipec...@gmail.com --- drivers/usb/gadget/uvc_video.c |2 +- 1

crash with 2.6.21 BUG:ll_rw_blk.c

2007-07-18 Thread walter harms
hi list, i managed to crash 2.6.21 at boottime with IPI Shortcut mode BUG: atblock/ll_rw_blc.c 1566 blk_remove_plug() system: acer Notebook TM620 does anyone care or is 2.6.21 already done ? re, wh - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a

Re: [PATCH] trivial: adjust code alignment

2013-08-05 Thread walter harms
Hello Julia, IMHO keep the patch as it is. It does not change any code that is good. Suspicious code that comes up here can be addressed in a separate patch. just my 2 cents, re, wh Am 05.08.2013 18:19, schrieb Julia Lawall: On Mon, 5 Aug 2013, Dan Carpenter wrote: On Mon, Aug 05, 2013 at

Re: [PATCH 5/6] regulator: ti-abb: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread walter harms
Am 19.08.2013 10:51, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change

Re: [PATCH 5/6] regulator: ti-abb: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread walter harms
Am 19.08.2013 12:12, schrieb Julia Lawall: On Mon, 19 Aug 2013, walter harms wrote: Am 19.08.2013 10:51, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed

Re: [PATCH] tty: replace mutex_lock() with tty_write_lock()

2013-11-22 Thread walter harms
Am 21.11.2013 20:12, schrieb Andreas Platschek: Use tty_write_lock()/tty_write_unlock() consistently. This takes care of the following sparse warning: drivers/tty/tty_io.c:1169:17: warning: context imbalance in 'tty_write_message' - unexpected unlock Signed-off-by: Andreas Platschek

[PATCH] new Page: isalpha__3(3)

2014-03-04 Thread walter harms
Hi List, The ctype macros like isalpha(3) have a locale specific counterpart. This page was missing. re, wh Signed-off-by: wha...@bfs.de wha...@bfs.de .\ Copyright (c) 2013 by Walter Harms .\ .\ %%%LICENSE_START(VERBATIM) .\ Permission is granted to make and distribute verbatim copies

Re: My Kernel bug is celebrating 2 years. Can you help me fix it?

2014-03-05 Thread walter harms
Am 04.03.2014 22:26, schrieb Peter Senna Tschudin: I have reported a bug more than two years ago and it is still affecting me. The bug report gives some information: https://bugzilla.redhat.com/show_bug.cgi?id=787299 I have tried basic debug instructions from:

Re: [patch] ceph: tidy ceph_mdsmap_decode() a little

2013-05-29 Thread walter harms
Am 29.05.2013 08:22, schrieb Dan Carpenter: I introduced a new temporary variable info instead of m-m_info[mds]. Also I reversed the if condition and pulled everything in one indent level. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- This goes on top of Emil Goode's patch.

Re: [PATCH 2/5] staging: lustre: lnet: socklnd: Clean up memset(...)

2014-05-20 Thread walter harms
Am 18.05.2014 19:27, schrieb Joe Perches: On Sun, 2014-05-18 at 18:19 +0100, Masaru Nomura wrote: Remove prohibited space and fix line over 80 characters of memset(...) to meet kernel coding style. [] diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c

Re: [PATCH 1/8] staging: r8712u: Remove useless return variables

2014-05-20 Thread walter harms
Am 20.05.2014 12:33, schrieb Peter Senna Tschudin: This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that

Re: [PATCH 3/8] drivers/staging: Remove useless return variables

2014-05-20 Thread walter harms
Am 20.05.2014 12:33, schrieb Peter Senna Tschudin: This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that

Re: [PATCH 8/8] staging: vt6655: Remove useless return variables

2014-05-20 Thread walter harms
Am 20.05.2014 12:33, schrieb Peter Senna Tschudin: This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that

Re: [PATCH 1/8] staging: r8712u: Remove useless return variables

2014-05-20 Thread walter harms
Am 20.05.2014 13:41, schrieb Dan Carpenter: Those concerns are valid but the code was like that in the original so we should merge this patch as is and hope some volunteer will fix things up in a follow on patch. Fixing them in this patch would be a mistake anyway because of the one thing

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread walter harms
Am 16.05.2014 11:54, schrieb Emil Goode: If we fail to allocate struct platform_device pdev we dereference it after the goto label err. I have rearranged the error handling a bit to fix the issue and also make it more clear. Signed-off-by: Emil Goode emilgo...@gmail.com --- v2:

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread walter harms
Am 16.05.2014 13:16, schrieb Emil Goode: Hello Walter, On Fri, May 16, 2014 at 12:40:19PM +0200, walter harms wrote: Am 16.05.2014 11:54, schrieb Emil Goode: If we fail to allocate struct platform_device pdev we dereference it after the goto label err. I have rearranged the error

Re: [PATCH 1/13] libertas: make return of 0 explicit

2014-05-19 Thread walter harms
Am 19.05.2014 06:31, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Delete unnecessary local variable whose value is always 0 and that hides the fact that the result is always 0. A simplified version of the semantic patch that fixes this problem is as follows:

Re: [PATCH 4/13] wimax/i2400m: make return of 0 explicit

2014-05-19 Thread walter harms
Am 19.05.2014 06:31, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Delete unnecessary local variable whose value is always 0 and that hides the fact that the result is always 0. A simplified version of the semantic patch that fixes this problem is as follows:

Re: [PATCH 4/13] wimax/i2400m: make return of 0 explicit

2014-05-19 Thread walter harms
Am 19.05.2014 13:30, schrieb Julia Lawall: On Mon, 19 May 2014, walter harms wrote: Am 19.05.2014 06:31, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Delete unnecessary local variable whose value is always 0 and that hides the fact that the result is always 0

Re: [PATCH 2/11] cw1200: Remove useless return variables

2014-05-31 Thread walter harms
Am 31.05.2014 15:14, schrieb Peter Senna Tschudin: This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that

Re: [PATCH 4/11] via-ircc: Remove useless return variables

2014-06-01 Thread walter harms
Am 31.05.2014 22:36, schrieb Dan Carpenter: On Sat, May 31, 2014 at 10:14:04AM -0300, Peter Senna Tschudin wrote: This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable.

Re: [PATCH 3/18] VMCI: Use kmemdup instead of kmalloc + memcpy

2014-05-26 Thread walter harms
Am 26.05.2014 17:21, schrieb Benoit Taine: This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/memdup.cocci Signed-off-by: Benoit Taine benoit.ta...@lip6.fr --- Tested by compilation without errors. drivers/misc/vmw_vmci/vmci_datagram.c |3 +--

Re: [PATCH] perf/x86/uncore: Remove unnecessary assignment to box in uncore_pci_remove(...)

2014-05-28 Thread walter harms
Am 28.05.2014 11:11, schrieb Giedrius Rekasius: Local variable box gets assigned correct value when it is initialized. There is no need to assign the same value again. Signed-off-by: Giedrius Rekasius giedrius.rekas...@gmail.com --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 1 - 1

Re: [PATCH] arch/arm/mach-pxa/stargate2.c: use ARRAY_AND_SIZE consistently

2013-08-10 Thread walter harms
Am 10.08.2013 17:32, schrieb Joe Perches: On Sat, 2013-08-10 at 17:25 +0200, Julia Lawall wrote: From: Julia Lawall julia.law...@lip6.fr Because ARRAY_AND_SIZE changes the apparent arity of a function, if it is used for one call to a given function, it would be better, if possible, to use

Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread walter harms
Hello Kumar, i will try to resolve the riddle ... doing something like fn(a,b,c,0) is a bad habit. 0 is called a magic number because noone reading the code has an idea why it is there. Using the name IRQF_TRIGGER_NONE good. Having a named bit like IRQ_TRIGGER|IRQ_NMI is most times also a good

Re: [PATCH] arch/arm/mach-pxa/stargate2.c: use ARRAY_AND_SIZE consistently

2013-08-11 Thread walter harms
Am 11.08.2013 07:48, schrieb Julia Lawall: On Sun, 11 Aug 2013, Dan Carpenter wrote: ARRAY_AND_SIZE() macro is horrible, and I would like it if it were removed. What I meant before was just that probably people will probably complain if we try to remove it. Well, I could either wait

Re: [patch 2/2 v2] staging: lustre: integer overflow in obd_ioctl_is_invalid()

2014-04-28 Thread walter harms
. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: Updated the error messages as Walter Harms pointed out. diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index bdc9812..3c26bbd 100644 --- a/drivers/staging

Re: [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue

2014-04-04 Thread walter harms
Am 04.04.2014 12:05, schrieb Kumar Amit Mehta: Fixed a coding style issue. Reported by checkpatch.pl Signed-off-by: Kumar Amit Mehta gmate.a...@gmail.com --- drivers/staging/comedi/drivers/pcl812.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 4/5] kernel/debug/kdb/kdb_bp.c: drop negativity check on unsigned value

2014-07-18 Thread walter harms
Am 18.07.2014 17:34, schrieb Andrey Utkin: Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80591 Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com --- kernel/debug/kdb/kdb_bp.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator

2014-08-05 Thread walter harms
Am 04.08.2014 22:47, schrieb Andrey Utkin: This commit is a guesswork, but it seems to make sense to drop this break, as otherwise the following line is never executed and becomes dead code. And that following line actually saves the result of local calculation by the pointer given in

Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator

2014-08-06 Thread walter harms
Am 05.08.2014 21:49, schrieb David Miller: From: walter harms wha...@bfs.de Date: Tue, 05 Aug 2014 09:11:52 +0200 Am 04.08.2014 22:47, schrieb Andrey Utkin: This commit is a guesswork, but it seems to make sense to drop this break, as otherwise the following line is never executed

Re: [PATCH 1/1] dpt_i2o: delete unnecessary null test on array

2014-08-08 Thread walter harms
Am 06.08.2014 12:39, schrieb Julia Lawall: From: Julia Lawall julia.law...@lip6.fr Delete NULL test on array (always false). A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r@ type T; T [] e; position p; @@

Re: [patch] VMCI: integer overflow in vmci_datagram_dispatch()

2014-08-29 Thread walter harms
Am 29.08.2014 10:42, schrieb Dan Carpenter: This is untrusted user data from vmci_host_do_send_datagram() so the VMCI_DG_SIZE() macro can have an integer overflow. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/misc/vmw_vmci/vmci_datagram.c

Re: [PATCH 1/1] PM-wakeup: Deletion of an unnecessary check before the function call wakeup_source_unregister

2014-11-19 Thread walter harms
Am 19.11.2014 13:09, schrieb Dan Carpenter: On Wed, Nov 19, 2014 at 12:26:45PM +0100, SF Markus Elfring wrote: --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -267,8 +267,7 @@ int device_wakeup_disable(struct device *dev) return -EINVAL; ws =

Re: [PATCH 1/1] PM-wakeup: Deletion of an unnecessary check before the function call wakeup_source_unregister

2014-11-19 Thread walter harms
Am 19.11.2014 14:05, schrieb Dan Carpenter: On Wed, Nov 19, 2014 at 01:54:49PM +0100, walter harms wrote: device_wakeup_detach returns dev-power.wakeup what is never NULL in this case. (not visible here but a few line before exactly this is checked) Huh? I don't see a NULL check. I

Re: Determination for the number of named function parameters (with SmPL)

2014-12-01 Thread walter harms
Am 01.12.2014 12:12, schrieb SF Markus Elfring: Hello, Would you like to know how many named function parameters are used in the source files? How do you think about to try the following semantic query approach out a bit more? @initialize:python@ @@ import sys import sqlite3 as

Re: [PATCH 19/20] staging: lustre: ptlrpc: sec_plain: remove unneeded null test before free

2015-05-02 Thread walter harms
Am 01.05.2015 21:37, schrieb Julia Lawall: Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // /smpl Signed-off-by: Julia

Re: [PATCH 8/11] staging: lustre: obdclass: Use kzalloc and kfree

2015-05-01 Thread walter harms
hi Julia, your patch seems fine. I tried to understand the code and it seems that much of it can be simplified by using already available functions. I have added some comments but i am not sure what to make of it. re, wh Am 01.05.2015 17:51, schrieb Julia Lawall: From: Julia Lawall

Re: [PATCH v3 08/18] baycom_epp: Replace rdtscl() with native_read_tsc()

2015-06-20 Thread walter harms
Acked-by: walter harms wha...@bfs.de Am 17.06.2015 02:35, schrieb Andy Lutomirski: This is only used if BAYCOM_DEBUG is defined. Cc: walter harms wha...@bfs.de Cc: Ralf Baechle r...@linux-mips.org Cc: Thomas Sailer t.sai...@alumni.ethz.ch Cc: linux-h...@vger.kernel.org Signed-off-by: Andy

Re: [PATCH] s390/process: Delete an unnecessary check before the function call kfree

2015-06-25 Thread walter harms
Am 24.06.2015 22:48, schrieb SF Markus Elfring: From: Markus Elfring elfr...@users.sourceforge.net Date: Wed, 24 Jun 2015 22:40:30 +0200 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was

Re: [PATCH 09/12] staging: lustre: obdclass: Use !x to check for kzalloc failure

2015-06-21 Thread walter harms
Am 20.06.2015 18:59, schrieb Julia Lawall: !x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression x; statement S1, S2; @@ x = kzalloc(...); if ( - x == NULL + !x ) S1

Re: [PATCH v2] ALSA: aoa: convert bus code to use dev_groups

2015-06-11 Thread walter harms
Am 11.06.2015 10:03, schrieb Quentin Lambert: The dev_attrs field of struct bus_type is going away, use dev_groups instead. This converts the soundbus code to use the correct field. Given that all other usages of the macro define the struct attribute *xxx_attrs[] in the same file they

Re: [PATCH v2 08/17] baycom_epp: Replace rdtscl() with native_read_tsc()

2015-06-13 Thread walter harms
Hello, please add a line what is the difference between V1 and V2. re, wh Am 13.06.2015 01:44, schrieb Andy Lutomirski: This is only used if BAYCOM_DEBUG is defined. Cc: Thomas Sailer t.sai...@alumni.ethz.ch Cc: linux-h...@vger.kernel.org Signed-off-by: Andy Lutomirski l...@kernel.org

Re: [PATCH v2] aic7xxx: replace kmalloc/strcpy by kstrdup

2015-07-14 Thread walter harms
Am 14.07.2015 12:07, schrieb Hannes Reinecke: On 07/14/2015 12:02 PM, Christophe JAILLET wrote: This replaces kmalloc + strcpy by an equivalent call to kstrdup. Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr --- v2: remove useless curly braces

Re: [patch] vfio: make an array larger

2015-11-04 Thread walter harms
Am 04.11.2015 14:26, schrieb Dan Carpenter: > Smatch complains about a possible out of bounds error: > > drivers/vfio/pci/vfio_pci_config.c:1241 vfio_cap_init() > error: buffer overflow 'pci_cap_length' 20 <= 20 > > Fix this by making the array larger. > > Signed-off-by: Dan

Re: [PATCH 2/2] [media] c8sectpfe: Combine three checks into a single if block

2015-11-06 Thread walter harms
Am 05.11.2015 19:50, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Thu, 5 Nov 2015 19:23:50 +0100 > > The variable "tsin" was checked three times in a loop iteration of the > c8sectpfe_tuner_unregister_frontend() function. > This implementation detail

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread walter harms
+1 I like this more since it is much more obvious what is done. more over we can remove a macro with only 2 users. re, wh Am 06.11.2015 11:57, schrieb Julia Lawall: >>> Would it be preferable to remove the macro entirely and inline the for >>> loop header? >> >> Could you show me an example

Re: [PATCH 2/2] spi: spi-ep93xx: change PTR_ERR argument

2015-08-30 Thread walter harms
Am 30.08.2015 20:05, schrieb Julia Lawall: Apply PTR_ERR to the value that was recently assigned. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression x,y; @@ if (IS_ERR(x) || ...) { ... when any when != IS_ERR(...)

Re: [PATCH 1/2] ASoC: qcom: change PTR_ERR argument

2015-08-30 Thread walter harms
Am 30.08.2015 20:05, schrieb Julia Lawall: Apply PTR_ERR to the value that was recently assigned. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression x,y; @@ if (IS_ERR(x) || ...) { ... when any when != IS_ERR(...)

Re: [dm-devel] [PATCH 12/39] dm: drop null test before destroy functions

2015-09-14 Thread walter harms
Am 14.09.2015 15:46, schrieb Mikulas Patocka: > > On Sun, 13 Sep 2015, Julia Lawall wrote: > >> > Remove unneeded NULL test. >> > >> > The semantic patch that makes this change is as follows: >> > (http://coccinelle.lip6.fr/) >> > >> > // >> > @@ expression x; @@ >> > -if (x != NULL) >> >

Re: [PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()

2015-12-12 Thread walter harms
Am 12.12.2015 15:45, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Sat, 12 Dec 2015 15:04:57 +0100 > > The variable "acceptor_values" and "proposer_values" were initialized > by null pointers and immediately assigned values from input parameters > by

Re: [patch v2] usb: f_fs: off by one bug in _ffs_func_bind()

2016-05-28 Thread walter harms
much better readable than the original. nice work re, wh Am 28.05.2016 06:48, schrieb Dan Carpenter: > This loop is supposed to set all the .num[] values to -1 but it's off by > one so it skips the first element and sets one element past the end of > the array. > > I've cleaned up the loop a

Re: [PATCH] ALSA: echoaudio: Fix memory allocation

2016-06-28 Thread walter harms
Am 27.06.2016 21:06, schrieb Christophe JAILLET: > 'commpage_bak' is allocated with 'sizeof(struct echoaudio)' bytes. > We then copy 'sizeof(struct comm_page)' bytes in it. > On my system, smatch complains because one is 2960 and the other is 3072. > > This would result in memory corruption or

Re: [patch] extcon: use correct size

2016-02-04 Thread walter harms
Am 04.02.2016 12:36, schrieb Dan Carpenter: > The info->status[] array has 3 elements. We are using size > MAX77843_MUIC_IRQ_NUM (16) instead of MAX77843_MUIC_STATUS_NUM (3) as > intended. > > Fixes: 135d9f7d135a ('extcon: max77843: Clear IRQ bits state before request > IRQ') > Signed-off-by:

Re: [patch] drm/amd: cleanup get_mfd_cell_dev()

2016-02-27 Thread walter harms
Am 25.02.2016 08:47, schrieb Dan Carpenter: > It's simpler to just use snprintf() to print this to one buffer instead > of using strcpy() and strcat(). Also using snprintf() is slightly safer > than using sprintf(). > > Signed-off-by: Dan Carpenter > > diff --git

Re: [patch] drm/amd: cleanup get_mfd_cell_dev()

2016-02-27 Thread walter harms
Am 27.02.2016 11:40, schrieb Dan Carpenter: > On Sat, Feb 27, 2016 at 10:50:40AM +0100, walter harms wrote: >> >> >> Am 25.02.2016 08:47, schrieb Dan Carpenter: >>> It's simpler to just use snprintf() to print this to one buffer instead >>> of using strc

Re: [patch] kexec: potetially using uninitialized variable

2016-03-11 Thread walter harms
Am 11.03.2016 10:19, schrieb Dan Carpenter: > On Fri, Mar 11, 2016 at 04:52:43PM +0800, Xunlei Pang wrote: >> Hi Dan, >> >> On 2016/03/11 at 16:07, Dan Carpenter wrote: >>> At the end of the function we check if "ret" has a negative error code, >>> but it seems possible that it is uninitialized.

Re: [patch] ALSA: mixart: silence an uninitialized variable warning

2016-03-16 Thread walter harms
Am 16.03.2016 08:42, schrieb Dan Carpenter: > We could print the uninitialized value of "stat" in the error message. > > Signed-off-by: Dan Carpenter > > diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c > index bc81b9f..25c0ddd 100644 > ---

Re: [PATCH] staging: dgnc: fix camelcase of SerialDriver and PrintDriver

2016-03-22 Thread walter harms
You have send this patch before, right ? then it is a good custom to have something like: [Patch V2] in the subject line. In the comment you should write somethink like v2: fix withspace damage v1: fix issue Otherwise none of the reviewer maintainer will see what was changes. Sometimes patch

Re: [PATCH] staging: dgnc: replace dgnc_offset_table with bit shift.

2016-03-25 Thread walter harms
Am 25.03.2016 12:33, schrieb Daeseok Youn: > the dgnc_offset_table has a same value with (1 << port). > So I tried to replace dgnc_offset_table array with 1 << port. > And also there are redundant assignments(tmp and current_port) > inside while loop for checking uart port, and remove them. > >

Re: [PATCH 2/4] GPU-DRM-Etnaviv: Delete unnecessary if statement in __etnaviv_gem_new()

2016-07-22 Thread walter harms
Am 22.07.2016 17:48, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Fri, 22 Jul 2016 16:45:22 +0200 > > Move a return statement into a block for successful function execution. > Omit a duplicate check for the local variable "ret" then at the end. > >

Re: [PATCH 3/3] staging: wilc1000: Reduce scope for a few variables in mac_ioctl()

2016-07-25 Thread walter harms
Am 25.07.2016 21:17, schrieb Lino Sanfilippo: >> >> -if (strncasecmp(buff, "RSSI", length) == 0) { >> +if (strncasecmp(buff, "RSSI", 0) == 0) { >> +s8 rssi; >> + > > Um, please think a second about if it makes any sense at

Re: is_err checking

2016-07-24 Thread walter harms
Am 23.07.2016 16:56, schrieb Julia Lawall: > Code like the following looks a bit clunky to me: > > if (IS_ERR(data->clk) && PTR_ERR(data->clk) != -EPROBE_DEFER) > > Is there any reason not to always use eg > > data->clk == ERR_PTR(-EPROBE_DEFER) > > Code of the latter form is a bit more

Re: [PATCH] cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put()

2016-07-29 Thread walter harms
Am 29.07.2016 05:55, schrieb Andrew Donnellan: > Rewrite the cxl_guest_init_afu() loop in cxl_of_probe() to use > for_each_child_of_node() rather than a hand-coded for loop. > > Remove the useless of_node_put(afu_np) call after the loop, where it's > guaranteed that afu_np == NULL. > >

Re: [PATCH 7/8] drm/amd/powerplay: Change assignment for a buffer variable in phm_dispatch_table()

2016-07-17 Thread walter harms
Am 16.07.2016 17:08, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Sat, 16 Jul 2016 15:36:36 +0200 > > The variable "temp_storage" was eventually reassigned with a pointer. > Thus omit the explicit initialisation at the beginning. > > Signed-off-by:

Re: [PATCH] [media] v4l2-common: Delete an unnecessary check before the function call "spi_unregister_device"

2016-07-19 Thread walter harms
Am 19.07.2016 20:02, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Tue, 19 Jul 2016 19:54:16 +0200 > > The spi_unregister_device() function tests whether its argument is NULL > and then returns immediately. Thus the test around the call is not needed.

Re: [PATCH] selftests/timers: Add missing error code assignment before test

2016-08-09 Thread walter harms
The patch looks ok. but perhaps it is better to replace this with clock_gettime() ? from the manpage: "POSIX.1-2008 marks gettimeofday() as obsolete, recommending the use of clock_gettime(2) instead." just my 2 cents. re, wh Am 09.08.2016 12:11, schrieb Christophe JAILLET: > In order to

Re: [patch] crypto: sha256-mb - cleanup a || vs | typo

2016-06-30 Thread walter harms
Am 30.06.2016 13:16, schrieb Joe Perches: > On Thu, 2016-06-30 at 10:50 +0300, Dan Carpenter wrote: >> On Wed, Jun 29, 2016 at 10:05:53AM -0700, H. Peter Anvin wrote: >>> On 06/29/16 07:42, Dan Carpenter wrote: >> and | behave basically the same here but || is intended. It causes a

Re: [PATCH] scsi_dh_emc: fix uninitialized return value ret

2017-01-31 Thread walter harms
Am 31.01.2017 13:22, schrieb Colin King: > From: Colin Ian King > > ret is uninitialized on a successful execution of clarrion_std_inquiry > and a garbage return value is being returted. Fix this by setting ret > to zero on the success exit path. > > Found by

  1   2   3   4   >