[PATCH] Videopix Frame Grabber: Fix unreleased lock in vfc_debug()

2007-07-01 Thread Matthias Kaehlcke
Videopix Frame Grabber: vfc_debug() doesn't release the device lock when copy_from_user() fails Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> --- diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 6afc7e5..1cbdabd 100644 --- a/drivers/sbus/char/vfc_

[PATCH 0/5] use mutex instead of semaphore in several drivers

2007-07-01 Thread Matthias Kaehlcke
This patchset converts semaphores that are used as mutexes to the mutex API in the following drivers: Megaraid Mailbox Philips webcam SMSC LPC47M192 Virtual Video VLSI 82C147 IrDA controller -- Matthias Kaehlcke Linux Application Developer Barcelona Insanity: doing the same

[PATCH 1/5] use mutex instead of semaphore in Megaraid Mailbox driver

2007-07-01 Thread Matthias Kaehlcke
The Megaraid Mailbox driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h index 26e1e6c..fef9ac9 100644 --- a/d

[PATCH 2/5] use mutex instead of semaphore in Philips webcam driver

2007-07-01 Thread Matthias Kaehlcke
The Philips webcam driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 085332a..9c0e8d1 100644 --- a/drivers

[PATCH 3/5] use mutex instead of semaphore in SMSC LPC47M192 driver

2007-07-01 Thread Matthias Kaehlcke
The SMSC LPC47M192 driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c index a012f39..7c5cfa2 100644 --- a/drivers/hwmon/smsc47

[PATCH 4/5] use mutex instead of semaphore in Virtual Video driver

2007-07-01 Thread Matthias Kaehlcke
The Virtual Video driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index f7e1d19..e86f4cd 100644 --- a/drivers/media/video/

[PATCH 5/5] use mutex instead of semaphore in VLSI 82C147 IrDA controller driver

2007-07-01 Thread Matthias Kaehlcke
The VLSI 82C147 IrDA controller driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index bf78ef1..0538ca9 100644 --- a/drive

Re: use mutex instead of semaphore in RocketPort driver

2007-05-22 Thread Matthias Kaehlcke
case of being interrupted by a signal the data that should be protected by the mutex/semaphore can be accessed/changed by two threads at the same time. would the following resolve the problem? if(mutex_lock_interruptible(&info->write_mtx)) return -ERESTART

Re: [PATCH] fix unchecked mutex_lock_interruptible (was Re: use mutex instead of semaphore in RocketPort driver)

2007-05-23 Thread Matthias Kaehlcke
El Wed, May 23, 2007 at 06:25:49PM +0530 Satyam Sharma ha dit: > On 5/23/07, Jiri Slaby <[EMAIL PROTECTED]> wrote: > >Simon Arlott napsal(a): > >> On 22/05/07 21:06, Matthias Kaehlcke wrote: > >>> would the following resolve the problem? > >>> &g

[PATCH 0/2] use list_for_each() for iteration in hostap and prism54 driver

