Dan Carpenter | 31 Jul 17:21 2014

[patch] staging: lustre: bitwise vs logical typo

Bitwise AND was intended here obviously.

Signed-off-by: Dan Carpenter <dan.carpenter <at> oracle.com>
Static analysis.  I wasn't able to compile this.

Also lustre needs an entry in MAINTAINERS because otherwise
get_maintainer.pl still sends everything to Peng Tao only.

diff --git a/drivers/staging/lustre/lustre/obdecho/echo.c b/drivers/staging/lustre/lustre/obdecho/echo.c
index f3b7429..dae1599 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo.c
 <at>  <at>  -125,7 +125,7  <at>  <at>  static int echo_create(const struct lu_env *env, struct obd_export *exp,
 		return -EINVAL;

-	if (!(oa->o_mode && S_IFMT)) {
+	if (!(oa->o_mode & S_IFMT)) {
 		CERROR("echo obd: no type!\n");
 		return -ENOENT;
Ian Abbott | 31 Jul 16:57 2014

[PATCH] staging: comedi: ii_pci20kc: request and ioremap memory

The "ii_pci20kc" module is a comedi driver for Intelligent Instruments
PCI-20001C carrier board and modules.  Despite the name, this is
actually an ISA board and uses 1K of ISA memory space (below 1M) for the
main board plus up to three modules.  The address is set by hardware

When the board is attached to Comedi via the `COMEDI_DEVCONFIG` ioctl
and the driver's legacy "attach" handler, the base address is passed in.
The driver currently uses that address as-is, which is a bad idea.  It
doesn't even reserve the memory region.

Fix that by sanity checking the passed in address, reserving the memory
region and ioremapping it.

Replace the current "detach" handler `comedi_legacy_detach()` with a new
handler `ii20k_detach()` which unmaps the memory and releases the

Signed-off-by: Ian Abbott <abbotti <at> mev.co.uk>
 drivers/staging/comedi/drivers/ii_pci20kc.c | 32 ++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c
index b1f44b3..687db43 100644
--- a/drivers/staging/comedi/drivers/ii_pci20kc.c
+++ b/drivers/staging/comedi/drivers/ii_pci20kc.c
 <at>  <at>  -33,6 +33,7  <at>  <at> 
  * Register I/O map
(Continue reading)

Ian Abbott | 31 Jul 15:47 2014

[PATCH 00/18] staging: comedi: amplc_pci224: remove legacy stuff

The "amplc_pci224" driver retains a "legacy" attach mechanism via the
`COMEDI_DEVCONFIG` ioctl and the comedi driver "attach" hook, but
usually attaches PCI devices automatically via the comedi driver's
"auto_attach" hook.  The legacy mechanism is only retained so that
options can be passed via the ioctl to indicate how some hardware
jumpers are set on the boards, which is used to set up the range tables.
That's no use if the PCI device is attached automatically as the range
tables will be set up according to the factory default jumper positions.

Change the range tables to include all possible ranges, regardless of
jumper positions.  Then there is no need to have options to control
setting up the range tables and the "legacy" attach mechanism can be

Also, tidy the code up a bit.

01) staging: comedi: amplc_pci224: reformat some comments
02) staging: comedi: amplc_pci224: fix checkpatch line over 80
03) staging: comedi: amplc_pci224: blank lines aren't necessary before a
    close brace '}'
04) staging: comedi: amplc_pci224: multiple assignments should be
05) staging: comedi: amplc_pci224: fix spinlock_t definition without
06) staging: comedi: amplc_pci224: add whitespace to pci224_boards[]
07) staging: comedi: amplc_pci224: set a more descriptive
08) staging: comedi: amplc_pci224: omit '!= 0' from logical expressions
09) staging: comedi: amplc_pci224: remove some unnecessary parentheses
(Continue reading)

Seunghun Lee | 31 Jul 15:31 2014

[PATCH 2/2] staging: dgnc: Remove unneeded dgnc_trace.c and dgnc_trace.h

Removes unneeded dgnc_trace.c and dgnc_trace.h

