[patch] Documentation/SubmittingPatches: Reported-by tags and permission

2014-02-14 Thread Dan Carpenter
The reported-by text says you have to ask for permission, but that's
only if the bug was reported in private.  These days the standard is to
always give reported-by credit or it's considered a bit rude.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 26b1e31d5a13..f72ce7803b71 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -432,12 +432,9 @@ have been included in the discussion
 
 14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by:
 
-If this patch fixes a problem reported by somebody else, consider adding a
-Reported-by: tag to credit the reporter for their contribution.  Please
-note that this tag should not be added without the reporter's permission,
-especially if the problem was not reported in a public forum.  That said,
-if we diligently credit our bug reporters, they will, hopefully, be
-inspired to help us again in the future.
+The Reported-by tag is to give credit to people who find bugs and report them.
+Please note that if the bug was reported in private, then ask for permission
+first before using the Reported-by tag.
 
 A Tested-by: tag indicates that the patch has been successfully tested (in
 some environment) by the person named.  This tag informs maintainers that
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v4 1/3] mfd: Add realtek USB card reader driver

2014-02-14 Thread Lee Jones
On Wed, 12 Feb 2014, rogera...@realtek.com wrote:

 From: Roger Tseng rogera...@realtek.com
 
 Realtek USB card reader provides a channel to transfer command or data to 
 flash
 memory cards. This driver exports host instances for mmc and memstick 
 subsystems
 and handles basic works.
 
 Signed-off-by: Roger Tseng rogera...@realtek.com
 ---
  drivers/mfd/Kconfig  |  10 +
  drivers/mfd/Makefile |   1 +
  drivers/mfd/rtsx_usb.c   | 760 
 +++
  include/linux/mfd/rtsx_usb.h | 628 +++
  4 files changed, 1399 insertions(+)
  create mode 100644 drivers/mfd/rtsx_usb.c
  create mode 100644 include/linux/mfd/rtsx_usb.h

Applied again, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Ian Abbott

On 2014-02-13 10:08, Ian Abbott wrote:

On 2014-02-13 03:29, Chase Southwood wrote:

