[patch] gpiolib: unlock on error in gpio_export()

2012-10-26 Thread Dan Carpenter
We need to unlock here before returning. Signed-off-by: Dan Carpenter --- Only needed in linux-next. diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index d5f9742..14251c3 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -728,7 +728,8 @@ int gpio_export(unsigned

[patch] mei: copy_from_user() doesn't return an error code

2012-10-26 Thread Dan Carpenter
copy_from_user() returns the number of bytes remaining but we should be returning -EFAULT here. Signed-off-by: Dan Carpenter --- Only needed in linux-next. diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index ed4943f..ce1014e 100644 --- a/drivers/misc/mei/main.c +++ b/drivers

Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-01 Thread Dan Carpenter
On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > fix for macro coding style. > No. The parenthesis are not needed. I assume this is a checkpatch.pl warning? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Dan Carpenter
On Fri, Nov 02, 2012 at 12:36:30AM -0700, Kumar amit mehta wrote: > On Fri, Nov 02, 2012 at 09:55:55AM +0300, Dan Carpenter wrote: > > On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > > > fix for macro coding style. > > > > > > > No. Th

Re: [patch] power: battery: pointer math issue in gab_probe()

2012-11-05 Thread Dan Carpenter
On Mon, Nov 05, 2012 at 09:34:21PM +0900, anish kumar wrote: > Hello Dan, > > Is this patch of yours picked up by anyone? David this should go through you? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

[patch 1/2] [SCSI] ipr: missing unlock before a return

2012-07-30 Thread Dan Carpenter
We recently changed the locking in this function, but this return was missed. It needs an unlock and the IRQs need to be restored. Signed-off-by: Dan Carpenter --- Applies to linux-next. diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 07b14ba..7a5ccb2c 100644 --- a/drivers/scsi

[patch 2/2] [SCSI] ipr: remove an unneeded check

2012-07-30 Thread Dan Carpenter
"rc" is always zero here, so there is no need to check. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 7a5ccb2c..fc49f17 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -5847,7 +5847,7 @@ static int ipr_queuecommand(struct Scsi_H

Re: [PATCH NEXT v2]staging: tidspbridge: Fix typos.

2012-07-30 Thread Dan Carpenter
is released. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: mm: frontswap: fix a wrong if condition in frontswap_shrink

2012-09-21 Thread Dan Carpenter
_pages, > if (total_pages <= target_pages) { > /* Nothing to do */ > *pages_to_unuse = 0; > - return 0; > + return 1; > } This function used to return 0 or an error code. Could we add a comment at the top saying what the return va

re: memstick: add support for legacy memorysticks

2012-09-21 Thread Dan Carpenter
ero. The comments at the top of the function don't talk about if a 1 means the same and 0 means different or if it's the other way around. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to ma

Re: memstick: add support for legacy memorysticks

2012-09-21 Thread Dan Carpenter
msb_ftl_scan() warn: possible memory leak of 'overwrite_flags' regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Pl

Re: WARNING: at block/genhd.c:1570 disk_clear_events+0xbf/0xd0()

2012-09-23 Thread Dan Carpenter
Hi, I have created a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=47871 Please add the following information: *) Last known good kernel version *) Current broken kernel version *) Complete dmesg regards, dan carpenter -- To unsubscribe from this list: send the line "unsubs

Re: kexec/kdump kernel fails to start

2012-09-23 Thread Dan Carpenter
t; There was some attempt to fix this: > https://patchwork.kernel.org/patch/1195751/ > > but for some reason it is not accepted. I filed a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=47881 Is it fixed now? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Freeze or Oops on recent kernels

2012-09-23 Thread Dan Carpenter
file a bug report and attach the .jpg. regards, dan carpenter On Fri, Sep 07, 2012 at 09:24:13PM +1000, yvahk-xre...@zacglen.net wrote: > > I am getting either a a kernel Oops or freeze (without any console output) > on recent kernels. I have tested on 2.6.32.26 PAE, 3.1.9 PAE, and 3.4.9 PAE

Re: Freeze or Oops on recent kernels

2012-09-24 Thread Dan Carpenter
motherboard only. > > Exact same type of oops also happens with a PCIe RS232 serial card. > There is not enough information here for us to help you. Sorry. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messa