CC: Lidza Louina <lidza.louina <at> gmail.com>
CC: Mark Hounschell <markh <at> compro.net>
Signed-off-by: Seunghun Lee <waydi1 <at> gmail.com>
 drivers/staging/dgnc/Makefile      |    2 +-
 drivers/staging/dgnc/dgnc_cls.c    |    1 -
 drivers/staging/dgnc/dgnc_driver.c |    1 -
 drivers/staging/dgnc/dgnc_neo.c    |    1 -
 drivers/staging/dgnc/dgnc_trace.c  |   54 ------------------------------------
 drivers/staging/dgnc/dgnc_trace.h  |   34 -----------------------
 drivers/staging/dgnc/dgnc_tty.c    |    1 -
 7 files changed, 1 insertion(+), 93 deletions(-)
 delete mode 100644 drivers/staging/dgnc/dgnc_trace.c
 delete mode 100644 drivers/staging/dgnc/dgnc_trace.h

diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile
index 888c433..733434f 100644
--- a/drivers/staging/dgnc/Makefile
+++ b/drivers/staging/dgnc/Makefile
 <at>  <at>  -4,4 +4,4  <at>  <at>  obj-$(CONFIG_DGNC) += dgnc.o

 dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
                dgnc_mgmt.o dgnc_neo.o\
-               dgnc_trace.o dgnc_tty.o dgnc_sysfs.o
+               dgnc_tty.o dgnc_sysfs.o
diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index 5a76a8e..cfa8384 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
(Continue reading)

Seunghun Lee | 31 Jul 15:30 2014

[PATCH 1/2] staging: dgnc: rephrase comment

Rephrase comment to explain original intention of function.

CC: Lidza Louina <lidza.louina <at> gmail.com>
CC: Mark Hounschell <markh <at> compro.net>
Suggested-by: Tobias Klauser <tklauser <at> distanz.ch>
Signed-off-by: Seunghun Lee <waydi1 <at> gmail.com>
 drivers/staging/dgnc/dgnc_cls.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index 4b65306..5a76a8e 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
 <at>  <at>  -1040,11 +1040,11  <at>  <at>  static void cls_flush_uart_read(struct channel_t *ch)
 	 * For complete POSIX compatibility, we should be purging the
 	 * read FIFO in the UART here.
-	 * However, doing the statement below also incorrectly flushes
-	 * write data as well as just basically trashing the FIFO.
+	 * However, clearing the read FIFO (UART_FCR_CLEAR_RCVR) also
+	 * incorrectly flushes write data as well as just basically trashing the
+	 * FIFO.
-	 * I believe this is a BUG in this UART.
-	 * So for now, we will leave the code #ifdef'ed out...
+	 * Presumably, this is a bug in this UART.

(Continue reading)

Mark Hounschell | 31 Jul 14:44 2014

Re: [PATCH V2] staging: dgap: introduce dgap_cleanup_nodes()

On 07/31/2014 12:02 AM, Daeseok Youn wrote:
> When a configration file is parsed with dgap_parsefile(),
> makes nodes for saving configrations for board.
> Making a node will allocate node memory and strings for saving
> configrations with kstrdup().
> So these are freed when dgap is unloaded or failed to initialize.
> Signed-off-by: Daeseok Youn <daeseok.youn <at> gmail.com>
> ---
> V2: Do not need to free for NULLNODE.
> I have been too busy to solve this issue, sorry for late.
> Mark, Can you test this patch? I try to make simple module which is
> testing dgap_parsefile() and dgap_cleanup_nodes().

I'll be happy to, but I can't do it until Monday. I'm not where the 
hardware is until then.

Dan Carpenter | 31 Jul 11:29 2014

[patch] staging: comedi: ni_tio: remove some dead code

These conditions can never be true because "i" is always one more than
NI_660X_MAX_RTSI_CHAN after the loop.

Signed-off-by: Dan Carpenter <dan.carpenter <at> oracle.com>

diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index f9f6320..9d4b46c 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
 <at>  <at>  -1041,14 +1041,10  <at>  <at>  static unsigned ni_660x_gate_to_generic_gate(unsigned gate)
 			if (gate == NI_660X_RTSI_GATE_SEL(i))
 				return NI_GPCT_RTSI_GATE_SELECT(i);
