Re: [PATCH] staging:board: Macros with flow control statements

2016-05-02 Thread Greg KH
On Tue, May 03, 2016 at 06:01:56AM +0300, Nikita Eshkeev wrote: > This patch fixes the checkpatch.pl warning: > > WARNING: Macros with flow control statements should be avoided > +#define board_staging(str, fn) \ > +static int __init runtime_board_check(void) \ > +{

[PATCH] staging:board: Macros with flow control statements

2016-05-02 Thread Nikita Eshkeev
This patch fixes the checkpatch.pl warning: WARNING: Macros with flow control statements should be avoided +#define board_staging(str, fn) \ +static int __init runtime_board_check(void)\ +{ \ + if

Re: [PATCH 06/12] staging/android: prepare sync_file for de-staging

2016-05-02 Thread Gustavo Padovan
Hi Pavel, 2016-05-02 Pavel Machek : > Hi! > > > > -} > > -EXPORT_SYMBOL(sync_file_merge); > > - > > static const char *android_fence_get_driver_name(struct fence *fence) > > { > > struct sync_timeline *parent = fence_parent(fence); > > if this is meant to be used outside

Re: [PATCH 01/12] staging/android: remove redundant comments on sync_merge_data

2016-05-02 Thread Gustavo Padovan
2016-05-02 Pavel Machek : > On Wed 2016-04-27 13:27:08, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > struct sync_merge_data already have documentation on top of the > > struct definition. No need to duplicate it. > > > > Signed-off-by:

Re: [PATCH 06/12] staging/android: prepare sync_file for de-staging

2016-05-02 Thread Pavel Machek
Hi! > -} > -EXPORT_SYMBOL(sync_file_merge); > - > static const char *android_fence_get_driver_name(struct fence *fence) > { > struct sync_timeline *parent = fence_parent(fence); if this is meant to be used outside android, should it select some better prefix than android_fence_?

Re: [PATCH 01/12] staging/android: remove redundant comments on sync_merge_data

2016-05-02 Thread Pavel Machek
On Wed 2016-04-27 13:27:08, Gustavo Padovan wrote: > From: Gustavo Padovan > > struct sync_merge_data already have documentation on top of the > struct definition. No need to duplicate it. > > Signed-off-by: Gustavo Padovan >

Re: [PATCH] PCI: hv: report resources release after stopping the bus

2016-05-02 Thread Bjorn Helgaas
On Fri, Apr 29, 2016 at 11:39:10AM +0200, Vitaly Kuznetsov wrote: > Kernel hang is observed when pci-hyperv module is release with device > drivers still attached. E.g. when I do 'rmmod pci_hyperv' with BCM5720 > device pass-through-ed (tg3 module) I see the following: > > NMI watchdog: BUG:

[PATCH 12/19] staging: comedi: mite: do mite_steup() as part of mite_attach()

2016-05-02 Thread H Hartley Sweeten
Currently all the drivers that use the mite driver have to call mite_setup() after allocating and initializing the mite device with mite_attach(). Move the mite_setup() call into mite_attach() to simplify the drivers a bit and remove the need for the additional inline and exported functions. For

[PATCH 02/19] staging: comedi: mite: rename 'struct mite_dma_descriptor'

2016-05-02 Thread H Hartley Sweeten
Rename this struct to 'mite_dma_desc' to help shorten the long lines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 8

[PATCH 17/19] staging: comedi: mite: move the mite dma arm/disarm/reset functions

2016-05-02 Thread H Hartley Sweeten
For aesthetics, move these functions to a more logical spot in the code and add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 03/19] staging: comedi: mite: rename 'struct mite_dma_descriptor_ring'

2016-05-02 Thread H Hartley Sweeten
Rename this name to 'mite_ring' to help shorten the long lines. In the ni_660x driver, also shorten the private data member 'mite_rings' to simply 'ring'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 13/19] staging: comedi: mite: tidy up kernel messages in mite_steup()