Re: iwl3945: order 5 allocation during ifconfig up; vm problem?

2012-09-24 Thread Dan Carpenter
fi/iwl-drv.c > > > > > > iwl_alloc_ucode() -> iwl_alloc_fw_desc() -> dma_alloc_coherent() I'm filing bugzilla entries for regressions. What's the status on this? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Suspend on Thinkpad x220: Hangs during resume

2012-09-24 Thread Dan Carpenter
Hi, I have created a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=47901 Please add the following information: *) Last known good kernel version *) Current broken kernel version *) Complete dmesg regards, dan carpenter -- To unsubscribe from this list: send the line "unsubs

Re: hot-added cpu is not asiggned to the correct node

2012-09-24 Thread Dan Carpenter
t working kernel? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] Staging:bcm: fix coding style issue in Bcmchar.c

2012-09-24 Thread Dan Carpenter
ro. It's better to leave the warnings in for now. checkpatch.pl is not the king of us. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel

Re: [PATCH 2/3] Staging:bcm: fix coding style error in InterfaceIsr.c

2012-09-24 Thread Dan Carpenter
uspending the device"); Don't break those string literals up across multiple lines, but if you do then you need to add quotes. "Interrupt call back is called" ^ "while suspending the device"); ^

Re: [PATCH 3/3] Staging:bcm: fix coding style error in InterfaceIsr.c

2012-09-24 Thread Dan Carpenter
ode. You've silenced the warning. The code still looks like dog vommit, but now checkpatch doesn't find it. Don't do that. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kern

Re: [PATCH 5/5] Staging:bcm: fix coding style error in InterfacerTx.c

2012-09-24 Thread Dan Carpenter
/3] [patch 3/3] [patch 4/4] [patch 5/5]... Write your patches. Wait over night. Review it the next morning. Email it. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

[patch 1/3] remoteproc: memory leak in rproc_handle_carveout()

2012-09-25 Thread Dan Carpenter
We only need to allocate mapping if there is an rproc domain. Signed-off-by: Dan Carpenter --- Static checker stuff. Handle with appropriate caution. diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index b6c6229..f163704 100644 --- a/drivers/remoteproc

[patch 2/3] remoteproc: snprintf() can return more than was printed

2012-09-25 Thread Dan Carpenter
printed. Signed-off-by: Dan Carpenter diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 10a3825..ea90a56 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -82,7 +82,7 @@ static ssize_t

[patch 3/3] remoteproc: return -EFAULT on copy_from_user failure

2012-09-25 Thread Dan Carpenter
copy_from_user() returns the number of bytes remaining to be copied, but we want to return an error code here. Signed-off-by: Dan Carpenter diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index ea90a56..157a573 100644 --- a/drivers/remoteproc

Re: WARNING: at kernel/workqueue.c:1066 try_to_grab_pending

2012-09-25 Thread Dan Carpenter
Added Tejun to the CC list. regards, dan carpenter On Fri, Sep 14, 2012 at 02:07:24AM +, Jongman Heo wrote: > > Hi Guys, > > I hit this warning with current linus + for-next branch of wq.git, running > Fedora 17 on VMWare linux guest. > > [89449.738642] -

Re: kernel BUG at fs/buffer.c:3205 (stable 3.5.3)

2012-09-25 Thread Dan Carpenter
Did any of the old kernels work? Have you ruled out bad hardware? If the answers to both questions are yes then it makes your email harder to ignore. In which case, we'd probably want the complete dmesg. The USB mailing list is linux-...@vger.kernel.org. regards, dan carpenter

Re: w/ current kernel (3.5.3) I need 2 attempts for s2disk in a row

2012-09-25 Thread Dan Carpenter
Hi, I have created a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=47931 Please add the following information: *) Last known good kernel version *) Complete dmesg regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: Backlight control broken between 3.6.0-rc1 and 3.6.0-rc4

2012-09-25 Thread Dan Carpenter
Please add the following information: *) Complete dmesg *) lsmod, working and non-working *) .config regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel

Re: [PATCH] staging/gdm72xx: coding style fixes gdm_qos.c

