RE: [PATCH] LMK: Optimize lowmem_shrink

2013-08-20 Thread Ma, Xindong
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Tuesday, August 20, 2013 4:30 PM > To: Ma, Xindong > Cc: gre...@linuxfoundation.org; ccr...@android.com; > de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org > Subject: Re: [PATCH] LMK: Optimize lowm

[PATCH] LMK: Optimize lowmem_shrink

2013-08-20 Thread Leon Ma
From: Leon Ma Date: Mon, 19 Aug 2013 14:22:38 +0800 Subject: [PATCH] LMK: Optimize lowmem_shrink. By comparing with selected_oom_score_adj instead of min_score_adj, we may do less calculation. Signed-off-by: Leon Ma --- drivers/staging/android/lowmemorykiller.c | 12 1 files cha

[PATCH 3/3] mmc:memstick:rtsx: Modify copyright comments

2013-08-20 Thread wei_wang
From: Wei WANG Update copyright date, and remove author address. Signed-off-by: Wei WANG --- drivers/memstick/host/rtsx_pci_ms.c |3 +-- drivers/mmc/host/rtsx_pci_sdmmc.c |3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/memstick/host/rtsx_pci_ms.c b/dri

[PATCH 2/3] mmc:rtsx:Clear SD_CLK toggle enable bit if switching voltage fail

2013-08-20 Thread wei_wang
From: Wei WANG If switching voltage fails, SD_CLK toggle enable bit should been cleared so that SD host can control SD clock automatically. Signed-off-by: Wei WANG --- drivers/mmc/host/rtsx_pci_sdmmc.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/h

[PATCH 1/3] mfd:mmc:rtsx: Change default tx phase

2013-08-20 Thread wei_wang
From: Wei WANG The default phase can meet most cards' requirement, but it is not the optimal one. In some extreme situation, the rx phase point produced by the following tuning process will drift quite a distance. Before tuning UHS card, this patch will set a more proper initial tx phase point, w

[PATCH 0/3] Fix sd3.0 issues for Realtek card reader

2013-08-20 Thread wei_wang
From: Wei WANG Wei WANG (3): mfd:mmc:rtsx: Change default tx phase mmc:rtsx:Clear SD_CLK toggle enable bit if switching voltage fail mmc:memstick:rtsx: Modify copyright comments drivers/memstick/host/rtsx_pci_ms.c |3 +- drivers/mfd/rtl8411.c |4 ++ drivers/mfd/rts52

[PATCH] staging: dgnc: builds into kernel

2013-08-20 Thread Lidza Louina
This patch builds the dgnc driver into the kernel. Signed-off-by: Lidza Louina --- drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 1665705..0d9d92b 100644 --- a/drivers/staging

Re: [PATCH v2 1/2] staging: dgnc: driver.c: fixes warning about assigning pointer

2013-08-20 Thread Lidza Louina
Ok, I'm sending it now. On Tue, Aug 20, 2013 at 7:27 PM, Greg KH wrote: > On Tue, Aug 20, 2013 at 02:15:35PM -0400, Lidza Louina wrote: >> This patch fixes a warning associated with assigining >> a pointer in the dgnc_mbuf function. >> >> Signed-off-by: Lidza Louina >> --- >> drivers/staging/dg

Re: [PATCH v2 1/2] staging: dgnc: driver.c: fixes warning about assigning pointer

2013-08-20 Thread Greg KH
On Tue, Aug 20, 2013 at 02:15:35PM -0400, Lidza Louina wrote: > This patch fixes a warning associated with assigining > a pointer in the dgnc_mbuf function. > > Signed-off-by: Lidza Louina > --- > drivers/staging/dgnc/dgnc_driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) As we c

[PATCH] staging: et131x: Remove frame error TODO item

2013-08-20 Thread Mark Einon
After prolonged testing for a few days of normal use with new et131x hardware, I've concluded that this was a hardware issue with the older hardware I had. Removing this item from the TODO. Signed-off-by: Mark Einon --- drivers/staging/et131x/README |1 - 1 file changed, 1 deletion(-) diff

[PATCH v2 2/2] staging: dgnc: removes ifdef HAVE_UNLOCKED_IOCTL conditionals