2016-05-02 Thread H Hartley Sweeten
The dev_err() messages with pci_ioremap_bar() fails are just noise. Remove them. The 'use_win1' and 'fifo_size' dev_info() messages are also noise but they may be useful when debugging. Change them to dev_dbg(). Absorb dump_chip_signnature() and change the pr_info() messages to dev_dbg(). These

[PATCH 15/19] staging: comedi: mite: tidy up mite dma channel request/release

2016-05-02 Thread H Hartley Sweeten
For aesthetics, make the actual "request" function static and change mite_request_channel_in_range() into a wrapper that calls the internal function. Change the inline function that requests any free channel into an export that also calls the internal function. Move the functions to a more

[PATCH 09/19] staging: comedi: mite: introduce mite_free_dma_descs()

2016-05-02 Thread H Hartley Sweeten
Introduce a helper function to handle the dma_free_coherent() of the mite dma descriptors. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 33

[PATCH 01/19] staging: comedi: mite: rename 'struct mite_struct'

2016-05-02 Thread H Hartley Sweeten
Rename this struct to simply 'mite'. The current name is a bit redundant. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 33

[PATCH 19/19] staging: comedi: mite: tidy up module init/exit

2016-05-02 Thread H Hartley Sweeten
Move the module_init()/module_exit() so they are in the prefered spot on the line after the function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c |

[PATCH 10/19] staging: comedi: mite: use prefered form for passing a struct size

2016-05-02 Thread H Hartley Sweeten
Add a local variable to mite_buf_change() so that the prefered form of passing a struct size, sizeof(*p), can be used. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 14/19] staging: comedi: mite: move the mite ring functions

2016-05-02 Thread H Hartley Sweeten
For aesthetics, move the functions that allocate/free and initialize the mite dma ring. They are currently kind of scattered around the code. Add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc:

[PATCH 16/19] staging: comedi: mite: move mite_prep_dma()

2016-05-02 Thread H Hartley Sweeten
For aesthetics, move this functions to a more logical spot in the code and add a docbook comment for the exported function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman ---

[PATCH 07/19] staging: comedi: mite: rename mite member 'mite_io_addr'

2016-05-02 Thread H Hartley Sweeten
Rename this member of struct mite to 'mmio' to help shorten the long lines. Add a local variable for the mite pointer in the ni_pcimio driver to clarify and shorten the long lines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 04/19] staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'

2016-05-02 Thread H Hartley Sweeten
Rename this member of struct mite_ring to 'dma_addr' to help shorten the long lines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 16

[PATCH 06/19] staging: comedi: mite: tidy up mite_init_ring_descriptors()

2016-05-02 Thread H Hartley Sweeten
Use a local variable for the mite_dma_desc pointer to help clarify this function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 22

[PATCH 08/19] staging: comedi: mite: remove mite member 'channel_allocated'

2016-05-02 Thread H Hartley Sweeten
An allocated mite_channel will have its 'ring' member initialized to point to the mite_ring that will be used for DMA. A non-allocated mite_channel will have a 'ring' member set to NULL, either by a channel release or due to the initial kzalloc of the 'mite' struct. Refactor the code to use the

[PATCH 05/19] staging: comedi: mite: rename mite_ring member 'descriptors'

2016-05-02 Thread H Hartley Sweeten
Rename this member of struct mite_ring to 'descs' to help shorten the long lines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 28

RE: Time for a code audit?

2016-05-02 Thread Sell, Timothy C
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Monday, May 02, 2016 8:55 AM > To: Kershner, David A > Cc: gre...@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; > Sell, Timothy C; *S-Par-Maintainer; Binder, David Anthony > Subject: Re:

Re: [PATCH 0/6] Intel Secure Guard Extensions

2016-05-02 Thread Austin S. Hemmelgarn
On 2016-04-29 16:17, Jarkko Sakkinen wrote: On Tue, Apr 26, 2016 at 09:00:10PM +0200, Pavel Machek wrote: On Mon 2016-04-25 20:34:07, Jarkko Sakkinen wrote: Intel(R) SGX is a set of CPU instructions that can be used by applications to set aside private regions of code and data. The code