-		if (i <= NI_660X_MAX_RTSI_CHAN)
-			break;
 		for (i = 0; i <= NI_660X_MAX_GATE_PIN; ++i) {
 			if (gate == NI_660X_PIN_GATE_SEL(i))
-		if (i <= NI_660X_MAX_GATE_PIN)
-			break;
 <at>  <at>  -1081,14 +1077,10  <at>  <at>  static unsigned ni_m_gate_to_generic_gate(unsigned gate)
 			if (gate == NI_M_RTSI_GATE_SEL(i))
 				return NI_GPCT_RTSI_GATE_SELECT(i);
-		if (i <= NI_M_MAX_RTSI_CHAN)
-			break;
(Continue reading)

Jes.Sorensen | 31 Jul 10:36 2014

[PATCH 0/5] staging: rtl8723au: Removing more unused and duplicate code

From: Jes Sorensen <Jes.Sorensen <at> redhat.com>


Please find attached another small set of fixes for the 8723au driver,
mostly removing unused code, but also duplication of some in-kernel
Linux USB functions.


Jes Sorensen (5):
  staging: rtl8723au: RSSI_test is never set
  staging: rtl8723au: Remove two never set variables
  staging: rtl8723au: Remove never set struct pwrctrl_priv.bHWPowerdown
  staging: rtl8723au: Do not duplicate kernel provided USB macros
  staging: rtl8723au: usb_dvobj_init(): Remove unused variable

 drivers/staging/rtl8723au/core/rtw_cmd.c        | 13 -------
 drivers/staging/rtl8723au/core/rtw_pwrctrl.c    | 22 ------------
 drivers/staging/rtl8723au/hal/odm_HWConfig.c    |  7 ++--
 drivers/staging/rtl8723au/hal/usb_halinit.c     | 21 +++++------
 drivers/staging/rtl8723au/include/drv_types.h   |  1 -
 drivers/staging/rtl8723au/include/odm.h         |  1 -
 drivers/staging/rtl8723au/include/rtw_pwrctrl.h |  2 --
 drivers/staging/rtl8723au/os_dep/usb_intf.c     | 48 ++++++-------------------
 8 files changed, 20 insertions(+), 95 deletions(-)


(Continue reading)

Anil Belur | 31 Jul 09:51 2014

[PATCH] staging: lustre: ptlrpc: lproc_ptlrpc.c - fix dereferenceing user space buffer

- this fixes sparse warning for directly deferencing user space buffer

drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33: warning: incorrect type in argument
2 (different address spaces)
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:    expected void const [noderef] <asn:1>*from
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:    got char const *buffer

Signed-off-by: Anil Belur <askb23 <at> gmail.com>
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
index 6b9c6db..455c6c7 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
 <at>  <at>  -628,7 +628,8  <at>  <at>  out:
  * if the optional token is omitted, the operation is performed on both the
  * regular and high-priority (if the service has one) NRS head.
-static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, const char *buffer,
+static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file,
+					const char __user *buffer,
 					size_t count, loff_t *off)
 	struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private;

Anil Belur | 31 Jul 08:07 2014

[PATCH] staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer

- this fixes sparse warning for directly deferencing user space buffer

./lustre/ldlm/ldlm_resource.c:202:35: warning: incorrect type in argument 2 (different address spaces)
./lustre/ldlm/ldlm_resource.c:202:35:    expected void const [noderef] <asn:1>*from
./lustre/ldlm/ldlm_resource.c:202:35:    got char const *buffer

Signed-off-by: Anil Belur <askb23 <at> gmail.com>
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 91d028b..efd45e5 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
 <at>  <at>  -189,8 +189,9  <at>  <at>  static int lprocfs_lru_size_seq_show(struct seq_file *m, void *v)
 	return lprocfs_rd_uint(m, nr);

-static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
-				      size_t count, loff_t *off)
+static ssize_t lprocfs_lru_size_seq_write(struct file *file,
+					const char __user *buffer,
+					size_t count, loff_t *off)
 	struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private;
 	char dummy[MAX_STRING_SIZE + 1];

(Continue reading)

Sanjeev Sharma | 31 Jul 07:43 2014

[PATCH v2 0/3] Fixed commenting style problem

AddedSigned-off-by: line that was missing.

Sanjeev Sharma (3):
  staging:r8180: coding style: Fixed commenting style
  staging:r8180: coding style: Fixed too long lines
  staging:r8190: coding style: Fixed checkpatch reported Error

 drivers/staging/rtl8192u/r8180_93cx6.c   |  15 +--
 drivers/staging/rtl8192u/r8180_93cx6.h   |  11 +-
 drivers/staging/rtl8192u/r8190_rtl8256.c | 169 +++++++++++++++----------------
 3 files changed, 95 insertions(+), 100 deletions(-)