2013-08-20 Thread Lidza Louina
This patch removes the HAVE_UNLOCKED_IOCTL conditional statements from driver.c, mgmt.c and mgmt.h. This was used to support older kernels. It isn't needed now. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 4 drivers/staging/dgnc/dgnc_mgmt.c | 7 +-- drivers/st

[PATCH v2 1/2] staging: dgnc: driver.c: fixes warning about assigning pointer

2013-08-20 Thread Lidza Louina
This patch fixes a warning associated with assigining a pointer in the dgnc_mbuf function. Signed-off-by: Lidza Louina --- drivers/staging/dgnc/dgnc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver

Re: [PATCH] staging: dgnc: mgmt.c: removes unused variable

2013-08-20 Thread Lidza Louina
On Tue, Aug 20, 2013 at 4:48 AM, Dan Carpenter wrote: > The ifdef here is to support older kernels which don't have the > the ->unlocked_ioctl function pointer. We don't care about older > kernels so we could delete the #else side of this and remove the > #ifdef. > > You can do that in a later pa

[PATCH v2] staging: comedi: pcmmio: remove unneeded checks on detach

2013-08-20 Thread Ian Abbott
As pointed out by Dan carpenter for the similar pcmuio driver, there is no need to check the pointer passed to `kfree()`, so remove that check from `pcmmio_detach()`. Also, check the `devpriv` (`dev->private`) pointer once, outside the `for` loop. Signed-off-by: Ian Abbott Cc: Dan Carpenter ---

Re: [PATCH] staging: comedi: pcmmio: fix possible NULL deref on detach

2013-08-20 Thread Ian Abbott
On 2013-08-20 11:50, Ian Abbott wrote: pcmmio_detach is called by the comedi core even if pcmmio_attach() returned an error, so `dev->private` might be `NULL`. Check for that before dereferencing it. Also, as pointed out by Dan carpenter for the similar pcmuio driver, there is no need to check

Re: BUG: scheduling while atomic 3.10.7 in ZRAM Swap

2013-08-20 Thread Mitch Harder
On Sun, Aug 18, 2013 at 11:44 PM, Minchan Kim wrote: > Hello, > > On Mon, Aug 19, 2013 at 12:13:02PM +0800, Michael wang wrote: >> Hi, Mitch >> >> On 08/17/2013 10:01 PM, Mitch Harder wrote: >> > I'm encountering a BUG while using a ZRAM Swap device. >> > >> > The call trace seems to involve the c

[PATCH] Staging: olpc_dcon: Removed more completed TODO entries

2013-08-20 Thread Jens Frederich
1. Console event notifier support: No one I've asked knows what this all about. 2. Audit code for unnecessary code: This is done. 3. Verify sane i2cAPI usage: This is also done. Signed-off-by: Jens Frederich diff --git a/drivers/staging/olpc_dcon/TODO b/drivers/staging/olpc_dcon/TODO index 88539

[PATCH] staging: lustre: Fix typo in lustre/include

2013-08-20 Thread Masanari Iida
Fix spelling typo in comments within lustre/include/linux. Signed-off-by: Masanari Iida --- drivers/staging/lustre/include/linux/libcfs/libcfs_crypto.h| 8 drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_priva

[PATCH] staging: comedi: pcmmio: fix possible NULL deref on detach

2013-08-20 Thread Ian Abbott
pcmmio_detach is called by the comedi core even if pcmmio_attach() returned an error, so `dev->private` might be `NULL`. Check for that before dereferencing it. Also, as pointed out by Dan carpenter for the similar pcmuio driver, there is no need to check the pointer passed to `kfree()`, so remov

[PATCH] staging: comedi: pcmuio: fix possible NULL deref on detach

2013-08-20 Thread Ian Abbott
pcmuio_detach() is called by the comedi core even if pcmuio_attach() returned an error, so `dev->private` might be `NULL`. Check for that before dereferencing it. Also, as pointed out by Dan Carpenter, there is no need to check the pointer passed to `kfree()` is non-NULL, so remove that check. S

Re: [patch] staging: comedi: usbdux: allocating too much data

2013-08-20 Thread Ian Abbott
On 2013-08-20 10:06, Dan Carpenter wrote: We only need to allocate enough space for a pointer. We allocate the space for the urbs themselves with the call to usb_alloc_urb() a few lines later. Signed-off-by: Dan Carpenter --- Untested. diff --git a/drivers/staging/comedi/drivers/usbdux.c b/d

Re: [patch] staging: comedi: pcmuio: remove an unneeded check

2013-08-20 Thread Dan Carpenter
On Tue, Aug 20, 2013 at 11:02:45AM +0100, Ian Abbott wrote: > On 2013-08-20 10:00, Dan Carpenter wrote: > >"devpriv" is non-NULL at this point. We dereference it earlier in the > >function and the inconsistent checking upsets static checkers. We don't > >need to check "devpriv->sprivs" because kf

Re: [patch] staging: comedi: pcmuio: remove an unneeded check

2013-08-20 Thread Ian Abbott
On 2013-08-20 10:00, Dan Carpenter wrote: "devpriv" is non-NULL at this point. We dereference it earlier in the function and the inconsistent checking upsets static checkers. We don't need to check "devpriv->sprivs" because kfree() accepts NULL pointers. Signed-off-by: Dan Carpenter diff --g

Re: [patch] staging: comedi: dt282x: dt282x_ai_insn_read() always fails

2013-08-20 Thread Ian Abbott
On 2013-08-20 09:57, Dan Carpenter wrote: In dt282x_ai_insn_read() we call this macro like: wait_for(!mux_busy(), comedi_error(dev, "timeout\n"); return -ETIME;); Because the if statement doesn't have curly braces it means we always return -ETIME and the function never succeeds. Signed-off-by: D

Re: [PATCH v3 0/6] MFD patches for Realtek cardreader

2013-08-20 Thread Samuel Ortiz
Hi Wei, On Tue, Aug 20, 2013 at 02:18:50PM +0800, wei_w...@realsil.com.cn wrote: > From: Wei WANG > > v3: > Seperate copyright changes to a distinct patch > Modify some coding style and naming style > Fix a bug that sd30_drive_sel would be assigned a wrong value, in rts5227 and > rts5249 > > v

[patch] staging: comedi: usbdux: allocating too much data

2013-08-20 Thread Dan Carpenter
We only need to allocate enough space for a pointer. We allocate the space for the urbs themselves with the call to usb_alloc_urb() a few lines later. Signed-off-by: Dan Carpenter --- Untested. diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index

[patch] staging: comedi: pcmuio: remove an unneeded check

2013-08-20 Thread Dan Carpenter
"devpriv" is non-NULL at this point. We dereference it earlier in the function and the inconsistent checking upsets static checkers. We don't need to check "devpriv->sprivs" because kfree() accepts NULL pointers. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/comedi/drivers/pcmuio.c

[patch] staging: comedi: dt282x: dt282x_ai_insn_read() always fails

2013-08-20 Thread Dan Carpenter
In dt282x_ai_insn_read() we call this macro like: wait_for(!mux_busy(), comedi_error(dev, "timeout\n"); return -ETIME;); Because the if statement doesn't have curly braces it means we always return -ETIME and the function never succeeds. Signed-off-by: Dan Carpenter --- This macro is very ugly, b

Re: [PATCH] staging: dgnc: mgmt.c: removes unused variable

2013-08-20 Thread Dan Carpenter
On Tue, Aug 20, 2013 at 12:19:38AM -0400, Lidza Louina wrote: > This patch removes the inode variable from the > dgnc_mgmt_ioctl function. It's never used in the > function. > > Signed-off-by: Lidza Louina > --- > drivers/staging/dgnc/dgnc_mgmt.c | 1 - > 1 file changed, 1 deletion(-) > > diff

Re: [PATCH] staging: dgnc: driver.c: fixes warning about assigning pointer

2013-08-20 Thread Dan Carpenter
On Tue, Aug 20, 2013 at 12:18:10AM -0400, Lidza Louina wrote: > This patch fixes a warning associated with assigining > a pointer in the dgnc_mbuf function. > > Signed-off-by: Lidza Louina > --- > drivers/staging/dgnc/dgnc_driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

Re: [PATCH] LMK: Optimize lowmem_shrink

2013-08-20 Thread Dan Carpenter
On Tue, Aug 20, 2013 at 09:16:33AM +0800, Leon Ma wrote: > From: Leon Ma > Date: Mon, 19 Aug 2013 14:22:38 +0800 > Subject: [PATCH] LMK: Optimize lowmem_shrink. > > By comparing with selected_oom_score_adj instead of min_score_adj, > we may do less calculation. > The patch is line wrapped and d