Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread Dan Carpenter
On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: > It seems, our kernel still stick to treate 'pack' region have effect > with both 'align' and 'sizeof'. > It's not about packed regions. It's about unions. It's saying the sizeof() a union is a multiple of 4 unless it's packed. union

Re: [PATCH] drivers:staging:tl8821ae Fixed the size of array to macro

2014-02-03 Thread Dan Carpenter
On Sat, Feb 01, 2014 at 03:43:27PM -0800, Surendra Patil wrote: > Changed array size from "bb_swing_idx_ofdm[2]" to > "bb_swing_idx_ofdm[MAX_RF_PATH]" > as discussed on thread - https://lkml.org/lkml/2014/2/1/75 > Changelog sucks. We don't want to have to follow the link. Add a Reported-by: Li

Re: [PATCH] staging: r8188eu: Fix typo in USB_DEVICE list

2014-02-03 Thread Dan Carpenter
On Sun, Feb 02, 2014 at 02:07:06PM -0600, Larry Finger wrote: > There is a typo in the device list that interchanges the vendor and > product codes for one of the entries. > > Signed-off-by: Larry Finger > --- > drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- > 1 file changed, 1 insertion(+)

Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread Chen Gang
On 02/03/2014 04:58 PM, Dan Carpenter wrote: > On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: >> It seems, our kernel still stick to treate 'pack' region have effect >> with both 'align' and 'sizeof'. >> > > It's not about packed regions. It's about unions. It's saying the > sizeof()

RE: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread David Laight
From: Dan Carpenter > On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: > > It seems, our kernel still stick to treate 'pack' region have effect > > with both 'align' and 'sizeof'. > > It's not about packed regions. It's about unions. It's saying the > sizeof() a union is a multiple of

Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread James Hogan
On 03/02/14 10:05, David Laight wrote: > From: Dan Carpenter >> On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: >>> It seems, our kernel still stick to treate 'pack' region have effect >>> with both 'align' and 'sizeof'. >> >> It's not about packed regions. It's about unions. It's sayi

Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread Chen Gang
On 02/03/2014 06:05 PM, David Laight wrote: > From: Dan Carpenter >> On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: >>> It seems, our kernel still stick to treate 'pack' region have effect >>> with both 'align' and 'sizeof'. >> >> It's not about packed regions. It's about unions. It's

Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread Chen Gang
On 02/03/2014 06:22 PM, James Hogan wrote: > On 03/02/14 10:05, David Laight wrote: >> From: Dan Carpenter >>> On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: It seems, our kernel still stick to treate 'pack' region have effect with both 'align' and 'sizeof'. >>> >>> It's not a

RE: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread David Laight
From: James Hogan > On 03/02/14 10:05, David Laight wrote: > > From: Dan Carpenter > >> On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: > >>> It seems, our kernel still stick to treate 'pack' region have effect > >>> with both 'align' and 'sizeof'. > >> > >> It's not about packed region

Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread James Hogan
On 03/02/14 10:35, David Laight wrote: > From: James Hogan >> On 03/02/14 10:05, David Laight wrote: >>> Architectures that define such alignment rules are a right PITA. >>> You either need to get the size to 2 without using 'packed', or >>> just not define such structures. >>> It is worth seeing

Re: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread Chen Gang
On 02/03/2014 06:03 PM, Chen Gang wrote: > On 02/03/2014 04:58 PM, Dan Carpenter wrote: >> On Sat, Feb 01, 2014 at 09:57:39PM +0800, Chen Gang wrote: >>> It seems, our kernel still stick to treate 'pack' region have effect >>> with both 'align' and 'sizeof'. >>> >> >> It's not about packed regions.