2012-09-25 Thread Dan Carpenter
ust replace the dprintk macros instead of prettifying them. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Ple

Re: [PATCH] staging: sbe-2t3e3: fix error handling in t3e3_init_channel()

2012-09-25 Thread Dan Carpenter
inuxtesting.org). > > Signed-off-by: Alexey Khoroshilov Looks good. Reviewed-by: Dan Carpenter regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at h

re: Thermal: Update binding logic based on platform data

2012-09-25 Thread Dan Carpenter
tex:&thermal_list_lock: locked (256) unlocked (268) drivers/thermal/thermal_sys.c:396 update_temperature() warn: inconsistent returns mutex:&tz->lock: locked (390) unlocked (396) regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in th

Re: [PATCH] staging:vt6656: Fix tabs error in 80211mgr.c

2012-09-25 Thread Dan Carpenter
+ > + WLAN_REASSOCREQ_OFF_CAP_INFO); > pFrame->pwListenInterval = > (PWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) > - + WLAN_REASSOCREQ_OFF_LISTEN_INT); > +

Re: radeon: Regression between v3.6-rc4 and v3.6-rc6: unable to allocate a PPLL

2012-09-26 Thread Dan Carpenter
This is fixed now? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Thermal: Update binding logic based on platform data

2012-09-26 Thread Dan Carpenter
On Wed, Sep 26, 2012 at 02:39:22PM +, R, Durgadoss wrote: > Hi, > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Wednesday, September 26, 2012 1:58 AM > > To: R, Durgadoss > > Cc: Zhang, Rui; linux-ke

Smatch 1.57 released

2012-10-31 Thread Dan Carpenter
with all the warnings. Or alternatively if you just want to check one file then the command is: ~/progs/smatch/devel/smatch_scripts/kchecker drivers/file.c regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a me

Re: [patch] xfs: check for underflow in xfs_iformat_fork()

2013-08-26 Thread Dan Carpenter
g 15, 2013 at 06:10:43PM +0800, Jeff Liu wrote: > > > > On 08/15/2013 01:53 PM, Dan Carpenter wrote: > > > > > > > > > The "di_size" variable comes from the disk and it's a signed 64 bit. > > > > > We check the upper

[patch] clk: vt8500: several forever loops

2013-08-26 Thread Dan Carpenter
This does a bunch of looping like this: for (div2 = 7; div2 >= 0; div2--) But unsigned values are always greater than or equal to zero so it just loops and loops. Really "mul", "div1" and "div2" should all be declared as int for cleanliness sa

[patch] pinctrl: abx500: fix bitwise AND test

2013-08-26 Thread Dan Carpenter
The intent here was to test if the bit was set or not but there is a logical vs bitwise AND typo so it is true if any bits are set. Signed-off-by: Dan Carpenter --- I can't compile this. diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 1d3f988..9a

Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters

2013-08-26 Thread Dan Carpenter
iqcal_image_q*iqcal_image_q)*factor; Don't resend, eventually, someone will have to fix these across the whole driver but this should be: pwr_image = (iqcal_image_i * iqcal_image_i + iqcal_image_q * iqcal_image_q) * factor; I've changed the a

Re: [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters

2013-08-26 Thread Dan Carpenter
(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242} > }; > > -/* > == > */ > +/* = > */ Just

Re: [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters

2013-08-26 Thread Dan Carpenter
f); It's always a bit hard for me to know how picky to be. Normally the '|' would be on the first line here. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters

2013-08-26 Thread Dan Carpenter
struct chan_info channel) These should be aligned like this: static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info channel) { regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&q

Re: [PATCH 00/24] Staging: winbond: Fixed some coding style issues

2013-08-26 Thread Dan Carpenter
Btw, all the white space nit-pick I pointed out were pretty minor. I don't like making people redo stuff so you can fix anything you want to in later patches. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a me

Re: [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth

2013-08-27 Thread Dan Carpenter
On Tue, Aug 27, 2013 at 04:53:40PM +0100, Rupesh Gujare wrote: > Increase ISOC IN buffer depth to 100 units. > This change log is not useful. What are the user visible effects of this bug? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-ker

Re: [PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-28 Thread Dan Carpenter
ons which calls this function. > This phatch also correct those calls in xhci driver. > > Signed-off-by: Kumar Gaurav > --- Could you put a list of changes since v2 here?: v3: blah blah changelog mostly. Also this doesn't apply for me against linux-next. regards, dan carpen

Re: [PATCH 33/35] power: use dev_get_platdata()

2013-08-28 Thread Dan Carpenter
He doesn't want to take the patch. He's the maintainer so it's his choice. That's the end of the story. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.or

Re: [PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-28 Thread Dan Carpenter
On Wed, Aug 28, 2013 at 08:39:06PM +0530, Kumar Gaurav wrote: > On Wednesday 28 August 2013 12:43 PM, Dan Carpenter wrote: > >On Mon, Aug 26, 2013 at 07:38:57AM +0530, Kumar Gaurav wrote: > >>This patch redefine function xhci_readl.xhci_readl function doesn't use > >

Re: [PATCH] Staging: android: binder.c: Fixed 80 characters warnings from checkpatch.pl

2013-10-02 Thread Dan Carpenter
On Tue, Oct 01, 2013 at 09:39:48PM -0400, Mathieu Rhéaume wrote: > Fixed a lot of warnings from checkpatch.pl about the 80 characters per line > limitation. > The code was better in the original, sorry. Also this doesn't apply to linux-next from Friday. regards, dan ca

Re: [PATCH] Staging : android: binder.c: Prefer seq_puts to seq_printf

2013-10-02 Thread Dan Carpenter
7;t compile. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3] Staging : android: binder.c: Prefer seq_puts to seq_printf

2013-10-02 Thread Dan Carpenter
> It fixes the warnings emitted by checkpatch.pl. Checkpatch.pl is wrong here and this doesn't compile. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
ret = -ENODEV; > + goto cleanup; Just return -ENODEV; > + } > + return 0; > + > +cleanup: > + return ret; > +} > + > +static int hv_kbd_probe(struct hv_device *device, > + const struct hv_vmbus_device_id *dev

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
"bytes_recvd". It's not complicated. If you have a different place where the guest does this then tell me which function to look at. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
Just roll something like the following into your patch. regards, dan carpenter diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c index 0d4625f..262721b 100644 --- a/drivers/input/serio/hyperv-keyboard.c +++ b/drivers/input/serio/hyperv-keyboard.c

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
Look at the function vmbus_recvpacket_raw() in > drivers/hv/channel.c. > I'm confused. There is no mention of ->offset8 in vmbus_recvpacket_raw(). It's a good idea to add a check there but the lower levels don't know about the sizeof(synth_kbd_protocol_response) so we would stil

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-16 Thread Dan Carpenter
On Mon, Sep 16, 2013 at 04:49:29PM -0400, Joseph Salisbury wrote: > On 09/16/2013 04:38 PM, Dan Carpenter wrote: > > On Mon, Sep 16, 2013 at 01:42:35PM -0400, Joseph Salisbury wrote: > >> Reverting the patch changes the driver back to useing kzalloc() and > >> memcpy()

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-16 Thread Dan Carpenter
one now and will provide the results. The two bugs are the same it's that the code has shifted a little. Mark the commit as buggy and continue with the git bisect. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
On Mon, Sep 16, 2013 at 09:55:44PM +, KY Srinivasan wrote: > > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Monday, September 16, 2013 1:13 PM > > To: KY Srinivasan > > Cc: o...@aepfle.de; gre...@linu

Re: staging: Add dm-writeboost

2013-09-16 Thread Dan Carpenter
On Mon, Sep 16, 2013 at 05:53:57PM -0400, Mike Snitzer wrote: > - variable names need to be a bit more verbose (arr => array) "struct array " is a horrible name. :P Please don't use either "arr" or "array". regards, dan carpenter -- To unsubscribe f

Re: [PATCH] Staging: bcm: PHSModule.c: Matching the function definition with function declaration

2013-09-17 Thread Dan Carpenter
ne with the diffstat. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 15/24] Staging: winbond: reg: seventh of the patches that fixes lines over 80 characters

2013-09-17 Thread Dan Carpenter
r ( | ) at the start of new line or at the end of each line. People > has its own preference but here you have used both style in single file. > Just a suggestion. > Put the '|' character at the end of the line. That's the New Unwritten Style Guidelines. Most of the kerne

[patch] pinctrl: remove an unnecessary cast

2013-09-17 Thread Dan Carpenter
sizeof() is already size_t so there is no need to cast here. Generally, casting inside the min() macro instead of using min_t() is considered bad style. Signed-off-by: Dan Carpenter diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index a138965..abe66d4 100644 --- a/drivers

Re: [PATCH 0/2] vsprintf: ignore %n again

2013-09-18 Thread Dan Carpenter
Sure. There are a lot of non-const strings though. diff --git a/include/linux/printk.h b/include/linux/printk.h index e6131a78..317587b 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -122,6 +122,11 @@ asmlinkage int printk_emit(int facility, int level, asmlinkage __printf(

Re: [PATCH 0/2] vsprintf: ignore %n again

2013-09-18 Thread Dan Carpenter
On Wed, Sep 18, 2013 at 05:11:04PM +0300, Dan Carpenter wrote: > asmlinkage __printf(1, 2) __cold > int printk(const char *fmt, ...); > +#define printk(fmt, ...) do { \ > + compiletime_assert(__builtin_constant_p(fmt), \ > +

Re: [PATCH] staging: usbip: Fix build on Debian ppc

2013-09-19 Thread Dan Carpenter
about? "find -name vhch_hcd.c" doesn't show anything. What the error message? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] staging: usbip: Fix build on Debian ppc

2013-09-19 Thread Dan Carpenter
Ah, ok. I had no idea what you were talking about before. I thought you were talking about build errors in a file that didn't exist... (Because the subject says "build" and there was a typo in the file name). Navin, says you can remove it. regards, dan carpenter -- To unsubs

Re: [PATCH 7/10] staging: r8188eu: Add files for new drive: Cocci spatch "noderef"

2013-09-20 Thread Dan Carpenter
tart, &psd_stop); > } > > - _rtw_memset(data, '\0', sizeof(data)); > + _rtw_memset(data, '\0', sizeof(*data)); I think your fix is correct but it would be better to remove the memset and do: data[0] = '\0'; "data" is a u8

Re: [PATCH 9/10] staging: r8188eu: Cocci spatch "noderef"

2013-09-20 Thread Dan Carpenter
p(extra, "stop", 4); > sscanf(extra, "count =%d, pkt", &count); > > - _rtw_memset(extra, '\0', sizeof(extra)); > + _rtw_memset(extra, '\0', sizeof(*extra)); Do: extra[0] = '\0'; regards, dan carpe

[patch] perf: potential underflow in perf_sample_ustack_size()

2013-09-20 Thread Dan Carpenter
with underflow doing the subtraction and end up with a "stack_size" larger than intended. I don't know perf well enough to say if this is possible. Signed-off-by: Dan Carpenter diff --git a/kernel/events/core.c b/kernel/events/core.c index dd236b6..eec9e683 100644 --- a/kernel/

Re: [PATCH] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread Dan Carpenter
view this change? What happened to 0xFE46? What are all these magic numbers? I understand that this fixes an issue for think pads but does it break something else? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messa

Re: [PATCH] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-05 Thread Dan Carpenter
On Thu, Sep 05, 2013 at 07:16:50PM +0800, wwang wrote: > 于 2013年09月05日 18:48, Dan Carpenter 写道: > >On Thu, Sep 05, 2013 at 05:45:38PM +0800, wei_w...@realsil.com.cn wrote: > >>From: Wei WANG > >> > >>In some platforms, specially Thinkpad series, rts5249 won&

Re: drivers/staging/bcm/InterfaceMisc.c-checkpatch cleanup-(foo*)->(foo *)

2013-09-05 Thread Dan Carpenter
taging: bcm: white space complaint with casting Put the exact complaint in the body of the email. Add a blank line before the Signed-off-by line. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vg

Re: drivers/staging/bcm/InterfaceMisc.c-checkpatch cleanup-(foo*)->(foo *)

2013-09-05 Thread Dan Carpenter
On Thu, Sep 05, 2013 at 07:32:16PM +0300, Dan Carpenter wrote: > Please send this instead of as an attachment. Send this *inline* I meant. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ke

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage

2013-09-09 Thread Dan Carpenter
> > + if (zram->slot_free_rq) > > > + handle_pending_slot_free(zram); > > > + > > > > Calling handle_pending_slot_free() without holding zram->lock? > > That's racy. > > sorry, my bad. it should take down_write() lock. > O

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-09 Thread Dan Carpenter
code, but the original looks like it makes sense but in this one it looks like the locks are duplicative. Is the down_read() in the original code be changed to down_write()? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 2/2] staging: zram: remove init_done from zram struct (v2)

