[PATCH] staging: cxt1e1: remove redundant memset() call

2014-03-14 Thread Daeseok Youn

The banner array doens't need to set to 0.
sprintf() adds a terminating '\0'.

And the sn array can be declared and initialized to zero.
So remove redundant memset() with zero.

Remove unnecessary cast for memcpy().

Signed-off-by: Daeseok Youn daeseok.y...@gmail.com
---
 drivers/staging/cxt1e1/hwprobe.c |   12 +++-
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index d87a011..d41fb79 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -51,22 +51,16 @@ show_two(hdw_info_t *hi, int brdno)
struct pci_dev *pdev;
char   *bid;
char   banner[80];
-   charsn[6];
-
-   /* clear print buffer */
-   memset(banner, 0, 80);
+   charsn[6] = {0,};
 
ci = (ci_t *)(netdev_priv(hi-ndev));
bid = sbeid_get_bdname(ci);
switch (hi-promfmt) {
case PROM_FORMAT_TYPE1:
-   memcpy(sn, (FLD_TYPE1 *)(hi-mfg_info.pft1.Serial), 6);
+   memcpy(sn, hi-mfg_info.pft1.Serial, 6);
break;
case PROM_FORMAT_TYPE2:
-   memcpy(sn, (FLD_TYPE2 *)(hi-mfg_info.pft2.Serial), 6);
-   break;
-   default:
-   memset(sn, 0, 6);
+   memcpy(sn, hi-mfg_info.pft2.Serial, 6);
break;
}
 
-- 
1.7.4.4


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


Re: [PATCH 0/7] staging: comedi: rti802: clean up driver

2014-03-14 Thread Ian Abbott

On 2014-03-13 22:48, H Hartley Sweeten wrote:

Clean up this comedi driver.

H Hartley Sweeten (7):
   staging: comedi: rti802: remove RTI802_SIZE define
   staging: comedi: rti802: tidy up rti802_ao_insn_read()
   staging: comedi: rti802: tidy up rti802_ao_insn_write()
   staging: comedi: rti802: tidy up the subdevice init
   staging: comedi: rti802: tidy up the register map defines
   staging: comedi: rti802: tidy up the multi-line comments
   staging: comedi: rti802: update the MODULE_DESCRIPTION

  drivers/staging/comedi/drivers/rti802.c | 127 +---
  1 file changed, 68 insertions(+), 59 deletions(-)



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] staging: comedi: fix memory leak

2014-03-14 Thread Levente Kurusa
Call kfree() on bdev. The variable is otherwise leaked.

Signed-off-by: Levente Kurusa le...@linux.com
---
 drivers/staging/comedi/drivers/comedi_bond.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/comedi/drivers/comedi_bond.c 
b/drivers/staging/comedi/drivers/comedi_bond.c
index 51a59e5..406aedb 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -254,6 +254,7 @@ static int do_dev_config(struct comedi_device *dev, struct 
comedi_devconfig *it)
if (!devs) {
dev_err(dev-class_dev,
Could not allocate memory. Out of 
memory?\n);
+   kfree(bdev);
return -ENOMEM;
}
devpriv-devs = devs;
-- 
1.8.3.1

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


Re: [PATCH 00/26] staging: comedi: gsc_hpdi: clean up driver

2014-03-14 Thread Ian Abbott

On 2014-03-13 21:16, H Hartley Sweeten wrote:

This is the big clean up series for the coemdi gsc_hpdi driver.