In this if-else conditional statement, if (chan  16), but
(data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early,
but the else-branch does not get executed either.  As a result, mask
would be used uninitialized in the next line.  What we want here is if
(chan  16) and (data[0] != INSN_CONFIG_DIO_QUERY), return an error, but
in every other case, initialize mask and then proceed.  Found by a static
checker.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---
  drivers/staging/comedi/drivers/addi_apci_3xxx.c | 12 +---
  1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c
b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
index ceadf8e..04c5153 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
@@ -688,13 +688,11 @@ static int apci3xxx_dio_insn_config(struct
comedi_device *dev,
   * Port 1 (channels 8-15) are always outputs
   * Port 2 (channels 16-23) are programmable i/o
   */
-if (chan  16) {
-if (data[0] != INSN_CONFIG_DIO_QUERY)
-return -EINVAL;
-} else {
-/* changing any channel in port 2 changes the entire port */
-mask = 0xff;
-}
+if ((chan  16)  (data[0] != INSN_CONFIG_DIO_QUERY))
+return -EINVAL;
+
+/* changing any channel in port 2 changes the entire port */
+mask = 0xff;

  ret = comedi_dio_insn_config(dev, s, insn, data, mask);
  if (ret)


Seems correct.

Acked-by: Ian Abbott abbo...@mev.co.uk


Okay, as Hartley pointed out, it isn't correct, so I withdraw my 
Acked-by.


--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Ian Abbott

On 2014-02-14 01:02, Chase Southwood wrote:

In this conditional statement, if (chan  16), but the instruction passed
in data[0] is INSN_CONFIG_DIO_QUERY, the function does not return early,
but the else-branch does not get executed either.  As a result, mask
would be used uninitialized in the next line.  We want
comedi_dio_insn_config() to use a chan_mask based on the chanspec for the
INSN_CONFIG_DIO_QUERY instruction, so mask should be initialized to 0.
Then, if instead the instruction is INSN_CONFIG_DIO_{INPUT,OUTPUT}, we
return an error if (chan  16) as these are invalid instructions for
ports 0 and 1, or update the mask otherwise, so all the io_bits are
modified for port 2.  This ensures that mask is always initialized by the
time it is used.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---

2: Addressed all of the comments provided by Hartley regarding correct
structure of this patch.

Hopefully everything looks better!

  drivers/staging/comedi/drivers/addi_apci_3xxx.c | 13 +++--
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c 
b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
index ceadf8e..1f3b668 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
@@ -680,7 +680,7 @@ static int apci3xxx_dio_insn_config(struct comedi_device 
*dev,
unsigned int *data)
  {
unsigned int chan = CR_CHAN(insn-chanspec);
-   unsigned int mask;
+   unsigned int mask = 0;
int ret;

/*
@@ -688,12 +688,13 @@ static int apci3xxx_dio_insn_config(struct comedi_device 
*dev,
 * Port 1 (channels 8-15) are always outputs
 * Port 2 (channels 16-23) are programmable i/o
 */
-   if (chan  16) {
-   if (data[0] != INSN_CONFIG_DIO_QUERY)
+   if (data[0] != INSN_CONFIG_DIO_QUERY) {
+   /* ignore all other instructions for ports 0 and 1 */
+   if (chan  16)
return -EINVAL;
-   } else {
-   /* changing any channel in port 2 changes the entire port */
-   mask = 0xff;
+   else
+   /* changing any channel in port 2 changes the entire 
port */
+   mask = 0xff;
}

ret = comedi_dio_insn_config(dev, s, insn, data, mask);



Looks okay this time. :)

Reviewed-by: Ian Abbott abbo...@mev.co.uk

--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: iio: hmc5843: Add all available models to device tree id table.

2014-02-14 Thread Marek Belisko
Signed-off-by: Marek Belisko ma...@goldelico.com
---
 drivers/staging/iio/magnetometer/hmc5843.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c 
b/drivers/staging/iio/magnetometer/hmc5843.c
index d4f4dd9..f595fdc 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -630,7 +630,9 @@ static const struct i2c_device_id hmc5843_id[] = {
 MODULE_DEVICE_TABLE(i2c, hmc5843_id);
 
 static const struct of_device_id hmc5843_of_match[] = {
-   { .compatible = honeywell,hmc5843 },
+   { .compatible = honeywell,hmc5843, .data = (void *)HMC5843_ID },
+   { .compatible = honeywell,hmc5883, .data = (void *)HMC5883_ID },
+   { .compatible = honeywell,hmc5883l, .data = (void *)HMC5883L_ID },
{}
 };
 MODULE_DEVICE_TABLE(of, hmc5843_of_match);
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] Documentation: iio: Extend documentation for hmc5843 bindings.

2014-02-14 Thread Marek Belisko
Signed-off-by: Marek Belisko ma...@goldelico.com
---
 Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt 
b/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
index 90d5f34..b8cbdd5 100644
--- a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
+++ b/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
@@ -3,6 +3,9 @@
 Required properties:
 
   - compatible : should be honeywell,hmc5843
+  Other models which are supported with driver are:
+   honeywell,hmc5883
+   honeywell,hmc5883l
   - reg : the I2C address of the magnetometer - typically 0x1e
 
 Optional properties:
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging:lustre: Fix typo in comment and printk within lustre/obdclass

2014-02-14 Thread Masanari Iida
This patch fixed spelling typo within lustre/lustre/obdclass.

Signed-off-by: Masanari Iida standby2...@gmail.com
---
 drivers/staging/lustre/lustre/obdclass/cl_io.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/genops.c| 6 +++---
 drivers/staging/lustre/lustre/obdclass/llog_lvfs.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/llog_osd.c  | 6 +++---
 drivers/staging/lustre/lustre/obdclass/local_storage.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/md_attrs.c  | 6 +++---
 drivers/staging/lustre/lustre/obdclass/obd_config.c| 4 ++--
 drivers/staging/lustre/lustre/obdclass/obd_mount.c | 4 ++--
 drivers/staging/lustre/lustre/obdclass/obdo.c  | 2 +-
 11 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c 
b/drivers/staging/lustre/lustre/obdclass/cl_io.c
index e048500..3bebc78 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_io.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c
@@ -942,7 +942,7 @@ int cl_io_cancel(const struct lu_env *env, struct cl_io *io,
struct cl_page *page;
int result = 0;
 
-   CERROR(Canceling ongoing page trasmission\n);
+   CERROR(Canceling ongoing page transmission\n);
cl_page_list_for_each(page, queue) {
int rc;
 
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c 
b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index 1a92603..0fc256f 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -508,7 +508,7 @@ EXPORT_SYMBOL(cl_site_stats_print);
  * about journal_info. Currently following fields in task_struct are identified
  * can be used for this purpose:
  *  - cl_env: for liblustre.
- *  - tux_info: ony on RedHat kernel.
+ *  - tux_info: only on RedHat kernel.
  *  - ...
  * \note As long as we use task_struct to store cl_env, we assume that once
  * called into Lustre, we'll never call into the other part of the kernel
diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c 
b/drivers/staging/lustre/lustre/obdclass/genops.c
index d9f750d..d27f041 100644
--- a/drivers/staging/lustre/lustre/obdclass/genops.c
+++ b/drivers/staging/lustre/lustre/obdclass/genops.c
@@ -1625,7 +1625,7 @@ static int obd_zombie_impexp_check(void *arg)
 }
 
 /**
- * Add export to the obd_zombe thread and notify it.
+ * Add export to the obd_zombie thread and notify it.
  */
 static void obd_zombie_export_add(struct obd_export *exp) {
spin_lock(exp-exp_obd-obd_dev_lock);
@@ -1641,7 +1641,7 @@ static void obd_zombie_export_add(struct obd_export *exp) 
{
 }
 
 /**
- * Add import to the obd_zombe thread and notify it.
+ * Add import to the obd_zombie thread and notify it.
  */
 static void obd_zombie_import_add(struct obd_import *imp) {
LASSERT(imp-imp_sec == NULL);
@@ -1661,7 +1661,7 @@ static void obd_zombie_import_add(struct obd_import *imp) 
{
 static void obd_zombie_impexp_notify(void)
 {
/*
-* Make sure obd_zomebie_impexp_thread get this notification.
+* Make sure obd_zombie_impexp_thread get this notification.
 * It is possible this signal only get by obd_zombie_barrier, and
 * barrier gulps this notification and sleeps away and hangs ensues
 */
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c 
b/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c
index 5385d8e..d86bb8c6 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c
@@ -376,7 +376,7 @@ static void llog_skip_over(__u64 *off, int curr, int goal)
 
 /* sets:
  *  - cur_offset to the furthest point read in the log file
- *  - cur_idx to the log index preceeding cur_offset
+ *  - cur_idx to the log index preceding cur_offset
  * returns -EIO/-EINVAL on error
  */
 static int llog_lvfs_next_block(const struct lu_env *env,
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_osd.c 
b/drivers/staging/lustre/lustre/obdclass/llog_osd.c
index 654c8e1..682279d 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_osd.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_osd.c
@@ -514,7 +514,7 @@ static void llog_skip_over(__u64 *off, int curr, int goal)
 
 /* sets:
  *  - cur_offset to the furthest point read in the log file
- *  - cur_idx to the log index preceeding cur_offset
+ *  - cur_idx to the log index preceding cur_offset
  * returns -EIO/-EINVAL on error
  */
 static int llog_osd_next_block(const struct lu_env *env,
@@ -1073,7 +1073,7 @@ static int llog_osd_setup(const struct lu_env *env, 
struct obd_device *obd,
LASSERT(ctxt);
 
/* initialize data allowing to generate new fids,
-* literally we need a sequece */
+* literally we need a sequence */
lgi-lgi_fid.f_seq = FID_SEQ_LLOG;

Re: [PATCH] staging: r8188eu: Remove dead code

2014-02-14 Thread Greg Kroah-Hartman
On Thu, Feb 13, 2014 at 01:00:18PM +0100, Paul Bolle wrote:
 There are a few lines in this driver that depend on a macro
 CONFIG_BT_COEXIST. But there's no Kconfig symbol of that name nor is
 there a preprocessor define for that string. So remove these lines.
 
 Signed-off-by: Paul Bolle pebo...@tiscali.nl
 ---
 Entirely untested.
 
 Fun fact: two years ago, code depending on the same undefined macro was
 removed from rtl8192cu, see commit 9ef11f7b34c0 (rtl8192cu: Remove dead
 code never selected). I wonder where this macro originated.

It comes from the stand-alone version of this driver, and the config
options that it provides when building.  So expect it to constantly
show up until this company stops relying on their internal tree...

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-14 Thread Greg Kroah-Hartman
Minor nits for future patch submissions:

On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Hounschell wrote:
 There is a lot of cleanup work to do on these digi drivers and merging as
 much as is possible will make it easier. I also notice that many merged 
 drivers are single source and header. 
 
 Merge dgap_fep5.c into dgap_driver.c
 
 Signed-off-by: Mark Hounschell ma...@compro.net
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 
  drivers/staging/dgap/Makefile  |2 
  drivers/staging/dgap/dgap_driver.c | 1877 +-
  drivers/staging/dgap/dgap_fep5.c   | 1948 ---
  3 files changed, 1862 insertions(+), 1965 deletions(-)

You need a --- line above the diffstat, otherwise git adds it to the
changelog.

 diff -urN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 
 linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c
 --- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c  2014-01-29 
 08:06:37.0 -0500
 +++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c   2014-01-31 
 10:22:53.675819451 -0500

You aren't using git, which is fine, but as you are dealing with patch
series, I'd recommend using it, or quilt, or something else that handles
managing your patches.  Doing it by hand like this isn't going to
scale, especially as you now need to work against the linux-next tree,
or my staging-next branch of staging.git from git.kernel.org.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-14 Thread Greg Kroah-Hartman
On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Hounschell wrote:
 There is a lot of cleanup work to do on these digi drivers and merging as
 much as is possible will make it easier. I also notice that many merged 
 drivers are single source and header. 
 
 Merge dgap_fep5.c into dgap_driver.c
 
 Signed-off-by: Mark Hounschell ma...@compro.net
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 
  drivers/staging/dgap/Makefile  |2 
  drivers/staging/dgap/dgap_driver.c | 1877 +-
  drivers/staging/dgap/dgap_fep5.c   | 1948 ---
  3 files changed, 1862 insertions(+), 1965 deletions(-)
 
 diff -urN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 
 linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c
 --- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c  2014-01-29 
 08:06:37.0 -0500
 +++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c   2014-01-31 
 10:22:53.675819451 -0500

Another good reason to use git is that I can't apply this patch to my
trees, as you made it against the 3.13.1 tree, yet it needs to be
applied to the 3.14-rc1 tree, which is a few thousand changes beyond
3.13.  We have to work against the development trees, not the older
stable trees, as we can't go back in time :)

If you had used git here, it could have tried to handle the merging
properly, but as-is, it can't figure out what is going on:

$ git am --3way ../s2
Applying: staging: dgap: Merge dgap_fep5.c into dgap_driver.c
fatal: sha1 information is lacking or useless 
(drivers/staging/dgap/dgap_driver.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 staging: dgap: Merge dgap_fep5.c into dgap_driver.c
The copy of the patch that failed is found in:
   /home/gregkh/linux/work/staging/.git/rebase-apply/patch
When you have resolved this problem, run git am --continue.
If you prefer to skip this patch, run git am --skip instead.
To restore the original branch and stop patching, run git am --abort.

So, can you redo this whole patch series against 3.14-rc2 so I can apply
them?

Sorry for the extra work, it will save time in the long run :)

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-14 Thread Mark Hounschell
On 02/14/2014 12:34 PM, Greg Kroah-Hartman wrote:
 Minor nits for future patch submissions:
 
 On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Hounschell wrote:
 There is a lot of cleanup work to do on these digi drivers and merging as
 much as is possible will make it easier. I also notice that many merged 
 drivers are single source and header. 

 Merge dgap_fep5.c into dgap_driver.c

 Signed-off-by: Mark Hounschell ma...@compro.net
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

  drivers/staging/dgap/Makefile  |2 
  drivers/staging/dgap/dgap_driver.c | 1877 +-
  drivers/staging/dgap/dgap_fep5.c   | 1948 ---
  3 files changed, 1862 insertions(+), 1965 deletions(-)
 
 You need a --- line above the diffstat, otherwise git adds it to the
 changelog.
 

Yes, I have since found out this.

 diff -urN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 
 linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c
 --- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 2014-01-29 
 08:06:37.0 -0500
 +++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c  2014-01-31 
 10:22:53.675819451 -0500
 
 You aren't using git, which is fine, but as you are dealing with patch
 series, I'd recommend using it, or quilt, or something else that handles
 managing your patches.  Doing it by hand like this isn't going to
 scale, especially as you now need to work against the linux-next tree,
 or my staging-next branch of staging.git from git.kernel.org.
 

Yes, I have also found this out and will learn to do using git. May take
some time, but will learn it.

Thanks
mark


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-14 Thread Mark Hounschell
On 02/14/2014 12:38 PM, Greg Kroah-Hartman wrote:
 On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Hounschell wrote:
 There is a lot of cleanup work to do on these digi drivers and merging as
 much as is possible will make it easier. I also notice that many merged 
 drivers are single source and header. 

 Merge dgap_fep5.c into dgap_driver.c

 Signed-off-by: Mark Hounschell ma...@compro.net
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

  drivers/staging/dgap/Makefile  |2 
  drivers/staging/dgap/dgap_driver.c | 1877 +-
  drivers/staging/dgap/dgap_fep5.c   | 1948 ---
  3 files changed, 1862 insertions(+), 1965 deletions(-)

 diff -urN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 
 linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c
 --- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 2014-01-29 
 08:06:37.0 -0500
 +++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c  2014-01-31 
 10:22:53.675819451 -0500
 
 Another good reason to use git is that I can't apply this patch to my
 trees, as you made it against the 3.13.1 tree, yet it needs to be
 applied to the 3.14-rc1 tree, which is a few thousand changes beyond
 3.13.  We have to work against the development trees, not the older
 stable trees, as we can't go back in time :)
 
 If you had used git here, it could have tried to handle the merging
 properly, but as-is, it can't figure out what is going on:
 
 $ git am --3way ../s2
 Applying: staging: dgap: Merge dgap_fep5.c into dgap_driver.c
 fatal: sha1 information is lacking or useless 
 (drivers/staging/dgap/dgap_driver.c).
 Repository lacks necessary blobs to fall back on 3-way merge.
 Cannot fall back to three-way merge.
 Patch failed at 0001 staging: dgap: Merge dgap_fep5.c into dgap_driver.c
 The copy of the patch that failed is found in:
/home/gregkh/linux/work/staging/.git/rebase-apply/patch
 When you have resolved this problem, run git am --continue.
 If you prefer to skip this patch, run git am --skip instead.
 To restore the original branch and stop patching, run git am --abort.
 
 So, can you redo this whole patch series against 3.14-rc2 so I can apply
 them?
 
 Sorry for the extra work, it will save time in the long run :)
 

No problem, I can redo them next week. I need the practice anyway. Maybe
I'll try with git? Should I possibly use your git tree instead of 3.14-rc2?

Thanks again
Mark

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Hartley Sweeten
On Friday, February 14, 2014 4:50 AM, Ian Abbott wrote:
 On 2014-02-13 18:25, Hartley Sweeten wrote:
 On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote:
 In this if-else conditional statement, if (chan  16), but
 (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early,
 but the else-branch does not get executed either.  As a result, mask
 would be used uninitialized in the next line.  What we want here is if
 (chan  16) and (data[0] != INSN_CONFIG_DIO_QUERY), return an error, but
 in every other case, initialize mask and then proceed.  Found by a static
 checker.

 Signed-off-by: Chase Southwood chase.southw...@yahoo.com
 ---
   drivers/staging/comedi/drivers/addi_apci_3xxx.c | 12 +---
   1 file changed, 5 insertions(+), 7 deletions(-)

 diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c 
 b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
 index ceadf8e..04c5153 100644
 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c
 +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
 @@ -688,13 +688,11 @@ static int apci3xxx_dio_insn_config(struct 
 comedi_device *dev,
  * Port 1 (channels 8-15) are always outputs
  * Port 2 (channels 16-23) are programmable i/o
  */
 -   if (chan  16) {
 -   if (data[0] != INSN_CONFIG_DIO_QUERY)
 -   return -EINVAL;
 -   } else {
 -   /* changing any channel in port 2 changes the entire port */
 -   mask = 0xff;
 -   }
 +   if ((chan  16)  (data[0] != INSN_CONFIG_DIO_QUERY))
 +   return -EINVAL;
 +
 +   /* changing any channel in port 2 changes the entire port */
 +   mask = 0xff;

 ret = comedi_dio_insn_config(dev, s, insn, data, mask);
 if (ret)

 The uninitialized mask when chan  16 is an issue. But your patch is not 
 quite correct.

 The original code was intending to limit the valid instructions for channels 
  16 to only
 INSN_CONFIG_DIO_QUERY. These channels have fixed directions: 0-7 (port 0) are
 always inputs and 8-15 (port 1) are always outputs. Channels 16-23 (port 2) 
 have
 programmable direction but changing any channel effects the entire port, 
 that's
 what the 0xff mask is for.

 Changing the mask to 0xff for any chanspec will result in the 
 INSN_CONFIG_DIO_QUERY
 instruction returning the direction of port 2 regardless of what the 
 chanspec is.

 The right fix would be:
 1) Default the mask to 0 so that comedi_dio_insn_config() will use a 
 chan_mask
 based on the chanspec for the INSN_CONFIG_DIO_QUERY instruction.
 2) Ignore all instructions except INSN_CONFIG_DIO_QUERY when the chan  16.
 3) Modify the mask for chan = 16 when the instruction is not 
 INSN_CONFIG_DIO_QUERY
 so that the INSN_CONFIG_DIO_{INPUT,OUTPUT} instructions update the entire
 port.

 Agreed, but another question is why does comedi_dio_insn_config() in 
 drivers.c need to look at the supplied mask at all for 
 INSN_CONFIG_DIO_QUERY?

It doesn't, that's why the mask is set to a default of 0 (1 above) and only 
modified
(3 above) when the instruction is not INSN_CONFIG_DIO_QUERY and chan = 16.

With a mask of 0 comedi_dio_insn_config() will properly figure out the mask 
based
on the chanspec.

Regards,
Hartley

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC 01/17 v2] staging: dgap: Merge dgap_fep5.c into dgap_driver.c

2014-02-14 Thread Greg Kroah-Hartman
On Fri, Feb 14, 2014 at 12:45:30PM -0500, Mark Hounschell wrote:
 On 02/14/2014 12:38 PM, Greg Kroah-Hartman wrote:
  On Wed, Feb 12, 2014 at 03:32:10PM -0500, Mark Hounschell wrote:
  There is a lot of cleanup work to do on these digi drivers and merging as
  much as is possible will make it easier. I also notice that many merged 
  drivers are single source and header. 
 
  Merge dgap_fep5.c into dgap_driver.c
 
  Signed-off-by: Mark Hounschell ma...@compro.net
  Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 
   drivers/staging/dgap/Makefile  |2 
   drivers/staging/dgap/dgap_driver.c | 1877 +-
   drivers/staging/dgap/dgap_fep5.c   | 1948 ---
   3 files changed, 1862 insertions(+), 1965 deletions(-)
 
  diff -urN linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c 
  linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c
  --- linux-3.13.1-orig/drivers/staging/dgap/dgap_driver.c   2014-01-29 
  08:06:37.0 -0500
  +++ linux-3.13.1-new/drivers/staging/dgap/dgap_driver.c2014-01-31 
  10:22:53.675819451 -0500
  
  Another good reason to use git is that I can't apply this patch to my
  trees, as you made it against the 3.13.1 tree, yet it needs to be
  applied to the 3.14-rc1 tree, which is a few thousand changes beyond
  3.13.  We have to work against the development trees, not the older
  stable trees, as we can't go back in time :)
  
  If you had used git here, it could have tried to handle the merging
  properly, but as-is, it can't figure out what is going on:
  
  $ git am --3way ../s2
  Applying: staging: dgap: Merge dgap_fep5.c into dgap_driver.c
  fatal: sha1 information is lacking or useless 
  (drivers/staging/dgap/dgap_driver.c).
  Repository lacks necessary blobs to fall back on 3-way merge.
  Cannot fall back to three-way merge.
  Patch failed at 0001 staging: dgap: Merge dgap_fep5.c into dgap_driver.c
  The copy of the patch that failed is found in:
 /home/gregkh/linux/work/staging/.git/rebase-apply/patch
  When you have resolved this problem, run git am --continue.
  If you prefer to skip this patch, run git am --skip instead.
  To restore the original branch and stop patching, run git am --abort.
  
  So, can you redo this whole patch series against 3.14-rc2 so I can apply
  them?
  
  Sorry for the extra work, it will save time in the long run :)
  
 
 No problem, I can redo them next week. I need the practice anyway. Maybe
 I'll try with git? Should I possibly use your git tree instead of 3.14-rc2?

Yes, please feel free to work off of the staging-next branch of my
staging.git tree, as that is where I will have to apply them.

If you have problems, please let me know.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[GIT PULL] Staging driver fixes for 3.14-rc3

2014-02-14 Thread Greg KH
The following changes since commit 38dbfb59d1175ef458d006556061adeaa8751b72:

  Linus 3.14-rc1 (2014-02-02 16:42:13 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ 
tags/staging-3.14-rc3

for you to fetch changes up to ddf5eb564d97c94e114b45e84c89ce0e7024a9ac:

  staging/rtl8821ae: fix build, depends on MAC80211 (2014-02-11 15:57:40 -0800)


Staging driver fixes for 3.14-rc3

Here are a number (lots, I know) of fixes for staging drivers to resolve
a bunch of reported issues.

The largest patches here is one revert of a patch that is in 3.14-rc1 to
fix reported problems, and a sync of a usb host driver that required
some ARM patches to go in before it could be accepted (which is why it
missed -rc1).

All of these have been in linux-next for a while with no reported issues.

Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org


Alan Cox (1):
  xlr_net: Fix missing trivial allocation check

Alexandre Belloni (2):
  iio: mxs-lradc: fix buffer overflow
  iio: mxs-lradc: remove useless scale_available files

Alexey Khoroshilov (1):
  staging: gdm72xx: fix leaks at failure path in gdm_usb_probe()

Alistair Strachan (1):
  staging: sync: Fix a race condition between release_obj and print_obj

Beomho Seo (1):
  iio: ak8975: Fix calculation formula for convert micro tesla to gauss unit

Chen Gang (1):
  drivers: staging: android: ion: ion_dummy_driver: include linux/io.h

Colin Cross (1):
  staging: ion: Fix overflow and list bugs in system heap

Craig Markwardt (1):
  iio: Fix a buffer overflow in iio_utils.h example code

Cédric Dufour - Idiap Research Institute (1):
  staging: lustre: fix quotactl permission denied (LU-4530)

Dan Carpenter (5):
  staging: r8188eu: memory corruption handling long ssids
  staging: android: ion: dummy: fix an error code
  gpu: ion: dereferencing an ERR_PTR
  staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
  staging: r8188eu: overflow in rtw_p2p_get_go_device_address()

David Daney (1):
  staging: octeon-usb: Probe via device tree populated platform device.

Greg Hackmann (1):
  staging: sw_sync: Add stubs for kernels without CONFIG_SW_SYNC

Greg Kroah-Hartman (3):
  Merge tag 'iio-fixes-for-3.14a' of git://git.kernel.org/.../jic23/iio 
into staging-linus
  Revert Staging: dgrp: Refactor the function dgrp_receive() in 
drrp_net_ops.c
  Merge tag 'iio-fixes-for-3.14b' of git://git.kernel.org/.../jic23/iio 
into staging-linus

Guenter Roeck (1):
  iio: max1363: Use devm_regulator_get_optional for optional regulator

H Hartley Sweeten (1):
  staging: comedi: adv_pci1710: fix analog output readback value

Hartmut Knaack (2):
  staging:iio:ad799x fix error_free_irq which was freeing an irq that may 
not have been requested
  staging:iio:ad799x fix typo in ad799x_events[]

Heinrich Schuchardt (1):
  usbip/userspace/libsrc/names.c: memory leak

Ian Abbott (2):
  staging: comedi: fix too early cleanup in comedi_auto_config()
  staging: comedi: usbduxsigma: fix unaligned dereferences

Ivaylo Dimitrov (1):
  iio: tsl2563: Use the correct channel2 member

John Stultz (1):
  staging: ion: Fix build warning

Jonathan Cameron (1):
  staging:iio:ad799x fix incorrect endianness specification for buffer 
elements

Julia Lawall (1):
  staging:iio:impedance:ad5933: correct error check

Larry Finger (1):
  staging: r8188eu: Fix typo in USB_DEVICE list

Laura Abbott (1):
  staging: ion: Fix ION_IOC_FREE compat ioctl

Marcus Folkesson (1):
  iio: adis16400: Set timestamp as the last element in chan_spec

Marek Szyprowski (1):
  staging: lustre: fix GFP_ATOMIC macro usage

Maurizio Lombardi (1):
  wlags49_h2: Fix overflow in wireless_set_essid()

Oleg Drokin (5):
  staging/lustre: fix compile warning with is_vmalloc_addr
  staging/lustre/lnet: Fix use after free in ksocknal_send
  lustre: Account for changelog_ext_rec in CR_MAXSIZE
  lustre: Correct KUC code max changelog msg size
  lustre: add myself to list of people to CC on lustre patches

Paul Gortmaker (1):
  staging: don't use module_init in non-modular ion_dummy_driver.c

Peter Meerwald (3):
  iio:magnetometer:mag3110: Report busy in _read_raw() / write_raw() when 
buffer is enabled
  iio:magnetometer:mag3110: Fix output of decimal digits in 
show_int_plus_micros()
  iio:accel:bma180: Use modifier instead of index in channel specification

Prakash Kamliya (1):
  staging: android: sync: Signal pt before sync_timeline object gets 
destroyed

Randy Dunlap (1):
  staging/rtl8821ae: fix build, depends on MAC80211

Richard Weinberger (2):
  staging:iio:spear_adc: Add dependency on HAS_IOMEM
  staging:iio:lpc32xx_adc: Add dependency on HAS_IOMEM


[PATCH] [RFC] staging: rtl8821ae: fix invalid bit mask on MSR_AP check

2014-02-14 Thread Levente Kurusa
Since MSR_AP is 0x3, ANDing it with 0xFC will never be true.
Add a NOT operation to 0xFC so that we will AND with the last
three bits which will result in a possibility that the condition
will succeed.

Signed-off-by: Levente Kurusa le...@linux.com
---
 Hi,

 This might not be the real solution since it is also possible that
 the particular condition never really happens. I seek comments
 so that I can post the proper patch.

 Thanks!
 
 drivers/staging/rtl8821ae/rtl8821ae/hw.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hw.c 
b/drivers/staging/rtl8821ae/rtl8821ae/hw.c
index 5ed7a11..f204b31 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hw.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hw.c
@@ -1622,7 +1622,7 @@ static int _rtl8821ae_set_media_status(struct 
ieee80211_hw *hw,
 
rtl_write_byte(rtlpriv, (MSR), bt_msr);
rtlpriv-cfg-ops-led_control(hw, ledaction);
-   if ((bt_msr  0xfc) == MSR_AP)
+   if ((bt_msr  ~0xfc) == MSR_AP)
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
else
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] [RFC] staging: rtl8821ae: fix invalid bit mask on MSR_AP check

2014-02-14 Thread Dan Carpenter
On Fri, Feb 14, 2014 at 10:50:23PM +0100, Levente Kurusa wrote:
 Since MSR_AP is 0x3, ANDing it with 0xFC will never be true.
 Add a NOT operation to 0xFC so that we will AND with the last
 three bits which will result in a possibility that the condition
 will succeed.
 
 Signed-off-by: Levente Kurusa le...@linux.com
 ---
  Hi,
 
  This might not be the real solution since it is also possible that
  the particular condition never really happens. I seek comments
  so that I can post the proper patch.
 

I can't test it either but I think your fix is correct.

Reviewed-by: Dan Carpenter dan.carpen...@oracle.com

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH] hyperv_fb: Add screen refresh after pause/resume operation

2014-02-14 Thread Haiyang Zhang


 -Original Message-
 From: Haiyang Zhang [mailto:haiya...@microsoft.com]
 Sent: Monday, January 13, 2014 7:21 PM
 To: florianschandi...@gmx.de; a...@linux-foundation.org; linux-
 fb...@vger.kernel.org
 Cc: Haiyang Zhang; KY Srinivasan; o...@aepfle.de; jasow...@redhat.com;
 linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org
 Subject: [PATCH] hyperv_fb: Add screen refresh after pause/resume
 operation
 
 This is necessary because after VM is pause/resumed, some portion of the
 screen may need refresh.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com
 ---

Hi Tomi and Andrew,

This patch has been submitted for a while. Do I need to re-submit it, or make
any changes?

Thanks,
- Haiyang

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH] hyperv_fb: Add support for Gen2 VM

2014-02-14 Thread Haiyang Zhang


 -Original Message-
 From: linux-fbdev-ow...@vger.kernel.org [mailto:linux-fbdev-
 ow...@vger.kernel.org] On Behalf Of Haiyang Zhang
 Sent: Saturday, February 8, 2014 12:26 PM
 To: florianschandi...@gmx.de; a...@linux-foundation.org; linux-
 fb...@vger.kernel.org
 Cc: Haiyang Zhang; KY Srinivasan; o...@aepfle.de; jasow...@redhat.com;
 gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev-
 de...@linuxdriverproject.org
 Subject: [PATCH] hyperv_fb: Add support for Gen2 VM
 
 This patch enables Hyper-V FB driver to run on Gen2 VM.
 
 The Gen2 VM provides MMIO area for synthetic video from ACPI module,
 which is exported by vmbus. The generic video is provided by UEFI. PCI video
 in Gen1 is no longer available.
 
 To support synthetic video on Hyper-V Gen2 VM, this patch updated code
 related to the changes above.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com
 ---

Hi Tomi and Andrew,

This patch has been submitted for a while. Do I need to re-submit it, or 
make any changes?

Thanks,
- Haiyang

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/13] staging: r8188eu: Remove pointless alignment entry in recv_frame

2014-02-14 Thread Larry Finger
This alignment entry in union recv_frame does nothing. It certainly
dues not ensure alignment.

Suggested-by: jes.soren...@redhat.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: jes.soren...@redhat.com
---
 drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 866c9e4..c6d7a65 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -292,7 +292,6 @@ struct recv_frame_hdr {
 union recv_frame {
union {
struct recv_frame_hdr hdr;
-   uint mem[RECVFRAME_HDR_ALIGN2];
} u;
 };
 
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/13] Cleanups for r8188eu

2014-02-14 Thread Larry Finger
This set of patches removes a number of wrappers that only tend to obfuscate
the code. These do not cause any functional changes.

The one exception is the last patch. It changes the code to hold the firmware
image in memory until the device is closed. That way, it is no longer necessary
to reread the disk file every time the device reinits.

Signed-off-by: Larry Finger larry.fin...@lwfinger.net


Larry Finger (12):
  staging: r8188eu: Remove unnecessary list_head entry from recv_frame
union
  staging: r8188eu: Remove pointless alignment entry in recv_frame
  staging: r8188eu: Remove union wrapping of recv_frame
  staging: r8188eu: Remove pkt_to_recv{frame,data,mem} routines
  staging: r8188eu: Remove unused get_rxbuf_desc()
  staging: r8188eu: Remove get_recvframe_len()
  staging: r8188eu: Remove get_recvframe_data()
  staging: r8188eu: Remove unused union
  staging: r8188eu: Remove wrapper _exit_critical_mutex()
  staging: r8188eu: Remove wrapper _enter_critical_mutex()
  staging: r8188eu: Remove wrapper routine _init_workitem()
  staging: r8188eu: Remove wrapper routine _set_workitem()

Stas Sergeev (1):
  staging: r8188eu: Make firmware buffer persistent

 drivers/staging/rtl8188eu/core/rtw_cmd.c  |   2 +-
 drivers/staging/rtl8188eu/core/rtw_led.c  |   4 +-
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 148 -
 drivers/staging/rtl8188eu/core/rtw_recv.c | 352 --
 drivers/staging/rtl8188eu/core/rtw_security.c |  18 +-
 drivers/staging/rtl8188eu/core/rtw_sta_mgt.c  |  10 +-
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |  80 ++---
 drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c   |  33 +-
 drivers/staging/rtl8188eu/hal/usb_ops_linux.c |  48 +--
 drivers/staging/rtl8188eu/include/drv_types.h |   6 +
 drivers/staging/rtl8188eu/include/osdep_service.h |  27 --
 drivers/staging/rtl8188eu/include/recv_osdep.h|  10 +-
 drivers/staging/rtl8188eu/include/rtl8188e_hal.h  |  11 -
 drivers/staging/rtl8188eu/include/rtl8188e_recv.h |   7 +-
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h  |  49 +--
 drivers/staging/rtl8188eu/include/rtw_recv.h  | 139 +++--
 drivers/staging/rtl8188eu/include/rtw_xmit.h  |   5 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   |   9 +-
 drivers/staging/rtl8188eu/os_dep/recv_linux.c |  36 +--
 19 files changed, 472 insertions(+), 522 deletions(-)

-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/13] staging: r8188eu: Remove pkt_to_recv{frame, data, mem} routines

2014-02-14 Thread Larry Finger
These functions are not called from the outside source.

Suggested-by: Jes Sorensen jes.soren...@redhat.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8188eu/include/rtw_recv.h | 38 
 1 file changed, 38 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index e579c38..81fdcf5 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -415,44 +415,6 @@ static inline unsigned char *get_rxbuf_desc(struct 
recv_frame *precvframe)
return buf_desc;
 }
 
-static inline struct recv_frame *rxmem_to_recvframe(u8 *rxmem)
-{
-   /* due to the design of 2048 bytes alignment of recv_frame,
-* we can reference the struct recv_frame */
-   /* from any given member of recv_frame. */
-   /*  rxmem indicates the any member/address in recv_frame */
-
-   return (struct recv_frame *)(((size_t)rxmem  RXFRAME_ALIGN) 
-RXFRAME_ALIGN);
-}
-
-static inline struct recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
-{
-   u8 *buf_star;
-   struct recv_frame *precv_frame;
-   precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
-
-   return precv_frame;
-}
-
-static inline u8 *pkt_to_recvmem(struct sk_buff *pkt)
-{
-   /*  return the rx_head */
-
-   struct recv_frame *precv_frame = pkt_to_recvframe(pkt);
-
-   return  precv_frame-rx_head;
-}
-
-static inline u8 *pkt_to_recvdata(struct sk_buff *pkt)
-{
-   /*  return the rx_data */
-
-   struct recv_frame *precv_frame = pkt_to_recvframe(pkt);
-
-   return  precv_frame-rx_data;
-}
-
 static inline int get_recvframe_len(struct recv_frame *precvframe)
 {
return precvframe-len;
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/13] staging: r8188eu: Remove unnecessary list_head entry from recv_frame union

2014-02-14 Thread Larry Finger
Struct recv_frame_hdr already contains a list head. This one is pointless.

Suggested-by: Jes Sorensen jes.soren...@redhat.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8188eu/core/rtw_recv.c| 7 ---
 drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index bc5baf2..6979c73 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -87,9 +87,10 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct 
adapter *padapter)
precvframe = (union recv_frame *)precvpriv-precv_frame_buf;
 
for (i = 0; i  NR_RECVFRAME; i++) {
-   _rtw_init_listhead((precvframe-u.list));
+   _rtw_init_listhead((precvframe-u.hdr.list));
 
-   rtw_list_insert_tail((precvframe-u.list), 
(precvpriv-free_recv_queue.queue));
+   rtw_list_insert_tail((precvframe-u.hdr.list),
+(precvpriv-free_recv_queue.queue));
 
res = rtw_os_recv_resource_alloc(padapter, precvframe);
 
@@ -1485,7 +1486,7 @@ static union recv_frame *recvframe_defrag(struct adapter 
*adapter, struct __queu
plist = phead-next;
pfhdr = container_of(plist, struct recv_frame_hdr, list);
prframe = (union recv_frame *)pfhdr;
-   rtw_list_delete((prframe-u.list));
+   rtw_list_delete((prframe-u.hdr.list));
 
if (curfragnum != pfhdr-attrib.frag_num) {
/* the first fragment number must be 0 */
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index be9c30c..866c9e4 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -291,7 +291,6 @@ struct recv_frame_hdr {
 
 union recv_frame {
union {
-   struct list_head list;
struct recv_frame_hdr hdr;
uint mem[RECVFRAME_HDR_ALIGN2];
} u;
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/13] staging: r8188eu: Remove unused get_rxbuf_desc()

2014-02-14 Thread Larry Finger
Reported-by: Jes Sorensen jes.soren...@redhat.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8188eu/include/rtw_recv.h | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 81fdcf5..2159639 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -406,15 +406,6 @@ static inline u8 *recvframe_pull_tail(struct recv_frame 
*precvframe, int sz)
return precvframe-rx_tail;
 }
 
-static inline unsigned char *get_rxbuf_desc(struct recv_frame *precvframe)
-{
-   unsigned char *buf_desc;
-
-   if (precvframe == NULL)
-   return NULL;
-   return buf_desc;
-}
-
 static inline int get_recvframe_len(struct recv_frame *precvframe)
 {
return precvframe-len;
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/13] staging: r8188eu: Remove get_recvframe_len()

2014-02-14 Thread Larry Finger
This simple routine is replaced by a simple access of the len member.

Reported-by: Jes Sorensen jes.soren...@redhat.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8188eu/core/rtw_recv.c| 2 +-
 drivers/staging/rtl8188eu/include/rtw_recv.h | 5 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 1e40eba..d174a6c 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -743,7 +743,7 @@ static void count_rx_stats(struct adapter *padapter,
struct rx_pkt_attrib*pattrib = prframe-attrib;
struct recv_priv*precvpriv = padapter-recvpriv;
 
-   sz = get_recvframe_len(prframe);
+   sz = prframe-len;
precvpriv-rx_bytes += sz;
 
padapter-mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 2159639..1f4d984 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -406,11 +406,6 @@ static inline u8 *recvframe_pull_tail(struct recv_frame 
*precvframe, int sz)
return precvframe-rx_tail;
 }
 
-static inline int get_recvframe_len(struct recv_frame *precvframe)
-{
-   return precvframe-len;
-}
-
 static inline s32 translate_percentage_to_dbm(u32 sig_stren_index)
 {
s32 power; /*  in dBm. */
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/13] staging: r8188eu: Remove wrapper _exit_critical_mutex()

2014-02-14 Thread Larry Finger
This wrapper is a simple call to mutex_exit().

Signed-off-by: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
 drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 2 +-
 drivers/staging/rtl8188eu/include/osdep_service.h | 7 ---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 2 +-
 4 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index faeec73..c197b22 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -4438,7 +4438,7 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, 
struct xmit_frame *pmg
}
 
pxmitpriv-ack_tx = false;
-   _exit_critical_mutex(pxmitpriv-ack_tx_mutex, NULL);
+   mutex_unlock(pxmitpriv-ack_tx_mutex);
 
 return ret;
 }
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c 
b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index 1bfe497..1fa5370 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -111,7 +111,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 
request, u16 value, u
break;
}
 release_mutex:
-   _exit_critical_mutex(dvobjpriv-usb_vendor_req_mutex, NULL);
+   mutex_unlock(dvobjpriv-usb_vendor_req_mutex);
 exit:
return status;
 }
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 09e2d48..5cf13a6 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -76,13 +76,6 @@ static inline int _enter_critical_mutex(struct mutex *pmutex,
return ret;
 }
 
-
-static inline void _exit_critical_mutex(struct mutex *pmutex,
-   unsigned long *pirqL)
-{
-   mutex_unlock(pmutex);
-}
-
 static inline void rtw_list_delete(struct list_head *plist)
 {
list_del_init(plist);
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index cf4107a..bc9ae1d 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -,7 +,7 @@ int netdev_open(struct net_device *pnetdev)
 
_enter_critical_mutex(padapter-hw_init_mutex, NULL);
ret = _netdev_open(pnetdev);
-   _exit_critical_mutex(padapter-hw_init_mutex, NULL);
+   mutex_unlock(padapter-hw_init_mutex);
return ret;
 }
 
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/13] staging: r8188eu: Make firmware buffer persistent