[PATCH 08/13] staging/android: remove size arg of sync_timeline_create()

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan After we removed sw_sync_timeline this arg has not been really used by anyone, all its users pass the size of struct sync_timeline there. So simplify this function but not requiring the size anymore. Signed-off-by: Gustavo Padovan

[PATCH 10/13] staging/android: move sw_sync related code to sw_sync.c

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Split sync_debug and sw_sync in two different files. Signed-off-by: Gustavo Padovan --- drivers/staging/android/Makefile | 1 + drivers/staging/android/sw_sync.c| 136

[PATCH 04/13] staging/android: remove sw_sync_timeline and sw_sync_pt

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan As we moved value storage to sync_timeline and fence those two structs became useless and can be removed now. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c| 24

[PATCH 02/13] staging/android: remove .{fence, timeline}_value_str() from timeline_ops

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Now that the value of fence and the timeline are not stored by sw_sync anymore we can remove this extra abstraction to retrieve this data. This patch changes both fence_ops (.fence_value_str and .timeline_value_str) to return the str

[PATCH 05/13] staging/android: remove sw_sync.[ch] files

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan We can glue the sw_sync file operations directly on the sync framework without the need to pass through sw_sync wrappers. It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled. Signed-off-by: Gustavo Padovan

[PATCH 01/13] staging/android: store last signaled value on sync timeline

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Now fence timeline is aware of the last signaled fence, as it receives the increment to the current value in sync_timeline_signal(). That allow us to remove .has_signaled() from timeline_ops as we can directly compare using timeline->value

[PATCH 06/13] staging/android: rename android_fence to timeline_fence

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan We are moving out of staging/android so rename it to a name that is not related to android anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 36

[PATCH 12/13] staging/android: make sync_timeline internal to sw_sync

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan The only use sync_timeline will have in upstream kernel is for debugging through the SW_SYNC interface. So make it internal to SW_SYNC to avoid people use it in the future. Signed-off-by: Gustavo Padovan

[PATCH 11/13] staging/android: clean up #includes in the sync framework

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Most of the includes there are not necessary anymore. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync.c | 6 -- drivers/staging/android/sync.h | 3 ---

[PATCH 07/13] staging/android: remove unnecessary check for fence

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan When we call sync_print_fence() fence is always valid. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 13/13] staging/android: make sw_ioctl info internal to sw_sync.c

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan We don't want to export this from the kernel. This is interface is only for testing and debug. So testers shall copy the ioctl info in their own projects. Signed-off-by: Gustavo Padovan ---

[PATCH 09/13] staging/android: bring struct sync_pt back

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Move the list_head members from sync_pt to struct fence was a mistake, they will not be used by struct fence as planned before, so here we create sync_pt again to bring the list heads back. Signed-off-by: Gustavo Padovan

[PATCH 00/13] staging/android: clean up SW_SYNC

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Hi, The following patches do a clean up on the sw_sync inteface. It starts by removing struct sync_timeline_ops, which was creating unecessary wrappers in the code and the start to organize the sync_timeline and sw_sync code better.

[PATCH 03/13] staging/android: remove struct sync_timeline_ops

2016-05-02 Thread Gustavo Padovan
From: Gustavo Padovan Move drv_name, the last field of sync_timeline_ops, to sync_timeline and remove sync_timeline_ops. struct sync_timeline_ops was just an extra abstraction on top of fence_ops, and in the last few commits we removed all it ops in favor of

Re: [PATCH v2] vme: change LM callback argument to void pointer

2016-05-02 Thread Aaron Sierra
- Original Message - > From: "Dan Carpenter" > Sent: Saturday, April 30, 2016 5:16:19 AM > > On Fri, Apr 29, 2016 at 04:41:02PM -0500, Aaron Sierra wrote: > > There appear to be no in-kernel callers of vme_lm_attach (or > > vme_lme_request for that matter), so

RE: [PATCH 00/14] staging: fsl-mc: misc updates