H Hartley Sweeten (26):
   staging: comedi: gsc_hpdi: move the (*auto_attach) and (*detach) functions
   staging: comedi: gsc_hpdi: absorb setup_subdevices()
   staging: comedi: gsc_hpdi: move the (*auto_attach) helper functions
   staging: comedi: gsc_hpdi: tidy up dio_config_insn()
   staging: comedi: gsc_hpdi: tidy up setup_dma_descriptors()
   staging: comedi: gsc_hpdi: tidy up hpdi_cmd()
   staging: comedi: gsc_hpdi: tidy up hpdi_cmd_test()
   staging: comedi: gsc_hpdi: rename hpdi_cancel()
   staging: comedi: gsc_hpdi: rename abort_dma()
   staging: comedi: gsc_hpdi: rename handle_interrupt()
   staging: comedi: gsc_hpdi: rename drain_dma_buffers()
   staging: comedi: gsc_hpdi: rename the (*auto_attach) and (*detach) functions
   staging: comedi: gsc_hpdi: rename hpdi_find_board()
   staging: comedi: gsc_hpdi: rename init_plx9080()
   staging: comedi: gsc_hpdi: rename init_hpdi()
   staging: comedi: gsc_hpdi: remove disable_plx_interrupts()
   staging: comedi: gsc_hpdi: remove hpdi_writel()
   staging: comedi: gsc_hpdi: remove 'volatile' from the private data members
   staging: comedi: gsc_hpdi: tidy up gsc_hpdi_drain_dma()
   staging: comedi: gsc_hpdi: rename 'plx9080_iobase' in private data
   staging: comedi: gsc_hpdi: rename 'hpdi_iobase' in private data
   staging: comedi: gsc_hpdi: tidy up the register map
   staging: comedi: gsc_hpdi: tidy up the boardinfo
   staging: comedi: gsc_hpdi: convert comedi_error() messages to dev_err()
   staging: comedi: gsc_hpdi: remove pr_fmt() define
   staging: comedi: gsc_hpdi: tidy up multi-line comment

  drivers/staging/comedi/drivers/gsc_hpdi.c | 1097 +
  1 file changed, 491 insertions(+), 606 deletions(-)



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


Re: [PATCH] staging: android: fix coding style

2014-03-14 Thread Greg KH
On Thu, Mar 13, 2014 at 03:13:04PM +0100, mourn wrote:
 
  The changes look good, however you should be a bit more specific about
  what the
  fixes are, and that you used checkpatch.pl to find them (I assume).
 
 
 Yes, you are right. I can edit the commit log.
 
  Also, Signed-off-by: should state your full name, which I'm also assuming
  isn't
  'mourn'. Please see Documentation/SubmittingPatches.
 
 
 I have a bit of a problem here. Some companies forbid their employees to
 openly participate in open source projects. A request to the legal
 department will take around 6 months with no hope of positive result...

Then I can not take your patch, sorry, we can not take anonymous
patches, as the documentation that describes what you mean by adding the
Signed-off-by: line to a patch.

good luck with your legal department,

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


Re: [PATCH] staging: android: fix coding style

2014-03-14 Thread Greg KH
On Thu, Mar 13, 2014 at 10:44:55AM +0100, mo...@2600fr.org wrote:
 From: mourn mo...@2600fr.org
 
 Signed-off-by: mourn mo...@2600fr.org

As said in the thread for your other thread, this patch can't be
accepted unless you use your real name, sorry.

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


Re: git not pulling origin staging-next cleanly.

2014-03-14 Thread Greg KH
On Wed, Mar 12, 2014 at 04:10:36PM -0400, Gary Rookard wrote:
 Hi,
 Could this problem be local machine (git-1.9.0-1) or dare I say it,
 a tmp server-side melt-down of sorts?
 I've tried everything nothing seams to work.

What have you typed, exactly, and what has git responded with?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-14 Thread Chase Southwood
On Tuesday, March 11, 2014 9:26 AM, Ian Abbott abbo...@mev.co.uk wrote:

On 2014-03-09 04:00, Chase Southwood wrote:
 This patch changes a handful of while loops to timeouts to prevent
 infinite looping on hardware failure. A couple such loops are in a
 function (s626_debi_transfer()) which is called from critical sections,
 so comedi_timeout() is unusable for them, and an iterative timeout is
 used instead. For the while loops in a context where comedi_timeout() is
 allowed, a new callback function, s626_send_dac_eoc(), has been defined
 to evaluate the conditions that the while loops are testing.  The new
 callback employs a switch statement based on a simple new enum so that
 it is usable for all of the different conditions tested in while loops
 in s626_send_dac().  The proper comedi_timeout() calls are then used.

 Signed-off-by: Chase Southwood chase.southw...@yahoo.com
 ---
 Ian, here is a version of this patchset employing the enum you recommended.
 The second patch has been rebased on top of this one.

 2: Used comedi_timeout() where appropriate, introduce callback function

 3: Updated callback to switch on new enum.

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

For future reference, for patches affecting a single comedi driver, we 
usually title the patches like this:

staging: comedi: name_of_driver: summary of patch



Hi Greg!

I was just writing to inquire whether you were able to add this patch as well as
PATCH 2/2 Propagate timeout errors in s626.c, to your queue in their current 
state.
I had to resend this patch to you about a week ago because the subject line got
a little messed up, which might have lead to a bit of confusion regarding the 2
patch series, and I wanted to check in to see whether you need me to do anything
further.

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


Re: git not pulling origin staging-next cleanly.

2014-03-14 Thread Gary Rookard



On Sat, 15 Mar 2014, Greg KH wrote:


On Wed, Mar 12, 2014 at 04:10:36PM -0400, Gary Rookard wrote:

Hi,
Could this problem be local machine (git-1.9.0-1) or dare I say it,
a tmp server-side melt-down of sorts?
I've tried everything nothing seams to work.


What have you typed, exactly, and what has git responded with?


--
Ok, this is it from the very top, the commands are same as every other
time I've done it.

[gary@arch-tuxx Kernel-Hacks]$ git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Cloning into 'staging'...
remote: Counting objects: 3449057, done.
remote: Compressing objects: 100% (519453/519453), done.
remote: Total 3449057 (delta 2903733), reused 3445005 (delta 2900373)
Receiving objects: 100% (3449057/3449057), 722.83 MiB | 3.36 MiB/s, done.
Resolving deltas: 100% (2903733/2903733), done.
Checking connectivity... done.
Checking out files: 100% (45941/45941), done.
[gary@arch-tuxx Kernel-Hacks]$ cd staging
[gary@arch-tuxx staging]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
[gary@arch-tuxx staging]$ git pull origin staging-next

From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

 * branchstaging-next - FETCH_HEAD
