Re: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."

2016-03-22 Thread Oucharek, Doug S
Yes, those are “per-CPT allocations”. So the allocator ends up allocating an array of pointers to the given data type. Doug On Mar 22, 2016, at 10:39 PM, Dilger, Andreas mailto:andreas.dil...@intel.com>> wrote: On 2016/03/22, 19:49, "lustre-devel on behalf of Greg Kroah-Hartman" mailto:lustre

Re: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."

2016-03-22 Thread Dilger, Andreas
On 2016/03/22, 19:49, "lustre-devel on behalf of Greg Kroah-Hartman" wrote: >On Tue, Mar 22, 2016 at 06:21:04PM -0400, James Simmons wrote: >> Latest testing fails when using ko2iblnd. It was tracked down >> to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. >> >> This reverts commit 4671a02661

[PATCH] staging: dgnc: fix CamelCase in dgnc_driver.c

2016-03-22 Thread Daeseok Youn
fix checkpatch.pl warning about CamelCase. Signed-off-by: Daeseok Youn --- drivers/staging/dgnc/dgnc_driver.c | 52 +++--- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c inde

Re: [RFC 2/2] staging: android: ion: Add of_ion_device_get function

2016-03-22 Thread Dan Carpenter
On Tue, Mar 22, 2016 at 03:33:51PM -0700, Moritz Fischer wrote: > +struct ion_device *of_ion_device_get(struct device_node *node) > +{ > + struct miscdevice *mdev = of_misc_get(node); > + > + if (IS_ERR(mdev)) > + return ERR_PTR(PTR_ERR(mdev)); Use ERR_CAST() for this. regarda

Re: [PATCH] Staging: fsl-mc: Fix up bad parameters to dev_err and dev_dbg

2016-03-22 Thread Greg Kroah-Hartman
On Fri, Mar 18, 2016 at 06:29:01PM -0700, Guenter Roeck wrote: > The first parameter to dev_dbg() and dev_err() is struct device *, > not struct device **. > > Fixes: de71daf5c839 ("Staging: fsl-mc: Replace pr_debug with dev_dbg") > Fixes: 454b0ec8bf99 ("Staging: fsl-mc: Replace pr_err with dev_er

patch "staging: refresh TODO for rtl8712" added to staging-linus

2016-03-22 Thread gregkh
This is a note to let you know that I've just added the patch titled staging: refresh TODO for rtl8712 to my staging git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git in the staging-linus branch. The patch will show up in the next release of

Re: [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."

2016-03-22 Thread Greg Kroah-Hartman
On Tue, Mar 22, 2016 at 06:21:04PM -0400, James Simmons wrote: > Latest testing fails when using ko2iblnd. It was tracked down > to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. > > This reverts commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. > --- > .../staging/lustre/lnet/klnds/o2iblnd/o2ib

Re: [PATCH 3/3] staging: dgnc: use tty_alloc_driver instead of kcalloc

2016-03-22 Thread DaeSeok Youn
2016-03-22 22:02 GMT+09:00 Greg KH : > On Tue, Mar 22, 2016 at 04:40:24PM +0900, DaeSeok Youn wrote: >> 2016-03-22 6:05 GMT+09:00 Greg KH : >> > On Mon, Mar 14, 2016 at 01:29:00PM +0900, Daeseok Youn wrote: >> >> the tty_alloc_driver() can allocate memory for ttys and termios. >> >> And also it can

Re: [PATCH] staging: dgnc: fix camelcase of SerialDriver and PrintDriver

2016-03-22 Thread DaeSeok Youn
2016-03-22 21:21 GMT+09:00 walter harms : > > You have send this patch before, right ? > then it is a good custom to have something like: [Patch V2] in the > subject line. In the comment you should write somethink like > > v2: fix withspace damage > v1: fix issue > > Otherwise none of the reviewe

Re: [RFC 0/2] staging: ion: of_ion_device_get

2016-03-22 Thread Moritz Fischer
On Tue, Mar 22, 2016 at 4:20 PM, Laura Abbott wrote: > If allocation is coming from userspace and drivers are only importing > you should be using the dma_buf APIs instead of Ion APIs directly. > Ion is a dma_buf exporter and dma_buf APIs are the preferred API. Ok, thanks. Sounds reasonable. Th

Re: [RFC 0/2] staging: ion: of_ion_device_get

2016-03-22 Thread Moritz Fischer
On Tue, Mar 22, 2016 at 4:20 PM, Laura Abbott wrote: > On 03/22/2016 04:08 PM, Moritz Fischer wrote: >> >> Hi Laura, >> >> On Tue, Mar 22, 2016 at 3:51 PM, Laura Abbott wrote: >> >>> In the past what drivers have done is a foo_ion_client_create which has >>> the >>> reference >>> to the ion_devic

Re: [RFC 0/2] staging: ion: of_ion_device_get

2016-03-22 Thread Laura Abbott
On 03/22/2016 04:08 PM, Moritz Fischer wrote: Hi Laura, On Tue, Mar 22, 2016 at 3:51 PM, Laura Abbott wrote: In the past what drivers have done is a foo_ion_client_create which has the reference to the ion_device created from ion_device_create. Drivers then call the foo_ion_client_create func

Re: [RFC 0/2] staging: ion: of_ion_device_get

2016-03-22 Thread Moritz Fischer
Hi Laura, On Tue, Mar 22, 2016 at 3:51 PM, Laura Abbott wrote: > In the past what drivers have done is a foo_ion_client_create which has the > reference > to the ion_device created from ion_device_create. Drivers then call the > foo_ion_client_create function. Oh, so you mean you add a function

[PATCH 19/29] staging:lustre: remove libcfs_psdev_[open|release]

2016-03-22 Thread James Simmons
From: Parinay Kondekar With struct libcfs_device_userstate gone we can remove the remaining code of libcfs_psdev_ops.p_[open|close] as well as the libcfs_psdev_[open|release] functions. Signed-off-by: Parinay Kondekar Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/brows

[PATCH 25/29] staging: lustre: libcfs: make libcfs_ioctl.h readable

2016-03-22 Thread James Simmons
Fix up all thw whitescapes and line up the IOCTL defines so it is readable. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Rev

[PATCH 15/29] staging: lustre: libcfs: move libcfs_ioctl_handler stuff to libcfs.h

2016-03-22 Thread James Simmons
From: John L. Hammond Move all the libcfs_ioctl_handler code from libcfs_ioctl.h to libcfs.h. The header libcfs_ioctl.h is a uapi header so their is no reason to keep kernel internals in that header. Signed-off-by: John L. Hammond Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.in

[PATCH 17/29] staging:lustre: remove last bits of the IOC_LIBCFS_PANIC ioctl

2016-03-22 Thread James Simmons
From: Parinay Kondekar A few pieces still exist for the IOC_LIBCFS_PANIC ioctl. Remove these last bits to prevent old tools from using them. The latest lustre utilities no longer use this ioctl. Signed-off-by: Parinay Kondekar Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.

[PATCH 11/29] staging: lustre: lnet: make sure lnet data not greater than LIBCFS_IOC_DATA_MAX

2016-03-22 Thread James Simmons
From: Liang Zhen Fail to compile if largest LNet user land data structures passed to kernel are larger than LIBCFS_IOC_DATA_MAX Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: J

[PATCH 14/29] staging: lustre: libcfs: remove libcfsutil.h in comment

2016-03-22 Thread James Simmons
From: John L. Hammond The header libcfsutil.h has been long gone in the upstream client. Replace libcfsutil.h reference to the current user land header instead. Signed-off-by: John L. Hammond Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: htt

[PATCH 21/29] staging:lustre: remove libcfs pseudo device abstraction

2016-03-22 Thread James Simmons
From: Parinay Kondekar With the libcfs ioctl cleanup we no longer need the libcfs pseudo device abstraction. Signed-off-by: Parinay Kondekar Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas

[PATCH 26/29] staging: lustre: libcfs: add uapi headers to libcfs_ioctl.h

2016-03-22 Thread James Simmons
Need a few uapi headers to make libcfs_ioctl.h compilable in userland. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed

[PATCH 10/29] staging: lustre: libcfs: test if userland data is to small

2016-03-22 Thread James Simmons
From: Liang Zhen Ensure that user land data is at least the smallest size. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- .../lu

[PATCH 24/29] staging: lustre: libcfs: move function declarations from libcfs_ioctl.h

2016-03-22 Thread James Simmons
Move the function declartions that are used only by kernel space to libcfs.h This makes libcfs_ioctl.h a offical uapi header now. Move large inline functions out of libcfs_ioctl.h to the source file linux-module.c belonging to libcfs. This code is only used by the core of libcfs and such inline fun

[PATCH 27/29] staging: lustre: libcfs: return proper bool values

2016-03-22 Thread James Simmons
Return real bool values for libcfs_ioctl_is_invalid(). Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin

[PATCH 28/29] staging: lustre: libcfs: use BIT macro in linux-module.c

2016-03-22 Thread James Simmons
Use the proper BIT macro for libcfs_ioctl_is_invalid(). Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Droki

[PATCH 29/29] staging: lustre: libcfs: return size_t for libcfs_ioctl_packlen

2016-03-22 Thread James Simmons
Change return value to size_t. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- .../lustre/lnet/l

[PATCH 06/29] staging: lustre: libcfs: move comment in libcfs_ioctl

2016-03-22 Thread James Simmons
From: Liang Zhen Move the comment about libcfs_ioctl_data_adjust to the section where libcfs_ioctl_data_adjust is actually called. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by

[PATCH 12/29] staging: lustre: simple cleanup in obd_ioctl_popdata

2016-03-22 Thread James Simmons
From: Liang Zhen Code simplification for obd_ioctl_popdata. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- .../lustre/lustre/obd

[PATCH 05/29] staging: lustre: libcfs: add debugging info for libcfs_ioctl

2016-03-22 Thread James Simmons
From: Liang Zhen Added some lustre debugging to track down potential future bugs. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin ---

[PATCH 04/29] staging: lustre: libcfs: merge libcfs_ioctl_handle into libcfs_ioctl

2016-03-22 Thread James Simmons
From: Liang Zhen This is apart of the cleanup of libcfs_ioctl* code. In this part we turn libcfs_ioctl_handle into libcfs_ioctl since libcfs_ioctl is now a skeleton function. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.

[PATCH 20/29] staging:lustre: call libcfs_ioctl directly

2016-03-22 Thread James Simmons
From: Parinay Kondekar No reason to go through the cfs_psdev_ops abstract to call libcfs_ioctl. Just call libcfs_ioctl directly. Signed-off-by: Parinay Kondekar Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492

[PATCH 23/29] staging: lustre: libcfs: migrate inline functions to source file

2016-03-22 Thread James Simmons
Move large inline functions out of libcfs_ioctl.h to the source file linux-module.c belonging to libcfs. This code is only used by the core of libcfs and such inline functions don't belong in a uapi header file. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245

[PATCH 03/29] staging: lustre: libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdata

2016-03-22 Thread James Simmons
From: Liang Zhen This is apart of the cleanup of libcfs_ioctl* code. In this part some of the code in libcfs_ioctl is migrated into libcfs_ioctl_getdata_len() which is renamed libcfs_ioctl_getdata() Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on:

[PATCH 09/29] staging: lustre: libcfs: update error messages in linux-module.c

2016-03-22 Thread James Simmons
From: Liang Zhen The error message are for libcfs layer not LNet. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- .../lustre/lnet

[PATCH 13/29] staging: lustre: libcfs: change variable name

2016-03-22 Thread James Simmons
Change arg to uparam name for libcfs_ioctl(). Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- drivers/staging/lustre/lnet/libcfs/mo

[PATCH 22/29] staging: lustre: libcfs: removal all userland only macros from libcfs_ioctl.h

2016-03-22 Thread James Simmons
All the macros in libcfs_ioctl.h that is needed by user land have been moved into the lustre utilities software stack. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/17643 Reviewed-by: Bob Glossman Reviewed-by: John

[PATCH 02/29] staging: lustre: libcfs: use break in switch options for libcfs_ioctl_handle

2016-03-22 Thread James Simmons
From: Liang Zhen Instead of just returning for each switch condition use a break. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin ---

[PATCH 16/29] staging: lustre: libcfs: remove libcfs_ioctl_popdata wrapper

2016-03-22 Thread James Simmons
From: John L. Hammond Lets just use copy_to_user() directly instead of having a wrapper function. Signed-off-by: John L. Hammond Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/14180 Reviewed-by: Dmitry Eremin Revi

[PATCH 08/29] staging: lustre: libcfs: invert test condition for libcfs_ioctl

2016-03-22 Thread James Simmons
From: Liang Zhen Invert the test of error returned by the handle_ioctl pointer. This reduces the code by one indentation level. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: J

[PATCH 18/29] staging:lustre: remove the IOC_LIBCFS_MEMHOG ioctl

2016-03-22 Thread James Simmons
From: Parinay Kondekar The IOC_LIBCFS_MEMHOG is not needed so remove the last bits. Signed-off-by: Parinay Kondekar Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844 Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger Reviewed-by: Dmi

[PATCH 01/29] staging: lustre: libcfs: replace LNET_MAX_IOCTL_BUF_LEN with something bigger

2016-03-22 Thread James Simmons
From: Liang Zhen The size of LNET_MAX_IOCTL_BUF_LEN restricts the size of libcfs ioctl to the maximum needs of the LNet layer. Since libcfs also handles things like debugging we might need to let user land pass more data to or from the kernel than what is possible Signed-off-by: Liang Zhen Inte

[PATCH 07/29] staging: lustre: libcfs: test if data is NULL

2016-03-22 Thread James Simmons
From: Liang Zhen Make sure data is not NULL otherwise we get an oops when using the IOC_LIBCFS_MARK_DEBUG ioctl. Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11313 Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi

[PATCH 00/29] Bring libcfs ioctl handling up to date

2016-03-22 Thread James Simmons
This brings the upstream libcfs ioctl handling up to date with the latest production code. Most of the work was to make libcfs_ioctl.h a simple uapi header that can be used by user land utilities. Lots of ioctl code cleanup and simplification. James Simmons (9): staging: lustre: libcfs: change v

Re: [RFC 1/2] misc: Add of_get_misc get a reference from devicetree

2016-03-22 Thread Moritz Fischer
Meh, On Tue, Mar 22, 2016 at 3:33 PM, Moritz Fischer wrote: > > + > +err_dev: > + put_device(dev); > + return ERR_PTR(ret); > +} > +#else > +struct misc_device *of_misc_get(struct device_node *) Ok, that one is broken Sorry, Moritz

Re: [RFC 2/2] staging: android: ion: Add of_ion_device_get function

2016-03-22 Thread Moritz Fischer
Derp, On Tue, Mar 22, 2016 at 3:33 PM, Moritz Fischer wrote: > Allows to obtain a reference to the global /dev/ion backing > struct ion_device via devicetree. > > Signed-off-by: Moritz Fischer > --- > drivers/staging/android/ion/ion.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff

Re: [RFC 0/2] staging: ion: of_ion_device_get

2016-03-22 Thread Laura Abbott
On 03/22/2016 03:33 PM, Moritz Fischer wrote: Hi all, probably I'm doing this all wrong. I'm playing around with a bunch of accelerators and I need to share buffers between them. I have my heaps implemented as a platform device and from what I understand I'll need a reference to the struct ion_

[RFC 2/2] staging: android: ion: Add of_ion_device_get function

2016-03-22 Thread Moritz Fischer
Allows to obtain a reference to the global /dev/ion backing struct ion_device via devicetree. Signed-off-by: Moritz Fischer --- drivers/staging/android/ion/ion.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c

[RFC 1/2] misc: Add of_get_misc get a reference from devicetree

2016-03-22 Thread Moritz Fischer
This commit enables access to a miscdevice via a reference obtained from devicetree. This allows to implement a of_ion_device_get() in the next step. Signed-off-by: Moritz Fischer --- drivers/char/misc.c| 38 ++ include/linux/miscdevice.h | 3 +++ 2 f

[RFC 0/2] staging: ion: of_ion_device_get

2016-03-22 Thread Moritz Fischer
Hi all, probably I'm doing this all wrong. I'm playing around with a bunch of accelerators and I need to share buffers between them. I have my heaps implemented as a platform device and from what I understand I'll need a reference to the struct ion_device in each of them. I couldn't find a way to

[PATCH] staging: android: ion_test: fix check of platform_device_register_simple() error code

2016-03-22 Thread Vladimir Zapolskiy
On error platform_device_register_simple() returns ERR_PTR() value, check for NULL always fails. The change corrects the check itself and propagates the returned error upwards. Fixes: 81fb0b901397 ("staging: android: ion_test: unregister the platform device") Signed-off-by: Vladimir Zapolskiy --

[PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."

2016-03-22 Thread James Simmons
Latest testing fails when using ko2iblnd. It was tracked down to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. This reverts commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c|4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) dif

RE: [PATCH 1/1] scsi: storvsc: Support manual scan of FC hosts on Hyper-V

2016-03-22 Thread KY Srinivasan
> -Original Message- > From: KY Srinivasan > Sent: Sunday, March 20, 2016 11:59 AM > To: 'James Bottomley' ; Martin > K. Petersen > Cc: Christoph Hellwig ; gre...@linuxfoundation.org; > linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; > oher...@suse.com; jbottom...@parallels.c

[PATCH 1/2] staging: comedi: plx9052.h: tidy up bit defines

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/plx9052.h | 87 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/drivers/sta

[PATCH 2/2] staging: comedi: plx9052.h: fix block comment issues

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/plx9052.h | 35 1 file changed, 17 insertions(+), 18 deletions(-) diff --g

[PATCH 0/2] staging: comedi: plx9052.h: minor cleanup

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues. H Hartley Sweeten (2): staging: comedi: plx9052.h: tidy up bit defines staging: comedi: plx9052.h: fix block comment issues drivers/staging/comedi/drivers/plx9052.h | 122 +++ 1 file changed, 61 insertions(+), 61 deletions(-) -- 2.6

[PATCH] staging: comedi: z8536: tidy up bit defines

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/z8536.h | 89 ++ 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/drivers/sta

[PATCH v2 2/6] staging: comedi: ni_labpc_regs.h: tidy up bit defines

2016-03-22 Thread H Hartley Sweeten
As suggested by checkpatch.pl: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_regs.h | 82 +- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/st

[PATCH v2 4/6] staging: comedi: ni_labpc_cs: fix block comment issues

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_cs.c | 95 +--- 1 file changed, 44 inserti

[PATCH v2 6/6] staging: comedi: ni_labpc.h: fix block comment issues

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.h | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --gi

[PATCH v2 1/6] staging: comedi: ni_labpc: remove some unnecessary defines

2016-03-22 Thread H Hartley Sweeten
The EEPROM_SIZE and NUM_AO_CHAN defines are only used once and they don't add any significant clarity to the driver. They are also pretty generic symbol names. Remove them and just open code the values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/

[PATCH v2 3/6] staging: comedi: ni_labpc_common: tidy up block comments

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_common.c | 59 +++- 1 file changed, 37 insertions(+), 22 deletions(-

[PATCH v2 5/6] staging: comedi: ni_labpc_pci: tidy up bit define

2016-03-22 Thread H Hartley Sweeten
As suggested by checkpatch.pl: CHECK: Prefer using the BIT macro Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_la

[PATCH v2 0/6] staging: comedi: ni_labpc: minor cleanup

2016-03-22 Thread H Hartley Sweeten
Fix all the checkpatch.pl issues. v2: remove the changes to z8536.h H Hartley Sweeten (6): staging: comedi: ni_labpc: remove some unnecessary defines staging: comedi: ni_labpc_regs.h: tidy up bit defines staging: comedi: ni_labpc_common: tidy up block comments staging: comedi: ni_labpc_cs

[PATCH v2 14/43] staging: comedi: ni_660x: tidy up ni_660x_select_pfi_output()

2016-03-22 Thread H Hartley Sweeten
Tidy up this function to fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' For aesthetics, remove the static const local variables. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 54 ++

[PATCH v2 24/43] staging: comedi: ni_660x: add a comment about the initial DIO state

2016-03-22 Thread H Hartley Sweeten
The (*auto_attach) initializes all the DIO channels to a default state. Add a comment for clarity. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/comedi

[PATCH v2 12/43] staging: comedi: ni_660x: tidy up ni_660x_read_register()

2016-03-22 Thread H Hartley Sweeten
Rename this function to help shorten some of the long lines. Remove the inline, let the compiler figure it out. Change the 'unsigned' parameters to 'unsigned int' to fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten Cc: Ian

[PATCH v2 22/43] staging: comedi: ni_660x: tidy up ni_660x_dio_insn_bits()

2016-03-22 Thread H Hartley Sweeten
Use some local variables to clarify this function. This (*insn_bits) function is a bit different from most comedi drivers. Add some comments to clarify why the shifts are used. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c

[PATCH v2 05/43] staging: comedi: ni_660x: rename CamelCase 'NI_660xRegisterData'

2016-03-22 Thread H Hartley Sweeten
Rename this CamelCase struct and the associated 'registerData' variable. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/d

[PATCH v2 17/43] staging: comedi: ni_660x: remove enum ni_660x_subdevices

2016-03-22 Thread H Hartley Sweeten
Hard-coding the subdevice order is normally a bad idea. If a new subdevice is added, or removed, it could potentially break pretty badly. Remove the enum and associated NI_660X_GPCT_SUBDEV() helper that hard-code the subdevice order. Fix the (*auto_attach) so it initializes all the subdevices wit

[PATCH v2 00/43] staging: comedi: ni_660x: big driver cleanup

2016-03-22 Thread H Hartley Sweeten
This driver has a lot of checkpatch.pl issues: total: 0 errors, 71 warnings, 27 checks, 1222 lines checked There is also a lot of cruft that bloats the driver and makes it harder to follow. This series fixes all the checkpatch.pl issues: total: 0 errors, 0 warnings, 0 checks, 944 lines checked A

RE: [PATCH 3/6] staging: comedi: ni_labpc_common: tidy up block comments

2016-03-22 Thread Hartley Sweeten
On Tuesday, March 22, 2016 10:51 AM, H Hartley Sweeten wrote: > Fix the checkpatch.pl issues: > WARNING: Block comments use a trailing */ on a separate line > > Signed-off-by: H Hartley Sweeten > Cc: Ian Abbott > Cc: Greg Kroah-Hartman > --- > drivers/staging/comedi/drivers/ni_labpc_common.c |

[PATCH v2 37/43] staging: comedi: ni_660x: default DIO channels with subdevice init

2016-03-22 Thread H Hartley Sweeten
For aesthetics, move the initialization of the default routing for the DIO channels so it happens when the subdevice is initialized. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 27 +-- 1 file chan

[PATCH v2 43/43] staging: comedi: ni_660x: update the MODULE_DESCRIPTION

2016-03-22 Thread H Hartley Sweeten
Change the generic MODULE_DESCRIPTION text to something more useful. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c

[PATCH v2 07/43] staging: comedi: ni_660x: tidy up multi-line comment

2016-03-22 Thread H Hartley Sweeten
Reformat the multi-line comment in the kernel CodingStyle. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/staging/comedi/

[PATCH v2 25/43] staging: comedi: ni_660x: refactor ni_gpct_to_660x_register()

2016-03-22 Thread H Hartley Sweeten
Convert this big switch into an array and refactor ni_660x_gpct_{write,read}() functions to use the array to find the register offset. All the TIO (GPCT) registers are included in the array except for NITIO_G0_ABZ and NITIO_G1_ABZ. These registers only exist on the ni_pcimio m-series boards and th

[PATCH v2 42/43] staging: comedi: ni_660x: refactor GPCT_OFFSET

2016-03-22 Thread H Hartley Sweeten
This driver supports boards that have 1 or 2 TIO chips with base addresses 0x800 apart. Replace the static const array 'GPCT_OFFSET' with a define and calculate the base address based on the chip index. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/

[PATCH v2 27/43] staging: comedi: ni_660x: fix memory barrier without comment

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issue. Move the memory barrier to a better place. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_6

[PATCH v2 28/43] staging: comedi: ni_660x: tidy up the misc. constants

2016-03-22 Thread H Hartley Sweeten
Remove enum ni_660x_constants and just #define the value. Move all the constant #defines so they are in one place and rename them so they are more conesistent. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 49

[PATCH v2 41/43] staging: comedi: ni_660x: remove spinlock 'dma_cfg_lock'

2016-03-22 Thread H Hartley Sweeten
This spinlock is only used to protect changes to the private data 'dma_cfg'. Before calling any function that would change the 'dma_cfg' the spinlock 'mite_channel_lock' is also locked. That spinlock is not unlocked until after the 'dma_cfg' change. Remove the redundant spinlock. Signed-off-by:

[PATCH v2 03/43] staging: comedi: ni_660x: remove enum ni_register_width

2016-03-22 Thread H Hartley Sweeten
All the registers are defined struct NI_660xRegisterData and they are either 2 or 4 bytes in size. Remove the enum and just use a char member to define the size as 2 or 4 bytes. Simplify the ni_660x_{write,read}_register() functions and remove the unnecessary BUG() in each. Signed-off-by: H Hartl

[PATCH v2 09/43] staging: comedi: ni_660x: cleanup the NI660X_DMA_CFG register helpers

2016-03-22 Thread H Hartley Sweeten
The BUG_ON() checks in the helper functions are not necessary. The mite driver quiries the PCI chip to determine the number of DMA channels. This is then used when a DMA channel is requested so the channel will always be in range. Convert the inline functions used to set the bits in the NI600X_DMA

[PATCH v2 36/43] staging: comedi: ni_660x: initialize the counter with the subdevice init

2016-03-22 Thread H Hartley Sweeten
Remove the extra for loop and just initialize the counter as the subdevices are created. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/

[PATCH v2 11/43] staging: comedi: ni_660x: tidy up ni_660x_write_register()

2016-03-22 Thread H Hartley Sweeten
Rename this function to help shorten some of the long lines. Remove the inline, let the compiler figure it out. Change the 'unsigned' parameters to 'unsigned int' to fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten Cc: Ian

[PATCH v2 15/43] staging: comedi: ni_660x: remove BUG_ON() in ni_660x_request_mite_channel()

2016-03-22 Thread H Hartley Sweeten
This BUG_ON() happens if a mite DMA channel is already requested when an ansynchronous command is started for one of the counter subdevices. The comedi core will only call the (*do_cmd) if the subdevice is not busy. In this driver, the (*cancel) for the subdevice will always release any requested

[PATCH v2 06/43] staging: comedi: ni_660x: cleanup the NI660X_IO_CFG register helpers

2016-03-22 Thread H Hartley Sweeten
Convert the inline functions used to set the bits in the NI600X_IO_CFG registers into macros. Also convert the enum ni_660x_pfi_output_select into defines. This clarifies the association with the register. This also fixes a number of checkpatch.pl issues about: WARNING: Prefer 'unsigned int' to b

[PATCH v2 39/43] staging: comedi: ni_660x: sort enum ni_660x_register

2016-03-22 Thread H Hartley Sweeten
Sort this enum so that it has a 1:1 relationship with the ni_tio.h enum ni_gpct_register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 95 1 file changed, 48 insertions(+), 47 deletions(-)

[PATCH v2 13/43] staging: comedi: ni_660x: tidy up ni_gpct_{write, read}_register()

2016-03-22 Thread H Hartley Sweeten
Rename these functions so they have namespace associated with the driver. Fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 16 +++---

[PATCH v2 21/43] staging: comedi: ni_660x: tidy up Digital I/O subdevice init

2016-03-22 Thread H Hartley Sweeten
Add some whitespace to the Digital I/O subdevice init and add a comment about the channels. This driver is a bit goofy, only 32 of the 40 channels can actually be used for Digital I/Os and 32 of them can be routed to the counters for alternate use. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH v2 40/43] staging: comedi: ni_660x: remove ni_gpct_to_660x_register[]

2016-03-22 Thread H Hartley Sweeten
enum ni_gpct_register and enum ni_660x_register now have a 1:1 relationship for the NITIO_* registers. The static const array is no longer necessary to find the proper NI660X_* register for a given NITIO_*. Remove it and refactor the register read/write functions. Use the NITIO_* values to init th

[PATCH v2 26/43] staging: comedi: ni_660x: add comments for the spinlock_t definitions

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues: CHECK: spinlock_t definition without comment For aesthetics, rename the 'soft_reg_copy_lock' to clarify what it's used for. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 16 +---

[PATCH v2 33/43] staging: comedi: ni_660x: disable interrupts when detaching driver

2016-03-22 Thread H Hartley Sweeten
Make sure the interrupts are disabled before freeing the irq. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/d

[PATCH v2 23/43] staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()

2016-03-22 Thread H Hartley Sweeten
Use the comedi.h provided constants (enum ni_660x_pfi_routing) instead of defining new ones for the output sources. Use a switch to clarify the channel/source validation. For aesthetics, rename the private data members 'pfi_output_selects' and 'pfi_direction_bits'. Remove the 'min_counter_pfi_ch

[PATCH v2 32/43] staging: comedi: ni_mio_common: ni_gpct_device_destroy() can handle a NULL pointer

2016-03-22 Thread H Hartley Sweeten
Remove the unnecessary NULL pointer check. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drive

[PATCH v2 18/43] staging: comedi: ni_660x: remove ni_660x_num_counters()

2016-03-22 Thread H Hartley Sweeten
This inline function is only used by the (*auto_attach). Remove it and just use a local variable for the calculation. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 16 +--- 1 file changed, 5 insertions(+), 11 d

[PATCH v2 35/43] staging: comedi: ni_660x: allocate counters early in (*auto_attach)

2016-03-22 Thread H Hartley Sweeten
The ni_gpct_device_construct() could fail allocating the memory for device and its counters. For aesthetics, call the function before initializing the subdevices. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 20 ++

[PATCH v2 29/43] staging: comedi: ni_660x: tidy up the counter subdevices init

2016-03-22 Thread H Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and use a couple local variables to make the code easier to follow. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 59 +--- 1 file change

[PATCH v2 19/43] staging: comedi: ni_660x: Prefer 'unsigned int' to bare use of 'unsigned'

2016-03-22 Thread H Hartley Sweeten
Fix the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/d

[PATCH v2 10/43] staging: comedi: ni_660x: cleanup the NI660X_GLOBAL_INT_{STATUS, CFG}

2016-03-22 Thread H Hartley Sweeten
Remove the enums global_interrupt_{status,config}_register_bits and add defines for the CamelCase values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 27 ++- 1 file changed, 10 insertions(+), 17 d

[PATCH v2 30/43] staging: comedi: ni_tio: make ni_gpct_device_destroy() NULL pointer safe

2016-03-22 Thread H Hartley Sweeten
Modify the pointer check to make this function NULL pointer safe. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_tio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/dr

[PATCH v2 34/43] staging: comedi: ni_660x: init TIO chips before subdevice init

2016-03-22 Thread H Hartley Sweeten
For aesthetics, initialize the TIO chips before the subdevices are allocated and initialized. Refactor the function to initialize all the TIO chips and move it to a better place in the driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/dr

  1   2   >