2014-02-14 Thread Larry Finger
From: Stas Sergeev s...@users.sourceforge.net

The present code reloads the firmware file from the disk every time the 
interface
re-inits. Change to hold the firmware in memory, and only download to the
device.

Signed-off-by: Stas Sergeev s...@users.sourceforge.net
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 80 +--
 drivers/staging/rtl8188eu/include/drv_types.h |  6 ++
 drivers/staging/rtl8188eu/include/rtl8188e_hal.h  | 11 
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   |  4 ++
 4 files changed, 54 insertions(+), 47 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c 
b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index 13c0619..f9d5558 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -584,59 +584,70 @@ static s32 _FWFreeToGo(struct adapter *padapter)
 
 #define IS_FW_81xxC(padapter)  (((GET_HAL_DATA(padapter))-FirmwareSignature  
0xFFF0) == 0x88C0)
 
-s32 rtl8188e_FirmwareDownload(struct adapter *padapter)
+static int load_firmware(struct rt_firmware *pFirmware, struct device *device)
 {
-   s32 rtStatus = _SUCCESS;
-   u8 writeFW_retry = 0;
-   u32 fwdl_start_time;
-   struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
-   struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
-   struct device *device = dvobj_to_dev(dvobj);
-   struct rt_firmware *pFirmware = NULL;
+   int rtstatus = _SUCCESS;
const struct firmware *fw;
-   struct rt_firmware_hdr *pFwHdr = NULL;
-   u8 *pFirmwareBuf;
-   u32 FirmwareLen;
-   char fw_name[] = rtlwifi/rtl8188eufw.bin;
-   static int log_version;
-
-   RT_TRACE(_module_hal_init_c_, _drv_info_, (+%s\n, __func__));
-   pFirmware = (struct rt_firmware *)rtw_zmalloc(sizeof(struct 
rt_firmware));
-   if (!pFirmware) {
-   rtStatus = _FAIL;
-   goto Exit;
-   }
+   const char fw_name[] = rtlwifi/rtl8188eufw.bin;
 
if (request_firmware(fw, fw_name, device)) {
-   rtStatus = _FAIL;
-   goto Exit;
+   rtstatus = _FAIL;
+   goto exit;
}
if (!fw) {
pr_err(Firmware %s not available\n, fw_name);
-   rtStatus = _FAIL;
-   goto Exit;
+   rtstatus = _FAIL;
+   goto exit;
}
if (fw-size  FW_8188E_SIZE) {
-   rtStatus = _FAIL;
-   RT_TRACE(_module_hal_init_c_, _drv_err_, (Firmware size exceed 
0x%X. Check it.\n, FW_8188E_SIZE));
-   goto Exit;
+   rtstatus = _FAIL;
+   RT_TRACE(_module_hal_init_c_, _drv_err_,
+(Firmware size exceed 0x%X. Check it.\n,
+FW_8188E_SIZE));
+   goto exit;
}
 
pFirmware-szFwBuffer = kzalloc(FW_8188E_SIZE, GFP_KERNEL);
if (!pFirmware-szFwBuffer) {
-   rtStatus = _FAIL;
-   goto Exit;
+   rtstatus = _FAIL;
+   goto exit;
}
memcpy(pFirmware-szFwBuffer, fw-data, fw-size);
pFirmware-ulFwLength = fw-size;
-   pFirmwareBuf = pFirmware-szFwBuffer;
-   FirmwareLen = pFirmware-ulFwLength;
release_firmware(fw);
 
-   DBG_88E_LEVEL(_drv_info_, +%s: !bUsedWoWLANFw, FmrmwareLen:%d+\n, 
__func__, FirmwareLen);
+   DBG_88E_LEVEL(_drv_info_,
+ +%s: !bUsedWoWLANFw, FmrmwareLen:%d+\n, __func__,
+ pFirmware-ulFwLength);
+exit:
+   return rtstatus;
+}
+
+s32 rtl8188e_FirmwareDownload(struct adapter *padapter)
+{
+   s32 rtStatus = _SUCCESS;
+   u8 writeFW_retry = 0;
+   u32 fwdl_start_time;
+   struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
+   struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
+   struct device *device = dvobj_to_dev(dvobj);
+   struct rt_firmware_hdr *pFwHdr = NULL;
+   u8 *pFirmwareBuf;
+   u32 FirmwareLen;
+   static int log_version;
+
+   RT_TRACE(_module_hal_init_c_, _drv_info_, (+%s\n, __func__));
+   if (!dvobj-firmware.szFwBuffer)
+   rtStatus = load_firmware(dvobj-firmware, device);
+   if (rtStatus == _FAIL) {
+   dvobj-firmware.szFwBuffer = NULL;
+   goto Exit;
+   }
+   pFirmwareBuf = dvobj-firmware.szFwBuffer;
+   FirmwareLen = dvobj-firmware.ulFwLength;
 
/*  To Check Fw header. Added by tynli. 2009.12.04. */
-   pFwHdr = (struct rt_firmware_hdr *)pFirmware-szFwBuffer;
+   pFwHdr = (struct rt_firmware_hdr *)dvobj-firmware.szFwBuffer;
 
pHalData-FirmwareVersion =  le16_to_cpu(pFwHdr-Version);
pHalData-FirmwareSubVersion = pFwHdr-Subversion;
@@ -688,10 +699,7 @@ s32 rtl8188e_FirmwareDownload(struct adapter *padapter)
goto Exit;
}