Removing drivers/staging/sm7xxfb/sm7xxfb.c
Removing drivers/staging/sm7xxfb/sm7xx.h
Removing drivers/staging/sm7xxfb/TODO
Removing drivers/staging/sm7xxfb/Makefile
Removing drivers/staging/sm7xxfb/Kconfig
Removing drivers/staging/sb105x/sb_ser_core.h
Removing drivers/staging/sb105x/sb_pci_mp.h
Removing drivers/staging/sb105x/sb_pci_mp.c
Removing drivers/staging/sb105x/sb_mp_register.h
Removing drivers/staging/sb105x/Makefile
Removing drivers/staging/sb105x/Kconfig
Removing drivers/staging/rtl8192u/r819xU_HTType.h
Removing drivers/staging/rtl8192u/r819xU_HTGen.h
Removing drivers/staging/rtl8192u/ieee80211/scatterwalk.h
Removing drivers/staging/rtl8192u/ieee80211/scatterwalk.c
Removing drivers/staging/rtl8192u/ieee80211/rtl_crypto.h
Removing drivers/staging/rtl8192u/ieee80211/proc.c
Removing drivers/staging/rtl8192u/ieee80211/michael_mic.c
Removing drivers/staging/rtl8192u/ieee80211/internal.h
Removing drivers/staging/rtl8192u/ieee80211/digest.c
Removing drivers/staging/rtl8192u/ieee80211/crypto_compat.h
Removing drivers/staging/rtl8192u/ieee80211/compress.c
Removing drivers/staging/rtl8192u/ieee80211/cipher.c
Removing drivers/staging/rtl8192u/ieee80211/autoload.c
Removing drivers/staging/rtl8192u/ieee80211/arc4.c
Removing drivers/staging/rtl8192u/ieee80211/aes.c
Removing drivers/staging/rtl8192u/ieee80211/EndianFree.h
Removing drivers/staging/rtl8188eu/include/nic_spec.h
Removing drivers/staging/rtl8188eu/include/ip.h
Removing drivers/staging/rtl8188eu/include/ioctl_cfg80211.h
Removing drivers/staging/rtl8188eu/include/if_ether.h
Removing drivers/staging/rtl8188eu/include/h2clbk.h
Removing drivers/staging/rtl8188eu/include/ethernet.h
Removing drivers/staging/rtl8188eu/hal/odm_interface.c
Removing drivers/staging/imx-drm/imx-fbdev.c
Removing drivers/staging/imx-drm/imx-fb.c
Removing drivers/staging/echo/TODO
Removing drivers/staging/dgap/downld.c
Removing drivers/staging/dgap/digi.h
Removing drivers/staging/dgap/dgap_types.h
Removing drivers/staging/dgap/dgap_tty.h
Removing drivers/staging/dgap/dgap_tty.c
Removing drivers/staging/dgap/dgap_trace.h
Removing drivers/staging/dgap/dgap_trace.c
Removing drivers/staging/dgap/dgap_sysfs.h
Removing drivers/staging/dgap/dgap_sysfs.c
Removing drivers/staging/dgap/dgap_pci.h
Removing drivers/staging/dgap/dgap_parse.h
Removing drivers/staging/dgap/dgap_parse.c
Removing drivers/staging/dgap/dgap_kcompat.h
Removing drivers/staging/dgap/dgap_fep5.h
Removing drivers/staging/dgap/dgap_fep5.c
Removing drivers/staging/dgap/dgap_driver.h
Removing drivers/staging/dgap/dgap_driver.c
Removing drivers/staging/dgap/dgap_downld.h
Removing drivers/staging/dgap/dgap_conf.h
Removing drivers/staging/cxt1e1/ossiRelease.c
Auto-merging drivers/staging/cxt1e1/linux.c
CONFLICT (content): Merge conflict in drivers/staging/cxt1e1/linux.c
Auto-merging MAINTAINERS
Automatic merge failed; fix conflicts and then commit the result.
[gary@arch-tuxx staging]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

You have unmerged paths.
  (fix conflicts and run git commit)

Changes to be committed:

modified:   Documentation/devicetree/bindings/arm/atmel-adc.txt
new file:   Documentation/devicetree/bindings/graph.txt
new file: 
Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
new file: 
Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
modified: 
Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
new file: 
Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt
modified: 
Documentation/devicetree/bindings/staging/imx-drm/ldb.txt

modified:   MAINTAINERS
modified:   arch/arm/boot/dts/imx51-apf51dev.dts
modified:   

Re: [PATCH] staging: comedi: fix memory leak

2014-03-14 Thread Chase Southwood
On Friday, March 14, 2014 11:47 AM, Levente Kurusa le...@linux.com wrote:

Call kfree() on bdev. The variable is otherwise leaked.

Signed-off-by: Levente Kurusa le...@linux.com
---
drivers/staging/comedi/drivers/comedi_bond.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/comedi/drivers/comedi_bond.c 
b/drivers/staging/comedi/drivers/comedi_bond.c
index 51a59e5..406aedb 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -254,6 +254,7 @@ static int do_dev_config(struct comedi_device *dev, struct 
comedi_devconfig *it)
            if (!devs) {
                dev_err(dev-class_dev,
                    Could not allocate memory. Out of memory?\n);
+                kfree(bdev);
                return -ENOMEM;
            }
            devpriv-devs = devs;
-- 
1.8.3.1



Levente,

This change has already been made in staging-next (by me, actually :) ).  In
order to avoid re-doing work which has already been done, please make sure to 
base
all of your patches off of linux-next (or for staging, staging-next).

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