2013-09-09 Thread Dan Carpenter
am_reset_device(). There should be a check for init_done() in zram_slot_free_notify() otherwise we could add more work at the same time we are calling flush_work(). It should be that as soon as we start to reset then we say init is not done, we stop loading more work, we any existing work and th

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-09 Thread Dan Carpenter
ch this kind of bug next time. 3) Explain why it is safe to test zram->slot_free_rq when we are not holding the lock. I think it is unsafe. I don't want to even think about it without the numbers. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-09 Thread Dan Carpenter
ic pointer test, which is either NULL or !NULL. > That's not how concurency works. Atomic types are complicated than that. Anyway, the zram maintainers don't need me to explain that to them so I'll let them take over from here. regards, dan carpenter -- To unsubscribe from this

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-10 Thread Dan Carpenter
Btw, the de...@driverdev.osuosl.org list seems to be down again. I still have not recieved the v3 patch. Use the driverdev-de...@linuxdriverproject.org email list instead. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH 1/3] staging: usbip: stub_main: correctly handle return value

2013-09-10 Thread Dan Carpenter
quot; is better than "if (ret)". Some subsystems have a preference but most don't care. It's up to the maintainer to choose. Your patch is fine, but the changelog is misleading. It should just say "I prefer the other style" instead of "This code is wrong and has buggy

Re: [PATCH 1/1] staging/speakup/kobjects.c: Code improvement.

2013-09-10 Thread Dan Carpenter
array. 208 } I guess that's simple enough to fix but why is the caller using "input" instead of "val"? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.k

[patch -resend] cpqarray: info leak in ida_locked_ioctl()

2013-09-11 Thread Dan Carpenter
The pciinfo struct has a two byte hole after ->dev_fn so stack information could be leaked to the user. This was assigned CVE-2013-2147. Signed-off-by: Dan Carpenter diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 639d26b..2b94403 100644 --- a/drivers/block/cpqarra

[patch -resend] cciss: info leak in cciss_ioctl32_passthru()

2013-09-11 Thread Dan Carpenter
The arg64 struct has a hole after ->buf_size which isn't cleared. Or if any of the calls to copy_from_user() fail then that would cause an information leak as well. This was assigned CVE-2013-2147. Signed-off-by: Dan Carpenter diff --git a/drivers/block/cciss.c b/drivers/block/cciss

Re: [PATCH 1/1] staging/speakup/kobjects.c: Code improvement.

2013-09-11 Thread Dan Carpenter
ight now so nothing is going to be applied for a couple weeks. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] staging: dgnc: fix potential format string flaw

2013-09-11 Thread Dan Carpenter
hopefully it can't actually write to memory. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] staging: dgnc: fix potential format string flaw

2013-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2013 at 11:19:11AM -0700, Kees Cook wrote: > On Wed, Sep 11, 2013 at 2:31 AM, Dan Carpenter > wrote: > > On Tue, Sep 10, 2013 at 10:19:17PM -0700, Kees Cook wrote: > >> In the former case, format characters will get processed by the > >> sprintf

Re: [PATCH] staging: dgnc: fix potential format string flaw

2013-09-11 Thread Dan Carpenter
> * %n is ignored Really it should trigger a WARN_ON_ONCE(). There is code like show_console_dev() which relies on it to work. If we ignore %n it causes another bug. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-12 Thread Dan Carpenter
and saw that it wasn't being ignored since 2009. Kees has been fixing format strings bugs in the past few months and there are probably other out of tree drivers where this bug is still exploitable. It's quite serious. regards, dan carpenter -- To unsubscribe from this list: send