[PATCH 07/13] staging: r8188eu: Remove get_recvframe_data()

2014-02-14 Thread Larry Finger
This inline function checks that the pointer is not NULL and then returns
the rx_data member. Unfortunately, all 3 callers of this function have
dereferenced that pointer before this routine is called. As the check for
NULL is useless, eliminate the routine.

Reported-by: Jes Sorensen jes.soren...@redhat.com
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
Cc: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8188eu/core/rtw_recv.c   | 6 ++
 drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +-
 drivers/staging/rtl8188eu/include/rtw_recv.h| 9 -
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c 
b/drivers/staging/rtl8188eu/core/rtw_recv.c
index d174a6c..a618426 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -562,7 +562,7 @@ static struct recv_frame *portctrl(struct adapter *adapter,
 
auth_alg = adapter-securitypriv.dot11AuthAlgrthm;
 
-   ptr = get_recvframe_data(precv_frame);
+   ptr = precv_frame-rx_data;
pfhdr = precv_frame;
pattrib = pfhdr-attrib;
psta_addr = pattrib-ta;
@@ -1440,11 +1440,9 @@ static int wlanhdr_to_ethhdr(struct recv_frame 
*precvframe)
int ret = _SUCCESS;
struct adapter  *adapter = precvframe-adapter;
struct mlme_priv*pmlmepriv = adapter-mlmepriv;
-
-   u8  *ptr = get_recvframe_data(precvframe); /*  point to frame_ctrl 
field */
+   u8 *ptr = precvframe-rx_data;
struct rx_pkt_attrib *pattrib = precvframe-attrib;
 
-
if (pattrib-encrypt)
recvframe_pull_tail(precvframe, pattrib-icv_len);
 
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c 
b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
index f29bb79..43eb960 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
@@ -157,7 +157,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame 
*precvframe,
pkt_info.bPacketToSelf = false;
pkt_info.bPacketBeacon = false;
 
-   wlanhdr = get_recvframe_data(precvframe);
+   wlanhdr = precvframe-rx_data;
 
pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) 
!pattrib-icv_err  !pattrib-crc_err 
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 1f4d984..bcbce46 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -321,15 +321,6 @@ static inline u8 *get_rx_status(struct recv_frame 
*precvframe)
return get_rxmem(precvframe);
 }
 