Re: [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-14 Thread gre...@linuxfoundation.org
On Fri, Mar 14, 2014 at 06:43:37PM -0700, Chase Southwood wrote:
 On Tuesday, March 11, 2014 9:26 AM, Ian Abbott abbo...@mev.co.uk wrote:
 
 On 2014-03-09 04:00, Chase Southwood wrote:
  This patch changes a handful of while loops to timeouts to prevent
  infinite looping on hardware failure. A couple such loops are in a
  function (s626_debi_transfer()) which is called from critical sections,
  so comedi_timeout() is unusable for them, and an iterative timeout is
  used instead. For the while loops in a context where comedi_timeout() is
  allowed, a new callback function, s626_send_dac_eoc(), has been defined
  to evaluate the conditions that the while loops are testing.  The new
  callback employs a switch statement based on a simple new enum so that
  it is usable for all of the different conditions tested in while loops
  in s626_send_dac().  The proper comedi_timeout() calls are then used.
 
  Signed-off-by: Chase Southwood chase.southw...@yahoo.com
  ---
  Ian, here is a version of this patchset employing the enum you recommended.
  The second patch has been rebased on top of this one.
 
  2: Used comedi_timeout() where appropriate, introduce callback function
 
  3: Updated callback to switch on new enum.
 
 Reviewed-by: Ian Abbott abbo...@mev.co.uk
 
 For future reference, for patches affecting a single comedi driver, we 
 usually title the patches like this:
 
 staging: comedi: name_of_driver: summary of patch
 
 
 
 Hi Greg!
 
 I was just writing to inquire whether you were able to add this patch as well 
 as
 PATCH 2/2 Propagate timeout errors in s626.c, to your queue in their current 
 state.
 I had to resend this patch to you about a week ago because the subject line 
 got
 a little messed up, which might have lead to a bit of confusion regarding the 
 2
 patch series, and I wanted to check in to see whether you need me to do 
 anything
 further.

I've been on vacation this week and will dig through my huge patch queue
next week.  Then I will need another vacation...

Give me a chance to catch up, I'll let you know if I have problems with
them.

thanks,

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


Re: git not pulling origin staging-next cleanly.

2014-03-14 Thread Greg KH
On Fri, Mar 14, 2014 at 09:51:30PM -0400, Gary Rookard wrote:
 
 
 On Sat, 15 Mar 2014, Greg KH wrote:
 
  On Wed, Mar 12, 2014 at 04:10:36PM -0400, Gary Rookard wrote:
  Hi,
  Could this problem be local machine (git-1.9.0-1) or dare I say it,
  a tmp server-side melt-down of sorts?
  I've tried everything nothing seams to work.
 
  What have you typed, exactly, and what has git responded with?
 
 --
 Ok, this is it from the very top, the commands are same as every other
 time I've done it.
 
 [gary@arch-tuxx Kernel-Hacks]$ git clone 
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
 Cloning into 'staging'...
 remote: Counting objects: 3449057, done.
 remote: Compressing objects: 100% (519453/519453), done.
 remote: Total 3449057 (delta 2903733), reused 3445005 (delta 2900373)
 Receiving objects: 100% (3449057/3449057), 722.83 MiB | 3.36 MiB/s, done.
 Resolving deltas: 100% (2903733/2903733), done.
 Checking connectivity... done.
 Checking out files: 100% (45941/45941), done.
 [gary@arch-tuxx Kernel-Hacks]$ cd staging
 [gary@arch-tuxx staging]$ git status
 On branch master
 Your branch is up-to-date with 'origin/master'.
 
 nothing to commit, working directory clean
 [gary@arch-tuxx staging]$ git pull origin staging-next

Why would you want to do that?

You really want to merge staging-next on top of master?  Why?

That's not how to just check out a single branch.

And yes, I know there's a conflict between that branch and Linus's tree
at the moment, I'll fix it up next week, well before it goes to Linus...

thanks,

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