RE: [PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union

2014-02-03 Thread David Laight
From: James Hogan > On 03/02/14 10:35, David Laight wrote: > > From: James Hogan > >> Combining __packed with __aligned(2) does the trick though (__packed > >> alone sets __aligned(1) which is obviously going to be suboptimal). ... > > Meta is also one of those arches, and according to my quick te

Re: rtl8821ae.

2014-02-03 Thread Larry Finger
On 02/02/2014 12:07 PM, Stefan Lippers-Hollmann wrote: Hi [ CC'ing the relevant parties ] On Sunday 02 February 2014, Dave Jones wrote: On Sun, Feb 02, 2014 at 03:41:27AM -0800, scan-ad...@coverity.com wrote: > > Please find the latest report on new defect(s) introduced to Linux found wit

RE: [PATCH v4] Move DWC2 driver out of staging

2014-02-03 Thread Paul Zimmerman
> From: Stephen Warren [mailto:swar...@wwwdotorg.org] > Sent: Saturday, February 01, 2014 7:44 PM > > On 02/01/2014 03:00 AM, Andre Heider wrote: > > On Fri, Jan 31, 2014 at 11:48:37PM -0700, Stephen Warren wrote: > >> On 01/31/2014 11:12 AM, Andre Heider wrote: > >>> On Mon, Jan 13, 2014 at 01:50

[PATCH] drivers:staging:tl8821ae Fixed the size of array to macro

2014-02-03 Thread Surendra Patil
Changed array size from "bb_swing_idx_ofdm[2]" to "bb_swing_idx_ofdm[MAX_RF_PATH]" Reported-By: Linus Torvalds Signed-off-by: Surendra Patil --- drivers/staging/rtl8821ae/wifi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8821ae/wifi.h b/drivers/stagi

Re: [PATCH] drivers:staging:tl8821ae Fixed the size of array to macro

2014-02-03 Thread Dan Carpenter
On Mon, Feb 03, 2014 at 10:13:36AM -0800, Surendra Patil wrote: > Dan, > > Thanks for the suggestion,modified the change log and sent new patch. > Gar, no. Put the information from the link directly into the changelog so that we know what the problem was and what the fix is without following th

Re: [PATCH 0/2] MIPS/staging: Probe octeon-usb driver via device-tree

2014-02-03 Thread Aaro Koskinen
Hi, On Wed, Dec 04, 2013 at 03:29:53PM -0800, Greg Kroah-Hartman wrote: > On Tue, Dec 03, 2013 at 11:46:50AM -0800, David Daney wrote: > > From: David Daney > > > > Tested against both EdgeRouter LITE (no bootloader supplied device > > tree), and ebb5610 (device tree supplied by bootloader). > >

[staging] unused rtl8192u/ieee80211/digest.c ?

2014-02-03 Thread Dave Hansen
I was doing some code audits looking at scattergather uses, and noticed that update() in drivers/staging/rtl8192u/ieee80211/digest.c uses sg.page which doesn't exist any longer, so this can't possibly compile. Turns out that digest.c is actually unused. It doesn't get referenced in a Makefile or

[PATCH 1/1] Drivers: hv: vmbus: Support per-channel driver state

2014-02-03 Thread K. Y. Srinivasan
As we implement Virtual Receive Side Scaling on the networking side (the VRSS patches are currently under review), it will be useful to have per-channel state that vmbus drivers can manage. Add support for managing per-channel state. Signed-off-by: K. Y. Srinivasan --- include/linux/hyperv.h |

Re: rtl8821ae.

2014-02-03 Thread Dan Carpenter
> >On Sunday 02 February 2014, Dave Jones wrote: > >>The git logs are littered mostly with CodingStyle cleanups, sparse cleanups > >>and such, > >>meanwhile for five years they've had out of bounds reads, overflows, and > >>such > >>for this whole time. Really, any sort of cleanup is good, thoug

Re: [PATCH 0/2] MIPS/staging: Probe octeon-usb driver via device-tree

2014-02-03 Thread Greg Kroah-Hartman
On Mon, Feb 03, 2014 at 08:35:06PM +0200, Aaro Koskinen wrote: > Hi, > > On Wed, Dec 04, 2013 at 03:29:53PM -0800, Greg Kroah-Hartman wrote: > > On Tue, Dec 03, 2013 at 11:46:50AM -0800, David Daney wrote: > > > From: David Daney > > > > > > Tested against both EdgeRouter LITE (no bootloader sup

Re: [staging] unused rtl8192u/ieee80211/digest.c ?

2014-02-03 Thread Greg Kroah-Hartman
On Mon, Feb 03, 2014 at 11:33:41AM -0800, Dave Hansen wrote: > I was doing some code audits looking at scattergather uses, and noticed > that update() in drivers/staging/rtl8192u/ieee80211/digest.c uses > sg.page which doesn't exist any longer, so this can't possibly compile. > > Turns out that di

Re: rtl8821ae.

2014-02-03 Thread Dan Carpenter
On Mon, Feb 03, 2014 at 11:05:42AM -0600, Larry Finger wrote: > A combined driver would require very many branches based on chip > number and would certainly execute much more slowly. I seriously doubt there are performance issues with merging the drivers. regards, dan carpenter

Re: rtl8821ae.

2014-02-03 Thread Linus Torvalds
On Mon, Feb 3, 2014 at 12:12 PM, Dan Carpenter wrote: > On Mon, Feb 03, 2014 at 11:05:42AM -0600, Larry Finger wrote: >> A combined driver would require very many branches based on chip >> number and would certainly execute much more slowly. > > I seriously doubt there are performance issues with

Re: rtl8821ae.

2014-02-03 Thread Greg KH
On Mon, Feb 03, 2014 at 11:05:42AM -0600, Larry Finger wrote: > I am trying to improve the quality of this pile of , but I am only one > person who was a life-long Fortran-coding scientist until I retired 15 years > ago. Since then, I have been learning C and kernel-style coding practices. >

RE: [PATCH v4] Move DWC2 driver out of staging

2014-02-03 Thread Paul Zimmerman
> From: Paul Zimmerman > Sent: Monday, February 03, 2014 9:36 AM > >> From: Stephen Warren [mailto:swar...@wwwdotorg.org] >> Sent: Saturday, February 01, 2014 7:44 PM >> >> On 02/01/2014 03:00 AM, Andre Heider wrote: >>> On Fri, Jan 31, 2014 at 11:48:37PM -0700, Stephen Warren wrote: On 01/3

[patch 1/2] staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()

2014-02-03 Thread Dan Carpenter
MAX_MP_IOCTL_SUBCODE (35) and mp_ioctl_hdl (32 elements) are no longer in sync. It leads to a bogus pointer dereference. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index dec992569476..684bc8107a48 10

[patch 2/2] staging: r8188eu: overflow in rtw_p2p_get_go_device_address()

2014-02-03 Thread Dan Carpenter
The go_devadd_str[] array is two characters too small to hold the address so we corrupt memory. I've changed the user space API slightly and I don't have a way to test if this breaks anything. In the original code we truncated away the last digit of the address and the NUL terminator so it was al

Re: [PATCH v4] Move DWC2 driver out of staging

2014-02-03 Thread Stephen Warren
On 02/03/2014 01:51 PM, Paul Zimmerman wrote: ... > Stephen, Andre, > > Can you test the attached patch, please? It works for my on the Synopsys > PCIe-based FPGA board. Unfortunately my RPI board is currently broken, > so I am unable to test it there to verify it actually fixes the problem > you

[PATCH] drivers:staging:tl8821ae Fixed the size of array to macro as discussed by Linus

2014-02-03 Thread Surendra Patil
Reported-By: Linus Torvalds It causes an interesting warning for me: drivers/staging/rtl8821ae/rtl8821ae/dm.c: In function ???rtl8821ae_dm_clear_txpower_tracking_state???: drivers/staging/rtl8821ae/rtl8821ae/dm.c:487:31: warning: iteration 2u invokes undefined behavior [-Waggressive-loop-optimiza

[PATCH] staging: bcm: fix pointer-integer size mismatch warnings

2014-02-03 Thread SeongJae Park
Fix the pointer-integer size mismatch warnings below: drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: drivers/staging/bcm/CmHost.c:1387:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] p

[PATCH] staging: cxt1e1: fix pointer-integer size mismatch warning

2014-02-03 Thread SeongJae Park
Fix the pointer-integer size mismatch warning below: drivers/staging/cxt1e1/functions.c: In function ‘VMETRO_TRACE’: drivers/staging/cxt1e1/functions.c:268:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] u_int3