2007-05-25 Thread Matthias Kaehlcke
This patchset uses the list_for_each() macro instead of manual iteration in the following drivers: Host AP Prism54 -- Matthias Kaehlcke Linux Application Developer Barcelona The salvation of mankind lies only in making everything the concern of all (Alexander

[PATCH 2/2] use list_for_each() for iteration in Prism 54 driver

2007-05-25 Thread Matthias Kaehlcke
Use list_for_each() in the Prism54 driver to iterate over the MAC list Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 283be4a..34cf13c 100644 --- a/drivers/net/wireless/p

[PATCH 1/2] use list_for_each() for iteration in Host AP driver

2007-05-25 Thread Matthias Kaehlcke
Use list_for_each() in the Host AP driver to iterate over the MAC restrictions and the STA info lists Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 5b3abd5..0718eeb 100644

[PATCH] include KERN_* constant in printk() calls in arch/i386/mach-default/setup.c

2007-04-13 Thread Matthias Kaehlcke
include KERN_* constant in printk() calls in arch/i386/mach-default/setup.c Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> --- diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c index c788162..f1891b6 100644 --- a/arch/i386/mach-default/setup.c +++ b/arc

[PATCH] fixed spinlock use in hysdn_log_close()

2007-04-13 Thread Matthias Kaehlcke
fixed incorrect spinlock use in hysdn_log_close(). the function declared a spinlock on the stack and used it to 'protect' a shared driver structure. the patch removes the declaration of hysdn_lock and uses card->hysdn_lock instead. Signed-off-by: Matthias Kaehlcke <[EMAIL PROTE

[PATCH] qla1280: use DMA_64BIT_MASK instead of ~ 0ULL

2007-04-17 Thread Matthias Kaehlcke
QLA1280: call pci_set_dma_mask with DMA_64BIT_MASK instead of ~ 0ULL Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> --- diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 6777e8a..54d8bdf 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -4293,7 +

[PATCH] SBS ACPI: convert binary semaphore to mutex

2007-04-18 Thread Matthias Kaehlcke
mutex. please let me know your comments if i misinterpreted the article or if you see something wrong in the patch -- Smart Battery System ACPI driver: convert binary semaphore to mutex Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/acpi/sbs.c b/drivers/acpi/

[PATCH] use mutex instead of binary semaphore in FORE Systems 200E-series driver for ATM

2007-04-19 Thread Matthias Kaehlcke
use mutex instead of binary semaphore in FORE Systems 200E-series driver for ATM Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> --- diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index a7c0ed3..7ab827d 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore

[PATCH] drivers/base/attribute_container.c: use mutex instead of binary semaphore

2007-04-19 Thread Matthias Kaehlcke
use mutex instead of binary semaphore in drivers/base/attribute_container.c Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 073..1ec0654 100644 --- a/drivers/base/attribute_container.c

Re: [PATCH] fixed spinlock use in hysdn_log_close()

2007-04-21 Thread Matthias Kaehlcke
El Fri, Apr 20, 2007 at 05:41:46PM -0700 Andrew Morton ha dit: > On Sat, 14 Apr 2007 07:09:07 +0200 > Matthias Kaehlcke <[EMAIL PROTECTED]> wrote: > > > fixed incorrect spinlock use in hysdn_log_close(). the function > > declared a spinlock on the stack and us

[PATCH] use spinlock instead of binary mutex in CDU-31A driver

2007-04-22 Thread Matthias Kaehlcke
use spinlock instead of binary mutex in CDU-31A driver Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 2157c58..d3649e4 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c @@ -263,7 +263,7 @@ stat

[PATCH] use spinlock instead of binary mutex in idt77252 driver

2007-04-22 Thread Matthias Kaehlcke
use spinlock instead of binary mutex in idt77252 driver Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index b4b8014..e3cf141 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -2430,7 +

Re: [PATCH] use spinlock instead of binary mutex in CDU-31A driver

2007-04-22 Thread Matthias Kaehlcke
El Mon, Apr 23, 2007 at 01:25:58AM +0200 Andi Kleen ha dit: > Matthias Kaehlcke <[EMAIL PROTECTED]> writes: > > > -static DECLARE_MUTEX(sony_sem);/* Semaphore for drive hardware > > access */ > > +static DEFINE_MUTEX(sony_mtx); /* Mutex

Re: [PATCH] use spinlock instead of binary mutex in idt77252 driver

2007-04-22 Thread Matthias Kaehlcke
El Sun, Apr 22, 2007 at 07:50:36PM -0400 Kyle Moffett ha dit: > On Apr 22, 2007, at 17:39:59, Matthias Kaehlcke wrote: > >use spinlock instead of binary mutex in idt77252 driver > > I think you really meant: "Use mutex instead of binary semaphore in > idt77252 driver&q

[PATCH] use mutex instead of binary semaphore in CDU-31A driver

2007-04-23 Thread Matthias Kaehlcke
use mutex instead of binary semaphore in CDU-31A driver Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 2157c58..d3649e4 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c @@ -263,7 +263,7 @@ stat

[PATCH] use mutex instead of binary semaphore in idt77252 driver

2007-04-23 Thread Matthias Kaehlcke
use mutex instead of binary semaphore in idt77252 driver Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index b4b8014..e3cf141 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -2430,7 +

Re: [PATCH] use spinlock instead of binary mutex in idt77252 driver

2007-04-23 Thread Matthias Kaehlcke
an opportunity presents itself." http://lwn.net/Articles/167034/ please correct me if i'm wrong, i'm just doing my first steps with linux kernel development regards -- Matthias Kaehlcke Linux Application Developer Barcelona C treats you like a consenting adult. Pascal treats you l

Re: [PATCH] use spinlock instead of binary mutex in idt77252 driver

2007-04-23 Thread Matthias Kaehlcke
this, neither the mutex header nor implementation files handle things different for CONFIG_SMP. thanks for your comments > On Mon, Apr 23, 2007 at 09:40:26AM +0200, Matthias Kaehlcke wrote: > > El Mon, Apr 23, 2007 at 09:16:08AM +0200 Eddie C. Dost ha dit: > > > > > Ple

Re: [PATCH 1/5] Power Management: use mutexes instead of semaphores

2007-05-04 Thread Matthias Kaehlcke
El Thu, May 03, 2007 at 10:54:32PM -0700 Andrew Morton ha dit: > On Fri, 27 Apr 2007 10:43:22 +0200 Matthias Kaehlcke <[EMAIL PROTECTED]> > wrote: > > > the Power Management code uses semaphores as mutexes. use the mutex > > API instead of the (binary) semaphores >

Re: [PATCH] use spinlock instead of binary mutex in idt77252 driver

2007-04-23 Thread Matthias Kaehlcke
El Mon, Apr 23, 2007 at 09:17:53AM +0100 Christoph Hellwig ha dit: > On Sun, Apr 22, 2007 at 07:50:36PM -0400, Kyle Moffett wrote: > > On Apr 22, 2007, at 17:39:59, Matthias Kaehlcke wrote: > > >use spinlock instead of binary mutex in idt77252 driver > > > > I thin

[PATCH] use mutex instead of semaphore in RocketPort driver

2007-04-24 Thread Matthias Kaehlcke
the RocketPort driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 76357c8..faa5dd5 100644 --- a/drivers/char/rocket.c +++ b/driver

Re: [PATCH] use mutex instead of semaphore in RocketPort driver

2007-04-24 Thread Matthias Kaehlcke
El Tue, Apr 24, 2007 at 07:53:04PM +0200 Oliver Neukum ha dit: > Am Dienstag, 24. April 2007 19:49 schrieb Matthias Kaehlcke: > > @@ -1706,7 +1706,7 @@ static int rp_write(struct tty_struct *tty, > > if (count <= 0 || rocket_paranoia_check(info, "rp_write"))

[PATCH] use mutex instead of semaphore in SBPCD driver

2007-04-24 Thread Matthias Kaehlcke
the SBPCD driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index a1283b1..5c6a8d3 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers

[PATCH] use mutex instead of semaphore in TPM driver

2007-04-24 Thread Matthias Kaehlcke
the TPM driver uses two semaphores as mutexes. use the mutex API instead of the (binary) semaphores Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index e5a254a..0805d39 100644 --- a/drivers/char/tpm/tpm.c +++ b/driver

[PATCH] use mutex instead of semaphore in Sony PI driver

2007-04-24 Thread Matthias Kaehlcke
the Sony Programmable I/O Control driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 7823757..878d8d0 100644 --- a/drivers/char/so

[PATCH] use mutex instead of semaphore in DMA pool handler

2007-04-24 Thread Matthias Kaehlcke
the DMA pool handler uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c index cd467c9..9406259 100644 --- a/drivers/base/dmapool.c +++ b/driver

Re: [PATCH] use mutex instead of semaphore in RocketPort driver

2007-04-25 Thread Matthias Kaehlcke
El Wed, Apr 25, 2007 at 10:36:38AM +0530 Satyam Sharma ha dit: > Hi Matthias, > > On 4/25/07, Robert Hancock <[EMAIL PROTECTED]> wrote: > >Matthias Kaehlcke wrote: > >> El Tue, Apr 24, 2007 at 07:53:04PM +0200 Oliver Neukum ha dit: > >> > >>>

[PATCH] use mutex instead of semaphore in RocketPort driver v2

2007-04-25 Thread Matthias Kaehlcke
the RocketPort driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 76357c8..7d23790 100644 --- a/drivers/char/rocket.c +++ b/driver

[PATCH] use mutex instead of semaphore in EDAC core

2007-04-25 Thread Matthias Kaehlcke
the EDAC core code uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 7b62230..f217750 100644 --- a/drivers/edac/edac_mc.c +++ b/driver

[PATCH] use mutex instead of semaphore in hdaps driver

2007-04-25 Thread Matthias Kaehlcke
the hdaps driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index bf759ea..f8e4952 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/h

Re: [PATCH] use mutex instead of semaphore in RocketPort driver v2

2007-04-25 Thread Matthias Kaehlcke
El Wed, Apr 25, 2007 at 03:54:36PM +0200 Jiri Slaby ha dit: > Matthias Kaehlcke napsal(a): > > the RocketPort driver uses a semaphore as mutex. use the mutex API > > instead of the (binary) semaphore > > > > Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> &

[PATCH] use mutex instead of semaphore for misc char devices

2007-04-25 Thread Matthias Kaehlcke
the misc character device driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 7e975f6..afd7cf5 100644 --- a/drivers/char/misc.c +++ b/d

[PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7a32df5..4496fd2 100644 --- a/drivers/char/tty_io.c +++ b/driver

[PATCH] use mutex instead of semaphore in RocketPort driver v3

2007-04-25 Thread Matthias Kaehlcke
the RocketPort driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 76357c8..af9379b 100644 --- a/drivers/char/rocket.c +++ b/driver

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
El Wed, Apr 25, 2007 at 08:13:59PM +0100 Christoph Hellwig ha dit: > On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: > > drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API > > instead of the (binary) semaphore > > This looks like it

[PATCH] use spinlock instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
drivers/char/tty_io.c uses a semaphore to protect quick non-blocking operations. use a spinlock instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> -- diff --git a/drivers/char/tty_io.c b/

[PATCH] use mutex instead of semaphore in Berkshire USB-PC Watchdog driver

2007-04-26 Thread Matthias Kaehlcke
the Berkshire USB-PC Watchdog driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 31037f9..1e7a671 100644 --- a/d

[PATCH] use mutex instead of semaphore in IDE driver

2007-04-26 Thread Matthias Kaehlcke
the IDE driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 8f15c23..34f79a5 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/i

[PATCH] use mutex instead of semaphore in virtual console driver

2007-04-26 Thread Matthias Kaehlcke
the virtual console driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index 7919303..032d4f1 100644 --- a/drivers/char/vc_screen.c

[PATCH] use mutex instead of semaphore in CAPI 2.0 interface

2007-04-26 Thread Matthias Kaehlcke
the CAPI 2.0 interface uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index db1260f..b260bdc 100644 --- a/drivers/isdn/capi/capi.c

[PATCH 2/5] Kcopyd: use mutex instead of semaphore

2007-04-27 Thread Matthias Kaehlcke
Kcopyd uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index b46f6c5..340272a 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -195,7

[PATCH 1/5] Power Management: use mutexes instead of semaphores

2007-04-27 Thread Matthias Kaehlcke
the Power Management code uses semaphores as mutexes. use the mutex API instead of the (binary) semaphores Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 973..297061c 100644 --- a/drivers/base/power/

[PATCH 3/5] sysdev: use mutex instead of semaphore

2007-04-27 Thread Matthias Kaehlcke
the sysdev code use a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 04e5db4..82c41d1 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c @@

[PATCH 0/5] use mutex instead of semaphore in several drivers

2007-04-27 Thread Matthias Kaehlcke
this patchset converts semaphores that are used as mutexes to the mutex API in the following drivers/code: Power Management Kcopyd sysdev pvrusb2 scx200 -- Matthias Kaehlcke Linux Application Developer Barcelona For to be free is not merely to cast off one&#

[PATCH 4/5] pvrusb2: use mutex instead of semaphore

2007-04-27 Thread Matthias Kaehlcke
the pvrusb2 driver use a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 9916cf3..ea450b0 100644 --- a/d

[PATCH 5/5] scx200: use mutex instead of semaphore

2007-04-27 Thread Matthias Kaehlcke
the scx200 driver use a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED] -- diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 0b082c5..669d2ac 100644 --- a/drivers/i2c/bus

Re: Linux page cache issue?

2007-03-28 Thread Matthias Kaehlcke
according to the chapter "Linux Kernel Overview" of the kernelhacking-HOWTO the page cache holds pages associated with *open* files: The Page Cache The page cache is made up of pages, each of which refers to a 4kB portion of data associated with an open file. The data contained in a page may come

Re: [v3,2/6] power: add power sequence library

2016-07-29 Thread Matthias Kaehlcke
Hi Peter, Thanks for your work on this, a few comments inline On 07/20/2016 02:40 AM, Peter Chen wrote: ... +static int pwrseq_generic_on(struct device_node *np, struct pwrseq *pwrseq) +{ ... + if (gpiod_reset) { + u32 duration_us = 50; + + of_property_rea

[PATCH v4 2/4] regulator: pwm: Use core functionality to delay after changing voltage

2016-09-06 Thread Matthias Kaehlcke
Use the new set_voltage_time() op to calculate the stabilization time instead of duplicating the calculation in the core code. Signed-off-by: Matthias Kaehlcke --- Changes in v4: - This patch is new for v4. drivers/regulator/pwm-regulator.c | 10 +- 1 file changed, 1 insertion(+), 9

[PATCH v4 3/4] regulator: Add support for a fixed delay after voltage increases

2016-09-06 Thread Matthias Kaehlcke
elay. Signed-off-by: Matthias Kaehlcke Signed-off-by: Douglas Anderson --- Changes in v4: - Moved from PWM regulator to regulator core - Added 'regulator' prefix to device tree property .../devicetree/bindings/regulator/regulator.txt| 2 ++ drivers/regulator/core.c

[PATCH v4 4/4] regulator: Prevent falling too fast

2016-09-06 Thread Matthias Kaehlcke
s Anderson Signed-off-by: Matthias Kaehlcke --- Changes in v4: - Moved from PWM regulator to regulator core - Added 'regulator' prefix to device tree properties .../devicetree/bindings/regulator/regulator.txt| 7 +++ drivers/regulator/core.c | 58 ++

[PATCH v4 1/4] regulator: Add set_voltage_time op

2016-09-06 Thread Matthias Kaehlcke
f the stabilization time is done in the same place for both types of regulators. Signed-off-by: Matthias Kaehlcke --- Changes in v4: - This patch is new for v4. drivers/regulator/core.c | 140 +-- include/linux/regulator/driver.h | 8 +++ 2 files change

Re: [PATCH v4 4/4] regulator: Prevent falling too fast

2016-09-13 Thread Matthias Kaehlcke
Hi Mark, thanks for your review, please find my comments (including info from our EE) below. El Mon, Sep 12, 2016 at 07:56:33PM +0100 Mark Brown ha dit: > On Tue, Sep 06, 2016 at 12:05:24PM -0700, Matthias Kaehlcke wrote: > > > On some boards it's possible that transitioning

Re: [PATCH v4 1/4] regulator: Add set_voltage_time op

2016-09-13 Thread Matthias Kaehlcke
El Mon, Sep 12, 2016 at 06:18:31PM -0700 Matthias Kaehlcke ha dit: > El Tue, Sep 13, 2016 at 12:57:58AM +0100 Mark Brown ha dit: > > > On Mon, Sep 12, 2016 at 04:18:51PM -0700, Matthias Kaehlcke wrote: > > > El Mon, Sep 12, 2016 at 07:32:30PM +0100 Mark Brown ha dit: > &g

[PATCH v5 2/6] regulator: core: Simplify error flow in _regulator_do_set_voltage()

2016-09-14 Thread Matthias Kaehlcke
If the voltage can not be set jump to the end of the function. This avoids having to check for an error multiple times and eliminates one level of nesting in a follow-up change. Signed-off-by: Matthias Kaehlcke --- Changes in v5: - This patch is new for v5. drivers/regulator/core.c | 8

[PATCH v5 1/6] regulator: core: Use local ops variable in _regulator_do_set_voltage()

2016-09-14 Thread Matthias Kaehlcke
Signed-off-by: Matthias Kaehlcke --- Changes in v5: - This patch is new for v5. drivers/regulator/core.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index db320e8..b059e83 100644 --- a/drivers

[PATCH v5 3/6] regulator: core: Don't skip set_voltage_time when ramp delay disabled

2016-09-14 Thread Matthias Kaehlcke
delay is specified. Remove the check in _regulator_do_set_voltage(), the functions calculating the ramp delay return 0 anyway when the ramp delay is not configured. Signed-off-by: Matthias Kaehlcke --- Changes in v5: - This patch is new for v5. drivers/regulator/core.c | 8 ++-- 1 file

[PATCH v5 6/6] regulator: core: Prevent falling too fast

2016-09-14 Thread Matthias Kaehlcke
all until we've finished delaying. A future patch atop this one might choose to return more immediately and let the voltages fall in the background. That would possibly allow us to cancel a slow downward decay if there was a request to go back up. Signed-off-by: Douglas Anderson Signed-off-b

[PATCH v5 5/6] regulator: core: Add support for a fixed delay after voltage changes

2016-09-14 Thread Matthias Kaehlcke
change introduces the device tree properties "regulator-settle-time-up-us"/"regulator-settle-time-down-us" which allow to specify a fixed delay after a voltage increase or decrease. Signed-off-by: Matthias Kaehlcke --- Changes in v5: - Added support for delay on voltage de

[PATCH v5 4/6] regulator: core: Add set_voltage_time op

2016-09-14 Thread Matthias Kaehlcke
on is used to calculate the delay. This change also removes the ramp_delay calculation in the PWM regulator, since the driver now uses the core code for the calculation of the delay. Signed-off-by: Matthias Kaehlcke --- Changes in v5: - Use _regulator_set_voltage_time() as default if set_voltage

Re: [PATCH v4 4/4] regulator: Prevent falling too fast

2016-09-15 Thread Matthias Kaehlcke
Hi Mark, El Thu, Sep 15, 2016 at 03:39:45PM +0100 Mark Brown ha dit: > On Tue, Sep 13, 2016 at 10:21:40AM -0700, Matthias Kaehlcke wrote: > > > Optimizing the delay time depends on the SoC; we have not measured > > this across a wide variety of devices and thus have

Re: [PATCH v5 2/6] power: add power sequence library

2016-08-08 Thread Matthias Kaehlcke
d-off-by: Peter Chen > Tested-by Joshua Clayton Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke

Re: [PATCH v2 1/3] ASoC: rockchip: Parse dai links from dts

2017-08-16 Thread Matthias Kaehlcke
El Thu, Aug 10, 2017 at 12:54:56PM +0800 Jeffy Chen ha dit: > Refactor rockchip_sound_probe, parse dai links from dts instead of > hard coding them. Mark doesn't seem to be overly convinced that 'rockchip,codec-names' is a good idea (https://lkml.org/lkml/2017/8/10/511). How about using somethin

Re: [PATCH v2 1/2] kbuild: Also evaluate alternative option passed to cc-option, etc

2017-08-16 Thread Matthias Kaehlcke
El Thu, Aug 17, 2017 at 12:03:05AM +0900 Masahiro Yamada ha dit: > Hi Matthias, > > > 2017-08-15 10:29 GMT+09:00 Matthias Kaehlcke : > > The macro cc-option receives two parameters (the second may be empty). It > > returns the first parameter if it is a valid compiler o

Re: [PATCH v2 1/3] ASoC: rockchip: Parse dai links from dts

2017-08-16 Thread Matthias Kaehlcke
El Thu, Aug 17, 2017 at 06:55:20AM +0800 jeffy ha dit: > hi matthias, > > thanks for your suggestion. > > On 08/17/2017 05:59 AM, Matthias Kaehlcke wrote: > >El Thu, Aug 10, 2017 at 12:54:56PM +0800 Jeffy Chen ha dit: > > > >>>Refactor rockchip_sound_pro

[PATCH v3] x86/build: Fix stack alignment for CLang

2017-08-16 Thread Matthias Kaehlcke
native option is valid it would incorrectly select the clang option -mstack-alignment.. Signed-off-by: Matthias Kaehlcke --- Changes in v3: - Don't rely on cc-option to evaluate the alternative option. Instead check once if the compiler supports the option and use variables with the c

Re: [tip:x86/build 2/2] kernel/bounds.c:1: error: -mpreferred-stack-boundary=3 is not between 4 and 12

2017-08-17 Thread Matthias Kaehlcke
El Thu, Aug 17, 2017 at 10:13:20PM +0800 kbuild test robot ha dit: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/build > head: 8f91869766c00622b2eaa8ee567db4f333b78c1a > commit: 8f91869766c00622b2eaa8ee567db4f333b78c1a [2/2] x86/build: Fix stack > alignment for CLang

[PATCH] x86/build: Use cc-option to validate stack alignment parameter

2017-08-17 Thread Matthias Kaehlcke
older gcc versions which only support stack alignment on a boundary of 16 bytes or higher. Also use (__)cc_option to add the stack alignment option to CFLAGS to make sure only valid options are added. Fixes: 8f91869766c0 ("x86/build: Fix stack alignment for CLang") Signed-off-by: Matthias

Re: [PATCH v4 3/3] x86/build: Specify stack alignment for clang

2017-06-20 Thread Matthias Kaehlcke
El Tue, Jun 20, 2017 at 11:20:54AM +0200 Ingo Molnar ha dit: > > * Matthias Kaehlcke wrote: > > > Ingo didn't like the duplication and suggested the use of a variable, which > > kinda implies a check for the compiler name. > > I don't think it implie

Re: [PATCH 2/2] kbuild: clang: Disable the 'duplicate-decl-specifier' warning

2017-06-21 Thread Matthias Kaehlcke
El Wed, Jun 21, 2017 at 12:11:55PM +0200 Arnd Bergmann ha dit: > On Wed, Jun 21, 2017 at 11:11 AM, Masahiro Yamada > wrote: > > 2017-05-24 17:21 GMT+09:00 Arnd Bergmann : > >> On Wed, May 24, 2017 at 2:04 AM, Matthias Kaehlcke > >> wrote: > >>> El Wed,

Re: [PATCH 2/2] kbuild: clang: Disable the 'duplicate-decl-specifier' warning

2017-06-21 Thread Matthias Kaehlcke
El Wed, Jun 21, 2017 at 07:59:42PM +0200 Arnd Bergmann ha dit: > On Wed, Jun 21, 2017 at 6:58 PM, Matthias Kaehlcke wrote: > > El Wed, Jun 21, 2017 at 12:11:55PM +0200 Arnd Bergmann ha dit: > >> I see that container_of() has been modified in linux-next and no longer > &g

[PATCH v5 2/3] x86/build: Use __cc-option for boot code compiler options

2017-06-21 Thread Matthias Kaehlcke
f the macro. Signed-off-by: Matthias Kaehlcke --- arch/x86/Makefile | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index bf240b920473..b2dae639f778 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -24,10 +24,11 @@ REALMODE_C

[PATCH v5 0/3] x86: stack alignment for boot code and clang

2017-06-21 Thread Matthias Kaehlcke
series adds the new kbuild macro __cc-option and refactors the macros cc-option and hostcc-option to make use of __cc-option. Matthias Kaehlcke (3): kbuild: Add __cc-option macro x86/build: Use __cc-option for boot code compiler options x86/build: Specify stack alignment for clang Makefile

[PATCH v5 1/3] kbuild: Add __cc-option macro

2017-06-21 Thread Matthias Kaehlcke
. Suggested-by: Arnd Bergmann Suggested-by: Masahiro Yamada Signed-off-by: Matthias Kaehlcke Acked-by: Masahiro Yamada --- Changes in v5: - removed extra whitespace in value returned by cc-option Makefile | 2 +- scripts/Kbuild.include | 14 -- scripts/Makefile.host | 6

[PATCH v5 3/3] x86/build: Specify stack alignment for clang

2017-06-21 Thread Matthias Kaehlcke
in d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if supported") the standard kernel entry on x86-64 leaves the stack on an 8-byte boundary, as a consequence clang will keep the stack misaligned. Signed-off-by: Matthias Kaehlcke --- Changes in v5: - Use cc-option to p

[PATCH 0/3] cfq-iosched: Fix warnings about unused functions

2017-05-26 Thread Matthias Kaehlcke
This patch series fixes a bunch of 'unused-function' warnings raised by clang. Matthias Kaehlcke (3): cfq-iosched: Mark cfq_clear_cfqq_*() as __maybe_unused cfq-iosched: Fix warning about unused dummy functions cfq-iosched: Delete unused function min_vdisktime() block/cfq-iosc

[PATCH 3/3] cfq-iosched: Delete unused function min_vdisktime()

2017-05-26 Thread Matthias Kaehlcke
This fixes the following warning when building with clang: block/cfq-iosched.c:970:19: error: unused function 'min_vdisktime' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke --- block/cfq-iosched.c | 9 - 1 file changed, 9 deletions(-) diff --git a

[PATCH 2/3] cfq-iosched: Fix warning about unused dummy functions

2017-05-26 Thread Matthias Kaehlcke
_time' [-Werror,-Wunused-function] block/cfq-iosched.c:590:20: error: unused function 'cfqg_stats_end_empty_time' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke --- block/cfq-iosched.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/cfq-iosched.c b

[PATCH 1/3] cfq-iosched: Mark cfq_clear_cfqq_*() as __maybe_unused

2017-05-26 Thread Matthias Kaehlcke
This fixes the following warning when building with clang: block/cfq-iosched.c:449:1: error: unused function 'cfq_clear_cfqq_sync' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke --- block/cfq-iosched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[RFC] clang: 'unused-function' warning on static inline functions

2017-05-30 Thread Matthias Kaehlcke
Hi, There has been discussion spread over different threads on how to deal with 'unused-function' warnings raised by clang on static inline functions. gcc in general does not emit warnings for unused static inline functions, clang does if the function is in a .c file. When building the kernel wit

Re: [PATCH v2] sched/sysctl: Fix attributes of some extern declarations

2017-10-31 Thread Matthias Kaehlcke
El Tue, Oct 30, 2017 at 10:57:58AM +0100 Ingo Molnar ha dit: > * Matthias Kaehlcke wrote: > > > The definition of sysctl_sched_migration_cost, sysctl_sched_nr_migrate > > and sysctl_sched_time_avg includes the attribute const_debug. This > > attribute is not part of t

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-24 Thread Matthias Kaehlcke
Hi Jakub, El Wed, Oct 04, 2017 at 11:17:24AM -0700 Jakub Kicinski ha dit: > On Wed, 4 Oct 2017 10:42:42 -0700, Manoj Gupta wrote: > > Hi Jakub, > > > > I had discussed about supporting this code with some clang developers. > > However, the consensus was this code relies on a specific GCC optimiz

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-24 Thread Matthias Kaehlcke
El Tue, Oct 24, 2017 at 10:03:56AM -0700 Jakub Kicinski ha dit: > On Tue, 24 Oct 2017 09:56:03 -0700, Matthias Kaehlcke wrote: > > > @@ -561,6 +568,6 @@ int __nfp_eth_set_speed(struct nfp_nsp *nsp, unsigned > > > int speed) > > > */ > > > int __nfp_eth_

Re: [PATCH] wimax/i2400m: Remove VLAIS

2017-10-24 Thread Matthias Kaehlcke
El Mon, Oct 09, 2017 at 12:41:53PM -0700 Matthias Kaehlcke ha dit: > From: Behan Webster > > Convert Variable Length Array in Struct (VLAIS) to valid C by converting > local struct definition to use a flexible array. The structure is only > used to define a cast of a buffer so

Re: [PATCH] cgroup: reorder flexible array members of struct cgroup_root

2017-10-25 Thread Matthias Kaehlcke
Hi Tejun, El Sat, Oct 21, 2017 at 08:32:53AM -0700 Tejun Heo ha dit: > Hello, Nick. > > On Fri, Oct 20, 2017 at 12:15:55AM -0700, Nick Desaulniers wrote: > > > This is silly tho. We know the the root group embedded there won't > > > have any ancestor_ids. > > > > Sure, but struct cgroup_root i

Re: [PATCH 00/15] Add support for clang LTO

2017-11-03 Thread Matthias Kaehlcke
Hi Mark, El Fri, Nov 03, 2017 at 05:51:56PM + Mark Rutland ha dit: > On Fri, Nov 03, 2017 at 10:11:44AM -0700, Sami Tolvanen wrote: > > This series adds build system support for compiling the kernel with clang > > Link Time Optimization (LTO), using GNU gold with the LLVMgold plug-in > > for

Re: [PATCH] kbuild: Set KBUILD_CFLAGS before incl. arch Makefile

2017-11-03 Thread Matthias Kaehlcke
grated-as) > -KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) > -else > - > -# These warnings generated too much noise in a regular build. > -# Use make W=1 to enable them (see scripts/Makefile.extrawarn) > -KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variab