2016-05-02 Thread Stuart Yoder
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Friday, April 29, 2016 8:01 PM > To: Stuart Yoder > Cc: Jose Rivera ; de...@driverdev.osuosl.org; > ag...@suse.de; a...@arndb.de; > linux-ker...@vger.kernel.org;

[PATCH 14/14 RESEND] MAINTAINERS: fsl-mc: Add second maintainer

2016-05-02 Thread Stuart Yoder
Add Stuart Yoder as additional maintainer of fsl-mc bus driver. Signed-off-by: Stuart Yoder --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 03e00c7..62db04e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4670,6 +4670,7

Re: Time for a code audit?

2016-05-02 Thread Dan Carpenter
Reviewing drivers/staging/unisys/visorinput/visorinput.c 465 case KEY_NUMLOCK: 466 led = LED_NUML; 467 break; 468 default: 469 led = -1; Just make this a direct return. 470 break; 471

Re: Time for a code audit?

2016-05-02 Thread Dan Carpenter
Reviewing drivers/staging/unisys/visornic/visornic_main.c 212 static int 213 visor_copy_fragsinfo_from_skb(struct sk_buff *skb, unsigned int firstfraglen, 214unsigned int frags_max, 215struct phys_info frags[]) 216

[PATCH 5/7] staging: wilc1000: change handle_get_mac_address's return type to void

2016-05-02 Thread Chaehyun Lim
When handle_get_mac_address is called in hostIFthread that is a kernel thread, it is not checked return type of this function. This patch changes return type to void and removes braces if statement due to have a single statement. Signed-off-by: Chaehyun Lim ---

[PATCH 7/7] staging: wilc1000: rename result in handle_get_mac_address

2016-05-02 Thread Chaehyun Lim
This patch renames result to ret that is used to get return value from wilc_send_config_pkt. Some handle_*() functions are used as result, others are used as ret. It will be changed as ret in all handle_*() functions to match variable name. Signed-off-by: Chaehyun Lim ---

[PATCH 1/7] staging: wilc1000: change handle_get_ip_address's return type to void

2016-05-02 Thread Chaehyun Lim
When handle_get_ip_address is called in hostIFthread that is a kernel thread, it is not checked return type of this function. This patch changes return type to void and removes braces if statement due to have a single statement. Signed-off-by: Chaehyun Lim ---

[PATCH 6/7] staging: wilc1000: change data type of result in handle_get_mac_address

2016-05-02 Thread Chaehyun Lim
This patch changes data type of result variable from s32 to int. result is used to get return value from wilc_send_config_pkt that has return type of int. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 4/7] staging: wilc1000: fix comparison style of if statement in handle_get_ip_address

2016-05-02 Thread Chaehyun Lim
This patch changes conditional comparison of if statement as if (ret) instead of using if (ret != 0) Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/7] staging: wilc1000: rename result in handle_get_ip_address

2016-05-02 Thread Chaehyun Lim
This patch renames result to ret that is used to get return value from wilc_send_config_pkt. Some handle_*() functions are used as result, others are used as ret. It will be changed as ret in all handle_*() functions to match variable name. Signed-off-by: Chaehyun Lim ---

[PATCH 2/7] staging: wilc1000: change data type of result in handle_get_ip_address

2016-05-02 Thread Chaehyun Lim
This patch changes data type of result variable from s32 to int. result is used to get return value from wilc_send_config_pkt that has return type of int. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: Time for a code audit?

2016-05-02 Thread Dan Carpenter
Reviewing drivers/staging/unisys/visorhba/visorhba_main.c visor_thread_start() I'm nervous about the error handling here. Is setting ->id to zero really sufficient to prevent dereferencing ->task? Still a lot of return -1; grep "return -1;" drivers/staging/unisys/ -R del_scsipending_ent() flip

Re: [PATCH] Staging: speakup: i18n: Fixed a CHECK coding style.

2016-05-02 Thread Dan Carpenter
On Mon, May 02, 2016 at 10:35:54AM +0530, rohitsakala wrote: > NULL comparison has been changed to correct coding style. > > Signed-off-by: rohitsakala Nah. Write your name properly like you did last time and fix your from header... regards, dan carpenter