-static inline u8 *get_recvframe_data(struct recv_frame *precvframe)
-{
-   /* always return rx_data */
-   if (precvframe == NULL)
-   return NULL;
-
-   return precvframe-rx_data;
-}
-
 static inline u8 *recvframe_push(struct recv_frame *precvframe, int sz)
 {
/*  append data before rx_data */
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/13] staging: r8188eu: Remove wrapper routine _init_workitem()

2014-02-14 Thread Larry Finger
This is simply another name for INIT_WORK().

Signed-off-by: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c  | 2 +-
 drivers/staging/rtl8188eu/core/rtw_led.c  | 2 +-
 drivers/staging/rtl8188eu/include/osdep_service.h | 6 --
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c 
b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index bc78736..c0a0a52 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -84,7 +84,7 @@ int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
atomic_set(pevtpriv-event_seq, 0);
pevtpriv-evt_done_cnt = 0;
 
-   _init_workitem(pevtpriv-c2h_wk, c2h_wk_callback, NULL);
+   INIT_WORK(pevtpriv-c2h_wk, c2h_wk_callback);
pevtpriv-c2h_wk_alive = false;
pevtpriv-c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
 
diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c 
b/drivers/staging/rtl8188eu/core/rtw_led.c
index afac537..b9c9fc0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_led.c
+++ b/drivers/staging/rtl8188eu/core/rtw_led.c
@@ -80,7 +80,7 @@ void InitLed871x(struct adapter *padapter, struct LED_871x 
*pLed, enum LED_PIN_8
 
_init_timer((pLed-BlinkTimer), padapter-pnetdev, BlinkTimerCallback, 
pLed);
 
-   _init_workitem((pLed-BlinkWorkItem), BlinkWorkItemCallback, pLed);
+   INIT_WORK((pLed-BlinkWorkItem), BlinkWorkItemCallback);
 }
 
 
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 64a7c34..76f5827 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -97,12 +97,6 @@ static inline void _cancel_timer(struct timer_list *ptimer, 
u8 *bcancelled)
 #define RTW_DECLARE_TIMER_HDL(name) \