Re: [PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect()

2013-09-12 Thread Dan Carpenter
e code. If you already fixed it then what's the URL or the subject of your email so we can look for it in our inbox. Give us a clue here. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord.

Re: Smatch messages that are not understood

2013-09-12 Thread Dan Carpenter
last_2bytes(fold) == 0; 277 278 fold |= zap_last_2bytes((*(unsigned long *)(addr1 + 4)) ^ 279 (*(unsigned long *)(addr2 + 4))); It's hitting the (sizeof(fold) == 8) and returning. regards, dan carpenter -- To unsubscribe from this list: send the line &qu

[patch 1/4] skd: use regular version of copy_from_user()

2013-09-13 Thread Dan Carpenter
The other __copy_from_user() calls have access_ok() checks so they are fine, but these two don't have the check. Signed-off-by: Dan Carpenter diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 6fc0296..dfd05a9 100644 --- a/drivers/block/skd_main.c +++ b/drivers/

[patch 2/4] skd: use after free bugs in debug code

2013-09-13 Thread Dan Carpenter
We've freed "skdev" but the debug code dereferences it. I've just removed the printk() entirely. Signed-off-by: Dan Carpenter diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index dfd05a9..f892d95 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/s

[patch 3/4] skd: use strncpy() as a cleanup

2013-09-13 Thread Dan Carpenter
The code here is copying the version to inq.driver_version but we don't want it to be NUL terminated. Instead we pad the rest of the array with spaces. It's fewer lines to use strncpy() and maybe a little nicer. Signed-off-by: Dan Carpenter diff --git a/drivers/block/skd_main.c

[patch 4/4] skd: remove unneeded NULL check

2013-09-13 Thread Dan Carpenter
We already dereferenced "skdev" a few lines earlier in the debug code so my static checker complains. I audited the callers and "skdev" is never NULL here so I have removed the check. Signed-off-by: Dan Carpenter diff --git a/drivers/block/skd_main.c b/drivers/block/skd_

[patch] staging: line6: add bounds check in snd_toneport_source_put()

2013-09-13 Thread Dan Carpenter
"source" comes from the user in snd_ctl_elem_write() so it needs to be checked. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c index 2f44d56..776d363 100644 --- a/drivers/staging/line6/toneport.c +++ b/drivers/sta

[patch 3/4 v2] skd: use memcpy() as a cleanup

2013-09-13 Thread Dan Carpenter
The code here is copying the version to inq.driver_version but we don't want it to be NUL terminated. Instead we pad the rest of the array with spaces. It's fewer lines to use memcpy() and maybe a little nicer. Signed-off-by: Dan Carpenter --- v2: use memcpy() instead of strncpy()

Re: [patch 3/4] skd: use strncpy() as a cleanup

2013-09-13 Thread Dan Carpenter
On Fri, Sep 13, 2013 at 02:03:23PM +0200, Geert Uytterhoeven wrote: > On Fri, Sep 13, 2013 at 10:05 AM, Dan Carpenter > > + strncpy(inq.driver_version, DRV_VER_COMPL, > > + min(sizeof(inq.driver_version), strlen(DRV_VER_COMPL))); > > This does the exact

[patch 1/2] staging: rtl8188eu: off by one in rtw_set_802_11_add_wep()

2013-08-29 Thread Dan Carpenter
"keyid" is used as an offset into the ->dot11DefKey[] array. The array has 4 elements. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index 9e12774..5fab477 100644 --- a/drivers/staging/r

Re: [PATCH] Staging:BCM:DDRInit.c:Renaming __FUNCTION__

2013-08-31 Thread Dan Carpenter
it needs to be mentioned in the changelog. Except in this case the original message was correct and the new message is wrong. W stands for "write" and R stands for "read". regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&quo

Re: [PATCH] staging: android/timed_output: Create 'enable' attribute automatically

2013-08-31 Thread Dan Carpenter
en the > udev event announcing device registration is generated. > > Signed-off-by: Guenter Roeck This patch has a bug so it was replaced by a v2 patch in a later thread. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&qu

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