Re: [PATCH] sched/sysctl: Fix attributes of some extern declarations

2017-10-30 Thread Matthias Kaehlcke
El Mon, Oct 30, 2017 at 09:26:12AM +0100 Peter Zijlstra ha dit: > On Fri, Oct 27, 2017 at 04:40:20PM -0700, Matthias Kaehlcke wrote: > > The definition of sysctl_sched_migration_cost, sysctl_sched_nr_migrate > > and sysctl_sched_time_avg includes the attribute const_debug. This &

[PATCH v2] sched/sysctl: Fix attributes of some extern declarations

2017-10-30 Thread Matthias Kaehlcke
: Matthias Kaehlcke Reviewed-by: Nick Desaulniers --- Changes in v2: - removed pointless include of linux/static_key.h - added Reviewed-by tag include/linux/sched/sysctl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/sched/sysctl.h b/include/linux/sched

[PATCH] x86/boot: Disable warnings about GNU extensions

2017-10-30 Thread Matthias Kaehlcke
able sized type 'struct cgroup' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct cgroup cgrp; Reported-by: Nick Desaulniers Signed-off-by: Matthias Kaehlcke --- arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insert

Re: [PATCH v12 7/7] Bluetooth: hci_qca: Add support for Qualcomm Bluetooth chip wcn3990

2018-08-02 Thread Matthias Kaehlcke
dev_device_get_drvdata(hu->serdev); > + if (!qcadev || !qcadev->bt_power || !qcadev->bt_power->vreg_data || > + !qcadev->bt_power->vreg_bulk) > + return -EINVAL; > + > + vregs = qcadev->bt_power->vreg_data->vregs; > + vreg_bulk = qcadev->bt_power->vreg_bulk; > + num_vregs = qcadev->bt_power->vreg_data->num_vregs; > + BT_DBG("on: %d", on); > + if (on && !qcadev->bt_power->vregs_on) { Remove extra blank after 'on' Other than that: Reviewed-by: Matthias Kaehlcke Thanks for following through!

<    1   2   3   4   5   6   7   8   9   10   >