void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
 
-static inline void _init_workitem(struct work_struct *pwork, void *pfunc,
- void *cntx)
-{
-   INIT_WORK(pwork, pfunc);
-}
-
 static inline void _set_workitem(struct work_struct *pwork)
 {
schedule_work(pwork);
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/13] staging: r8188eu: Remove unused union

2014-02-14 Thread Larry Finger
Signed-off-by: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/include/rtw_xmit.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_xmit.h 
b/drivers/staging/rtl8188eu/include/rtw_xmit.h
index 1ac1dd3..62f5db1 100644
--- a/drivers/staging/rtl8188eu/include/rtw_xmit.h
+++ b/drivers/staging/rtl8188eu/include/rtw_xmit.h
@@ -105,11 +105,6 @@ struct tx_desc {
__le32 txdw7;
 };
 
-union txdesc {
-   struct tx_desc txdesc;
-   unsigned int value[TXDESC_SIZE2];
-};
-
 struct hw_xmit {
struct __queue *sta_queue;
int accnt;
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/13] staging: r8188eu: Remove wrapper routine _set_workitem()

2014-02-14 Thread Larry Finger
This is simply a wrapper around schedule_work().

Signed-off-by: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/core/rtw_led.c  | 2 +-
 drivers/staging/rtl8188eu/include/osdep_service.h | 5 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c 
b/drivers/staging/rtl8188eu/core/rtw_led.c
index b9c9fc0..42b41ab 100644
--- a/drivers/staging/rtl8188eu/core/rtw_led.c
+++ b/drivers/staging/rtl8188eu/core/rtw_led.c
@@ -34,7 +34,7 @@ void BlinkTimerCallback(void *data)
if ((padapter-bSurpriseRemoved) || (padapter-bDriverStopped))
return;
 
-   _set_workitem((pLed-BlinkWorkItem));
+   schedule_work((pLed-BlinkWorkItem));
 }
 
 /*  */
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 76f5827..882ff16 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -97,11 +97,6 @@ static inline void _cancel_timer(struct timer_list *ptimer, 
u8 *bcancelled)
 #define RTW_DECLARE_TIMER_HDL(name) \
void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
 
-static inline void _set_workitem(struct work_struct *pwork)
-{
-   schedule_work(pwork);
-}
-
 static inline void _cancel_workitem_sync(struct work_struct *pwork)
 {
cancel_work_sync(pwork);
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/13] staging: r8188eu: Remove wrapper _enter_critical_mutex()

2014-02-14 Thread Larry Finger
This wrapper returned the result of mutex_lock_interruptible(); however,
none of the callers checked the returned value.

As a result of a gcc upgrade to version 4.8.1, two false unitialized variable
warnings appeared. To silence the warnings, they are initialized to 0.

Signed-off-by: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 ++-
 drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 8 +---
 drivers/staging/rtl8188eu/include/osdep_service.h | 9 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 3 ++-
 4 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index c197b22..e95a1ba 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -4429,7 +4429,8 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, 
struct xmit_frame *pmg
if (padapter-bSurpriseRemoved || padapter-bDriverStopped)
return -1;
 
-   _enter_critical_mutex(pxmitpriv-ack_tx_mutex, NULL);
+   if (mutex_lock_interruptible(pxmitpriv-ack_tx_mutex))
+   return -1;
pxmitpriv-ack_tx = true;
 
pmgntframe-ack_report = 1;
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c 
b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index 1fa5370..d5f6a32 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -49,7 +49,9 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 
request, u16 value, u
goto exit;
}
 
-   _enter_critical_mutex(dvobjpriv-usb_vendor_req_mutex, NULL);
+   if (mutex_lock_interruptible(dvobjpriv-usb_vendor_req_mutex))
+   status = -ENOMEM;
+   goto exit;
 
/*  Acquire IO memory for vendorreq */
pIo_buf = dvobjpriv-usb_vendor_req_buf;
@@ -147,7 +149,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
u16 wvalue;
u16 index;
u16 len;
-   __le32 data;
+   __le32 data = 0;
 
request = 0x05;
requesttype = 0x01;/* read_in */
@@ -166,7 +168,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
u16 wvalue;
u16 index;
u16 len;
-   __le32 data;
+   __le32 data = 0;
 
 
request = 0x05;
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 5cf13a6..64a7c34 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -67,15 +67,6 @@ static inline struct list_head *get_list_head(struct __queue 
*queue)
return (queue-queue);
 }
 
-static inline int _enter_critical_mutex(struct mutex *pmutex,
-   unsigned long *pirqL)
-{
-   int ret;
-
-   ret = mutex_lock_interruptible(pmutex);
-   return ret;
-}
-
 static inline void rtw_list_delete(struct list_head *plist)
 {
list_del_init(plist);
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index bc9ae1d..0cd39ca 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -1109,7 +1109,8 @@ int netdev_open(struct net_device *pnetdev)
int ret;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
 
-   _enter_critical_mutex(padapter-hw_init_mutex, NULL);
+   if (mutex_lock_interruptible(padapter-hw_init_mutex))
+   return -1;
ret = _netdev_open(pnetdev);
mutex_unlock(padapter-hw_init_mutex);
return ret;
-- 
1.8.4.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [patch] Documentation/SubmittingPatches: Reported-by tags and permission

2014-02-14 Thread Randy Dunlap
On 02/14/2014 01:30 AM, Dan Carpenter wrote:
 The reported-by text says you have to ask for permission, but that's
 only if the bug was reported in private.  These days the standard is to
 always give reported-by credit or it's considered a bit rude.
 
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Acked-by: Randy Dunlap rdun...@infradead.org

Thanks.

 diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
 index 26b1e31d5a13..f72ce7803b71 100644
 --- a/Documentation/SubmittingPatches
 +++ b/Documentation/SubmittingPatches
 @@ -432,12 +432,9 @@ have been included in the discussion
  
  14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by:
  
 -If this patch fixes a problem reported by somebody else, consider adding a
 -Reported-by: tag to credit the reporter for their contribution.  Please
 -note that this tag should not be added without the reporter's permission,
 -especially if the problem was not reported in a public forum.  That said,
 -if we diligently credit our bug reporters, they will, hopefully, be
 -inspired to help us again in the future.
 +The Reported-by tag is to give credit to people who find bugs and report 
 them.
 +Please note that if the bug was reported in private, then ask for permission
 +first before using the Reported-by tag.
  
  A Tested-by: tag indicates that the patch has been successfully tested (in
  some environment) by the person named.  This tag informs maintainers that
 --


-- 
~Randy
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()

2014-02-14 Thread Chase Southwood
Since simple_strtoul() has been deprecated, replace it with kstrtouint().
Also, since return code checking for this new function is enforced, add a
check to ensure that the conversion has succeeded.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---
 drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c 
b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
index 7dc5a18..8923e65 100644
--- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
+++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
@@ -41,7 +41,8 @@ struct comedi_device *comedi_open(const char *filename)
if (strncmp(filename, /dev/comedi, 11) != 0)
return NULL;
 
-   minor = simple_strtoul(filename + 11, NULL, 0);
+   if (kstrtouint(filename + 11, 0, minor))
+   return NULL;
 
if (minor = COMEDI_NUM_BOARD_MINORS)
return NULL;
-- 
1.8.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: r8188eu: delete unnecessary field initialization

2014-02-14 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

On success, the function netdev_alloc_skb initializes the dev field of its
result to its first argument, so this doesn't have to be done in the
calling context.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
expression skb,privn,e;
@@

skb = netdev_alloc_skb(privn,...);
... when strict
(
-skb-dev = privn;
|
?skb = e
)
// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
 drivers/staging/rtl8188eu/hal/usb_ops_linux.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c 
b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index 74ee2e6..b92b4f5 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -384,7 +384,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct 
sk_buff *pskb)
 
pkt_copy = netdev_alloc_skb(adapt-pnetdev, alloc_sz);
if (pkt_copy) {
-   pkt_copy-dev = adapt-pnetdev;
precvframe-u.hdr.pkt = pkt_copy;
precvframe-u.hdr.rx_head = pkt_copy-data;
precvframe-u.hdr.rx_end = pkt_copy-data + alloc_sz;

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/3] staging: r8712u: delete unnecessary field initialization

2014-02-14 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

On success, the function netdev_alloc_skb initializes the dev field of its
result to its first argument, so this doesn't have to be done in the
calling context.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
expression skb,privn,e;
@@

skb = netdev_alloc_skb(privn,...);
... when strict
(
-skb-dev = privn;
|
?skb = e
)
// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
 drivers/staging/rtl8712/rtl8712_recv.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_recv.c 
b/drivers/staging/rtl8712/rtl8712_recv.c
index ea96537..0723b2f 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -90,7 +90,6 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct 
_adapter *padapter)
pskb = netdev_alloc_skb(padapter-pnetdev, MAX_RECVBUF_SZ +
   RECVBUFF_ALIGN_SZ);
if (pskb) {
-   pskb-dev = padapter-pnetdev;
tmpaddr = (addr_t)pskb-data;
alignment = tmpaddr  (RECVBUFF_ALIGN_SZ-1);
skb_reserve(pskb, (RECVBUFF_ALIGN_SZ - alignment));
@@ -1083,7 +1082,6 @@ static int recvbuf2recvframe(struct _adapter *padapter, 
struct sk_buff *pskb)
alloc_sz += 6;
pkt_copy = netdev_alloc_skb(padapter-pnetdev, alloc_sz);
if (pkt_copy) {
-   pkt_copy-dev = padapter-pnetdev;
precvframe-u.hdr.pkt = pkt_copy;
skb_reserve(pkt_copy, 4 - ((addr_t)(pkt_copy-data)
% 4));

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] [RFC] staging: rtl8821ae: fix invalid bit mask on MSR_AP check

2014-02-14 Thread Levente Kurusa
On 02/14/2014 11:00 PM, Dan Carpenter wrote:
 [...]
  Hi,

  This might not be the real solution since it is also possible that
  the particular condition never really happens. I seek comments
  so that I can post the proper patch.

 
 I can't test it either but I think your fix is correct.
 
 Reviewed-by: Dan Carpenter dan.carpen...@oracle.com
 [...]

Thanks Dan, maybe you know some people who could test it?
RTLXX guys? Or maybe we can take the patch as is?
I cannot really think of any other solution other than removing
the other clause, but since that was written to the file,
there must have been some logic behind that. I am slightly
disappointed get_maintainer didn't really find anybody for
this patch...

Greg, can you take it as is or you would need the RFC tag removed?
(ie, repost)
Maybe you know somebody who could test it as well?

-- 
Regards,
Levente Kurusa
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel