Re: [BUG?] Freeze after trying to switch TTY?

2016-12-31 Thread Matthias Beyer
Hi,

sorry, just want to bump this a bit - I really do have no idea whom to 
ping with this, so please forward me!

Best regards and a nice start into 2017 - the year of linux on the 
Desktop!

Matthias

On 29-12-2016 17:58:29, Matthias Beyer wrote:
> Hi,
> 
> I experience a weird behaviour after upgrading to Kernel 4.9 and
> trying to switch TTYs. My machine instantly freezes, after some
> seconds (about 5 to 10) everything works again, then it freezes
> again... and so on.
> 
> I'm not sure whether this is a kernel issue or X-Server, but as no TTY 
> login prompt pops up I guess it must be a kernel issue.
> 
> Here is what I have found out via `journalctl`:
> 
> 
> Dez 29 14:33:14 yuu kernel: [ cut here ]
> Dez 29 14:33:14 yuu kernel: WARNING: CPU: 0 PID: 917 at 
> /tmp/nix-build-linux-4.9.drv-0/linux-4.9/drivers/gpu/drm/i915/intel_display.c:14189
>  intel_atomic_commit_tail+0xff4/0x1000 [i915]
> Dez 29 14:33:14 yuu kernel: pipe A vblank wait timed out
> Dez 29 14:33:14 yuu kernel: Modules linked in: ctr ccm af_packet msr 
> mousedev snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic 
> nf_conntrack_ipv6 nf_defrag_ipv6 mei_wdt nf_conntrack_ipv4 i915 
> nf_defrag_ipv4 x86_p
> Dez 29 14:33:14 yuu kernel:  intel_gtt agpgart snd_hda_codec i2c_algo_bit 
> fb_sys_fops thinkpad_acpi syscopyarea sysfillrect sysimgblt e1000e mei_me 
> i2c_core fjes snd_hda_core nvram battery ip6table_filter rfkill snd_hwdep led_
> Dez 29 14:33:14 yuu kernel: CPU: 0 PID: 917 Comm: X Not tainted 4.9.0 
> #1-NixOS
> Dez 29 14:33:14 yuu kernel: Hardware name: LENOVO 4290A11/4290A11, BIOS 
> 8DET66WW (1.36 ) 10/22/2012
> Dez 29 14:33:14 yuu kernel:  a1cf02027850 ab2f3ae3 
> a1cf020278a0 
> Dez 29 14:33:14 yuu kernel:  a1cf02027890 ab06f30b 
> 376dde20fdc0 
> Dez 29 14:33:14 yuu kernel:    
> 0001 939ec4be7000
> Dez 29 14:33:14 yuu kernel: Call Trace:
> Dez 29 14:33:14 yuu kernel:  [] dump_stack+0x63/0x90
> Dez 29 14:33:14 yuu kernel:  [] __warn+0xcb/0xf0
> Dez 29 14:33:14 yuu kernel:  [] 
> warn_slowpath_fmt+0x4f/0x60
> Dez 29 14:33:14 yuu kernel:  [] ? finish_wait+0x56/0x70
> Dez 29 14:33:14 yuu kernel:  [] 
> intel_atomic_commit_tail+0xff4/0x1000 [i915]
> Dez 29 14:33:14 yuu kernel:  [] ? 
> wake_atomic_t_function+0x60/0x60
> Dez 29 14:33:14 yuu kernel:  [] 
> intel_atomic_commit+0x35b/0x4c0 [i915]
> Dez 29 14:33:14 yuu kernel:  [] ? 
> drm_atomic_add_affected_connectors+0x57/0xf0 [drm]
> Dez 29 14:33:14 yuu kernel:  [] 
> drm_atomic_commit+0x49/0x50 [drm]
> Dez 29 14:33:14 yuu kernel:  [] 
> restore_fbdev_mode+0x14c/0x260 [drm_kms_helper]
> Dez 29 14:33:14 yuu kernel:  [] 
> drm_fb_helper_restore_fbdev_mode_unlocked+0x33/0x80 [drm_kms_helper]
> Dez 29 14:33:14 yuu kernel:  [] 
> drm_fb_helper_set_par+0x2d/0x60 [drm_kms_helper]
> Dez 29 14:33:14 yuu kernel:  [] 
> intel_fbdev_set_par+0x18/0x70 [i915]
> Dez 29 14:33:14 yuu kernel:  [] fb_set_var+0x238/0x460
> Dez 29 14:33:14 yuu kernel:  [] ? 
> check_preempt_curr+0x7b/0x90
> Dez 29 14:33:14 yuu kernel:  [] fbcon_blank+0x2e9/0x330
> Dez 29 14:33:14 yuu kernel:  [] 
> do_unblank_screen+0xd3/0x1a0
> Dez 29 14:33:14 yuu kernel:  [] 
> complete_change_console+0x59/0xe0
> Dez 29 14:33:14 yuu kernel:  [] vt_ioctl+0x6ee/0x12a0
> Dez 29 14:33:14 yuu kernel:  [] ? unlock_page+0x33/0x40
> Dez 29 14:33:14 yuu kernel:  [] tty_ioctl+0x35a/0xc70
> Dez 29 14:33:14 yuu kernel:  [] ? 
> handle_mm_fault+0x820/0x10d0
> Dez 29 14:33:14 yuu kernel:  [] ? __vfs_write+0x28/0x120
> Dez 29 14:33:14 yuu kernel:  [] do_vfs_ioctl+0x92/0x5a0
> Dez 29 14:33:14 yuu kernel:  [] ? 
> __do_page_fault+0x287/0x4b0
> Dez 29 14:33:14 yuu kernel:  [] SyS_ioctl+0x79/0x90
> Dez 29 14:33:14 yuu kernel:  [] 
> entry_SYSCALL_64_fastpath+0x1a/0xa9
> Dez 29 14:33:14 yuu kernel: ---[ end trace e27a86fb3dfb03e6 ]---
> Dez 29 14:33:14 yuu kernel: [drm:drm_atomic_helper_commit_cleanup_done 
> [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
> Dez 29 14:33:14 yuu kernel: [drm:drm_atomic_helper_commit_cleanup_done 
> [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
> Dez 29 14:33:14 yuu kernel: [drm:drm_atomic_helper_commit_cleanup_done 
> [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
> 
> And some more here:
> 
> Dez 29 14:36:39 yuu xsession[937]: 
> [4739:4739:1229/143639:ERROR:zygote_communication_linux.cc(292)] Failed to 
> send GetTerminationStatus message to zygote
> Dez 29 14:36:39 yuu x

Re: [BUG?] Freeze after trying to switch TTY?

2016-12-31 Thread Matthias Beyer
Hi,

sorry, just want to bump this a bit - I really do have no idea whom to 
ping with this, so please forward me!

Best regards and a nice start into 2017 - the year of linux on the 
Desktop!

Matthias

On 29-12-2016 17:58:29, Matthias Beyer wrote:
> Hi,
> 
> I experience a weird behaviour after upgrading to Kernel 4.9 and
> trying to switch TTYs. My machine instantly freezes, after some
> seconds (about 5 to 10) everything works again, then it freezes
> again... and so on.
> 
> I'm not sure whether this is a kernel issue or X-Server, but as no TTY 
> login prompt pops up I guess it must be a kernel issue.
> 
> Here is what I have found out via `journalctl`:
> 
> 
> Dez 29 14:33:14 yuu kernel: [ cut here ]
> Dez 29 14:33:14 yuu kernel: WARNING: CPU: 0 PID: 917 at 
> /tmp/nix-build-linux-4.9.drv-0/linux-4.9/drivers/gpu/drm/i915/intel_display.c:14189
>  intel_atomic_commit_tail+0xff4/0x1000 [i915]
> Dez 29 14:33:14 yuu kernel: pipe A vblank wait timed out
> Dez 29 14:33:14 yuu kernel: Modules linked in: ctr ccm af_packet msr 
> mousedev snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic 
> nf_conntrack_ipv6 nf_defrag_ipv6 mei_wdt nf_conntrack_ipv4 i915 
> nf_defrag_ipv4 x86_p
> Dez 29 14:33:14 yuu kernel:  intel_gtt agpgart snd_hda_codec i2c_algo_bit 
> fb_sys_fops thinkpad_acpi syscopyarea sysfillrect sysimgblt e1000e mei_me 
> i2c_core fjes snd_hda_core nvram battery ip6table_filter rfkill snd_hwdep led_
> Dez 29 14:33:14 yuu kernel: CPU: 0 PID: 917 Comm: X Not tainted 4.9.0 
> #1-NixOS
> Dez 29 14:33:14 yuu kernel: Hardware name: LENOVO 4290A11/4290A11, BIOS 
> 8DET66WW (1.36 ) 10/22/2012
> Dez 29 14:33:14 yuu kernel:  a1cf02027850 ab2f3ae3 
> a1cf020278a0 
> Dez 29 14:33:14 yuu kernel:  a1cf02027890 ab06f30b 
> 376dde20fdc0 
> Dez 29 14:33:14 yuu kernel:    
> 0001 939ec4be7000
> Dez 29 14:33:14 yuu kernel: Call Trace:
> Dez 29 14:33:14 yuu kernel:  [] dump_stack+0x63/0x90
> Dez 29 14:33:14 yuu kernel:  [] __warn+0xcb/0xf0
> Dez 29 14:33:14 yuu kernel:  [] 
> warn_slowpath_fmt+0x4f/0x60
> Dez 29 14:33:14 yuu kernel:  [] ? finish_wait+0x56/0x70
> Dez 29 14:33:14 yuu kernel:  [] 
> intel_atomic_commit_tail+0xff4/0x1000 [i915]
> Dez 29 14:33:14 yuu kernel:  [] ? 
> wake_atomic_t_function+0x60/0x60
> Dez 29 14:33:14 yuu kernel:  [] 
> intel_atomic_commit+0x35b/0x4c0 [i915]
> Dez 29 14:33:14 yuu kernel:  [] ? 
> drm_atomic_add_affected_connectors+0x57/0xf0 [drm]
> Dez 29 14:33:14 yuu kernel:  [] 
> drm_atomic_commit+0x49/0x50 [drm]
> Dez 29 14:33:14 yuu kernel:  [] 
> restore_fbdev_mode+0x14c/0x260 [drm_kms_helper]
> Dez 29 14:33:14 yuu kernel:  [] 
> drm_fb_helper_restore_fbdev_mode_unlocked+0x33/0x80 [drm_kms_helper]
> Dez 29 14:33:14 yuu kernel:  [] 
> drm_fb_helper_set_par+0x2d/0x60 [drm_kms_helper]
> Dez 29 14:33:14 yuu kernel:  [] 
> intel_fbdev_set_par+0x18/0x70 [i915]
> Dez 29 14:33:14 yuu kernel:  [] fb_set_var+0x238/0x460
> Dez 29 14:33:14 yuu kernel:  [] ? 
> check_preempt_curr+0x7b/0x90
> Dez 29 14:33:14 yuu kernel:  [] fbcon_blank+0x2e9/0x330
> Dez 29 14:33:14 yuu kernel:  [] 
> do_unblank_screen+0xd3/0x1a0
> Dez 29 14:33:14 yuu kernel:  [] 
> complete_change_console+0x59/0xe0
> Dez 29 14:33:14 yuu kernel:  [] vt_ioctl+0x6ee/0x12a0
> Dez 29 14:33:14 yuu kernel:  [] ? unlock_page+0x33/0x40
> Dez 29 14:33:14 yuu kernel:  [] tty_ioctl+0x35a/0xc70
> Dez 29 14:33:14 yuu kernel:  [] ? 
> handle_mm_fault+0x820/0x10d0
> Dez 29 14:33:14 yuu kernel:  [] ? __vfs_write+0x28/0x120
> Dez 29 14:33:14 yuu kernel:  [] do_vfs_ioctl+0x92/0x5a0
> Dez 29 14:33:14 yuu kernel:  [] ? 
> __do_page_fault+0x287/0x4b0
> Dez 29 14:33:14 yuu kernel:  [] SyS_ioctl+0x79/0x90
> Dez 29 14:33:14 yuu kernel:  [] 
> entry_SYSCALL_64_fastpath+0x1a/0xa9
> Dez 29 14:33:14 yuu kernel: ---[ end trace e27a86fb3dfb03e6 ]---
> Dez 29 14:33:14 yuu kernel: [drm:drm_atomic_helper_commit_cleanup_done 
> [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
> Dez 29 14:33:14 yuu kernel: [drm:drm_atomic_helper_commit_cleanup_done 
> [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
> Dez 29 14:33:14 yuu kernel: [drm:drm_atomic_helper_commit_cleanup_done 
> [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
> 
> And some more here:
> 
> Dez 29 14:36:39 yuu xsession[937]: 
> [4739:4739:1229/143639:ERROR:zygote_communication_linux.cc(292)] Failed to 
> send GetTerminationStatus message to zygote
> Dez 29 14:36:39 yuu x

[BUG?] Freeze after trying to switch TTY?

2016-12-29 Thread Matthias Beyer
 freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


[BUG?] Freeze after trying to switch TTY?

2016-12-29 Thread Matthias Beyer
 freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c

2016-09-07 Thread Matthias Beyer
On 06-09-2016 12:00:37, Jes Sorensen wrote:
> Matthias Beyer <m...@beyermatthias.de> writes:
> > This patchset fixes some errors and warnings reported by checkpatch.pl.
> >
> > Matthias Beyer (5):
> >   drivers: staging: rtl8723au: core: Fix checkpatch.pl errors
> >   drivers: staging: rtl8723au: core: simplify if-break-else
> >   drivers: staging: rtl8723au: core: Refactor pointless branching
> >   drivers: staging: rtl8723au: core: Fix "space prohibited" warning
> >   drivers: staging: rtl8723au: core: Fix indentation
> >
> >  drivers/staging/rtl8723au/core/rtw_mlme.c | 72 
> > ++-
> >  1 file changed, 33 insertions(+), 39 deletions(-)
> 
> Nothing wrong with these patches, however I intend to post a patch to
> remove this driver soon, so it's kind of a waste of your time to spend
> too many cycles on it.
> 

Alright, thanks for telling me, I won't waste any more time on it.

Besides that - thanks for telling me that the patchset is okay as-is.
That keeps me motivated!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c

2016-09-07 Thread Matthias Beyer
On 06-09-2016 12:00:37, Jes Sorensen wrote:
> Matthias Beyer  writes:
> > This patchset fixes some errors and warnings reported by checkpatch.pl.
> >
> > Matthias Beyer (5):
> >   drivers: staging: rtl8723au: core: Fix checkpatch.pl errors
> >   drivers: staging: rtl8723au: core: simplify if-break-else
> >   drivers: staging: rtl8723au: core: Refactor pointless branching
> >   drivers: staging: rtl8723au: core: Fix "space prohibited" warning
> >   drivers: staging: rtl8723au: core: Fix indentation
> >
> >  drivers/staging/rtl8723au/core/rtw_mlme.c | 72 
> > ++-
> >  1 file changed, 33 insertions(+), 39 deletions(-)
> 
> Nothing wrong with these patches, however I intend to post a patch to
> remove this driver soon, so it's kind of a waste of your time to spend
> too many cycles on it.
> 

Alright, thanks for telling me, I won't waste any more time on it.

Besides that - thanks for telling me that the patchset is okay as-is.
That keeps me motivated!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


[PATCH 5/5] drivers: staging: rtl8723au: core: Fix indentation

2016-09-04 Thread Matthias Beyer
Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
Signed-off-by: Manuel Messner <manuel.johannes.mess...@hs-furtwangen.de>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 1e01d62..1c31774 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1921,17 +1921,17 @@ static int rtw_append_pmkid(struct rtw_adapter 
*Adapter, int iEntry,
struct security_priv *psecuritypriv = >securitypriv;
 
if (ie[1] <= 20) {
-   /*  The RSN IE didn't include the PMK ID,
-   append the PMK information */
-   ie[ie_len] = 1;
-   ie_len++;
-   ie[ie_len] = 0; /* PMKID count = 0x0100 */
-   ie_len++;
-   memcpy([ie_len],
-  >PMKIDList[iEntry].PMKID, 16);
-
-   ie_len += 16;
-   ie[1] += 18;/* PMKID length = 2+16 */
+   /* The RSN IE didn't include the PMK ID,
+  append the PMK information */
+   ie[ie_len] = 1;
+   ie_len++;
+   ie[ie_len] = 0; /* PMKID count = 0x0100 */
+   ie_len++;
+   memcpy([ie_len],
+  >PMKIDList[iEntry].PMKID, 16);
+
+   ie_len += 16;
+   ie[1] += 18;/* PMKID length = 2+16 */
}
return ie_len;
 }
-- 
2.9.3



[PATCH 5/5] drivers: staging: rtl8723au: core: Fix indentation

2016-09-04 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 1e01d62..1c31774 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1921,17 +1921,17 @@ static int rtw_append_pmkid(struct rtw_adapter 
*Adapter, int iEntry,
struct security_priv *psecuritypriv = >securitypriv;
 
if (ie[1] <= 20) {
-   /*  The RSN IE didn't include the PMK ID,
-   append the PMK information */
-   ie[ie_len] = 1;
-   ie_len++;
-   ie[ie_len] = 0; /* PMKID count = 0x0100 */
-   ie_len++;
-   memcpy([ie_len],
-  >PMKIDList[iEntry].PMKID, 16);
-
-   ie_len += 16;
-   ie[1] += 18;/* PMKID length = 2+16 */
+   /* The RSN IE didn't include the PMK ID,
+  append the PMK information */
+   ie[ie_len] = 1;
+   ie_len++;
+   ie[ie_len] = 0; /* PMKID count = 0x0100 */
+   ie_len++;
+   memcpy([ie_len],
+  >PMKIDList[iEntry].PMKID, 16);
+
+   ie_len += 16;
+   ie[1] += 18;/* PMKID length = 2+16 */
}
return ie_len;
 }
-- 
2.9.3



[PATCH 4/5] drivers: staging: rtl8723au: core: Fix "space prohibited" warning

2016-09-04 Thread Matthias Beyer
This patch fixes the "space prohibited between function name and open
parenthesis '('" warning from checkpatch.pl

Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
Signed-off-by: Manuel Messner <manuel.johannes.mess...@hs-furtwangen.de>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 196447b..1e01d62 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -900,15 +900,15 @@ rtw_joinbss_update_stainfo(struct rtw_adapter *padapter,
padapter->securitypriv.dot11PrivacyAlgrthm;
 
memset(>dot118021x_UncstKey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
 
memset(>dot11tkiprxmickey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
memset(>dot11tkiptxmickey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
 
-   memset(>dot11txpn, 0, sizeof (union pn48));
-   memset(>dot11rxpn, 0, sizeof (union pn48));
+   memset(>dot11txpn, 0, sizeof(union pn48));
+   memset(>dot11rxpn, 0, sizeof(union pn48));
}
 
/*  Commented by Albert 2012/07/21 */
-- 
2.9.3



[PATCH 4/5] drivers: staging: rtl8723au: core: Fix "space prohibited" warning

2016-09-04 Thread Matthias Beyer
This patch fixes the "space prohibited between function name and open
parenthesis '('" warning from checkpatch.pl

Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 196447b..1e01d62 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -900,15 +900,15 @@ rtw_joinbss_update_stainfo(struct rtw_adapter *padapter,
padapter->securitypriv.dot11PrivacyAlgrthm;
 
memset(>dot118021x_UncstKey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
 
memset(>dot11tkiprxmickey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
memset(>dot11tkiptxmickey, 0,
-  sizeof (union Keytype));
+  sizeof(union Keytype));
 
-   memset(>dot11txpn, 0, sizeof (union pn48));
-   memset(>dot11rxpn, 0, sizeof (union pn48));
+   memset(>dot11txpn, 0, sizeof(union pn48));
+   memset(>dot11rxpn, 0, sizeof(union pn48));
}
 
/*  Commented by Albert 2012/07/21 */
-- 
2.9.3



[PATCH 3/5] drivers: staging: rtl8723au: core: Refactor pointless branching

2016-09-04 Thread Matthias Beyer
As ether_addr_equal returns a bool, we can simply use the return value
to set the variable.

Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
Signed-off-by: Manuel Messner <manuel.johannes.mess...@hs-furtwangen.de>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index da9f298..196447b 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1062,11 +1062,8 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter 
*adapter, u8 *pbuf)
 pmlmepriv->assoc_ssid.ssid);
}
 
-   if (ether_addr_equal(pnetwork->network.MacAddress,
-cur_network->network.MacAddress))
-   the_same_macaddr = true;
-   else
-   the_same_macaddr = false;
+   the_same_macaddr = ether_addr_equal(pnetwork->network.MacAddress,
+   cur_network->network.MacAddress);
 
pnetwork->network.Length = get_wlan_bssid_ex_sz(>network);
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
-- 
2.9.3



[PATCH 3/5] drivers: staging: rtl8723au: core: Refactor pointless branching

2016-09-04 Thread Matthias Beyer
As ether_addr_equal returns a bool, we can simply use the return value
to set the variable.

Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index da9f298..196447b 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1062,11 +1062,8 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter 
*adapter, u8 *pbuf)
 pmlmepriv->assoc_ssid.ssid);
}
 
-   if (ether_addr_equal(pnetwork->network.MacAddress,
-cur_network->network.MacAddress))
-   the_same_macaddr = true;
-   else
-   the_same_macaddr = false;
+   the_same_macaddr = ether_addr_equal(pnetwork->network.MacAddress,
+   cur_network->network.MacAddress);
 
pnetwork->network.Length = get_wlan_bssid_ex_sz(>network);
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
-- 
2.9.3



[PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else

2016-09-04 Thread Matthias Beyer
As the if statement breaks/continues the loop, the else block is not
useful and can be omitted.

Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
Signed-off-by: Manuel Messner <manuel.johannes.mess...@hs-furtwangen.de>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 25 +++--
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 8b8b6a9..da9f298 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -244,21 +244,18 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
do_join_r = rtw_do_join(padapter);
if (do_join_r == _SUCCESS)
break;
-   else {
-   DBG_8723A("roaming do_join return %d\n",
- do_join_r);
-   pmlmepriv->to_roaming--;
 
-   if (padapter->mlmepriv.to_roaming > 0)
-   continue;
-   else {
-   DBG_8723A("%s(%d) -to roaming fail, "
- "indicate_disconnect\n",
- __func__, __LINE__);
-   rtw_indicate_disconnect23a(padapter);
-   break;
-   }
-   }
+   DBG_8723A("roaming do_join return %d\n", do_join_r);
+   pmlmepriv->to_roaming--;
+
+   if (padapter->mlmepriv.to_roaming > 0)
+   continue;
+
+   DBG_8723A("%s(%d) -to roaming fail, "
+ "indicate_disconnect\n",
+ __func__, __LINE__);
+   rtw_indicate_disconnect23a(padapter);
+   break;
}
}
 }
-- 
2.9.3



[PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else

2016-09-04 Thread Matthias Beyer
As the if statement breaks/continues the loop, the else block is not
useful and can be omitted.

Signed-off-by: Matthias Beyer 
Signed-off-by: Manuel Messner 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 25 +++--
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 8b8b6a9..da9f298 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -244,21 +244,18 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
do_join_r = rtw_do_join(padapter);
if (do_join_r == _SUCCESS)
break;
-   else {
-   DBG_8723A("roaming do_join return %d\n",
- do_join_r);
-   pmlmepriv->to_roaming--;
 
-   if (padapter->mlmepriv.to_roaming > 0)
-   continue;
-   else {
-   DBG_8723A("%s(%d) -to roaming fail, "
- "indicate_disconnect\n",
- __func__, __LINE__);
-   rtw_indicate_disconnect23a(padapter);
-   break;
-   }
-   }
+   DBG_8723A("roaming do_join return %d\n", do_join_r);
+   pmlmepriv->to_roaming--;
+
+   if (padapter->mlmepriv.to_roaming > 0)
+   continue;
+
+   DBG_8723A("%s(%d) -to roaming fail, "
+ "indicate_disconnect\n",
+ __func__, __LINE__);
+   rtw_indicate_disconnect23a(padapter);
+   break;
}
}
 }
-- 
2.9.3



[PATCH 1/5] drivers: staging: rtl8723au: core: Fix checkpatch.pl errors

2016-09-04 Thread Matthias Beyer
This patch fixes the ERRORs which are reported from the checkpatch.pl
script for this file.

Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index a786fc4..8b8b6a9 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1397,7 +1397,7 @@ void rtw23a_join_to_handler (unsigned long data)
do_join_r = rtw_do_join(adapter);
if (do_join_r != _SUCCESS) {
DBG_8723A("%s roaming do_join return "
- "%d\n", __func__ , do_join_r);
+ "%d\n", __func__, do_join_r);
continue;
}
break;
@@ -1546,7 +1546,7 @@ static int rtw_check_join_candidate(struct mlme_priv 
*pmlmepriv,
}
 
if (!*candidate ||
-   (*candidate)->network.Rssinetwork.Rssi) {
+   (*candidate)->network.Rssi < competitor->network.Rssi) {
*candidate = competitor;
updated = true;
}
@@ -1894,7 +1894,7 @@ static int SecIsInPMKIDList(struct rtw_adapter *Adapter, 
u8 *bssid)
 
do {
if (psecuritypriv->PMKIDList[i].bUsed &&
-ether_addr_equal(psecuritypriv->PMKIDList[i].Bssid, 
bssid)) {
+   ether_addr_equal(psecuritypriv->PMKIDList[i].Bssid, bssid)) 
{
break;
} else {
i++;
@@ -2139,7 +2139,7 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter 
*padapter, u8 *in_ie,
out_len = *pout_len;
pframe = rtw_set_ie23a(out_ie + out_len,
   WLAN_EID_HT_OPERATION,
-  p[1], p + 2 , pout_len);
+  p[1], p + 2, pout_len);
}
}
 
-- 
2.9.3



[PATCH 1/5] drivers: staging: rtl8723au: core: Fix checkpatch.pl errors

2016-09-04 Thread Matthias Beyer
This patch fixes the ERRORs which are reported from the checkpatch.pl
script for this file.

Signed-off-by: Matthias Beyer 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index a786fc4..8b8b6a9 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1397,7 +1397,7 @@ void rtw23a_join_to_handler (unsigned long data)
do_join_r = rtw_do_join(adapter);
if (do_join_r != _SUCCESS) {
DBG_8723A("%s roaming do_join return "
- "%d\n", __func__ , do_join_r);
+ "%d\n", __func__, do_join_r);
continue;
}
break;
@@ -1546,7 +1546,7 @@ static int rtw_check_join_candidate(struct mlme_priv 
*pmlmepriv,
}
 
if (!*candidate ||
-   (*candidate)->network.Rssinetwork.Rssi) {
+   (*candidate)->network.Rssi < competitor->network.Rssi) {
*candidate = competitor;
updated = true;
}
@@ -1894,7 +1894,7 @@ static int SecIsInPMKIDList(struct rtw_adapter *Adapter, 
u8 *bssid)
 
do {
if (psecuritypriv->PMKIDList[i].bUsed &&
-ether_addr_equal(psecuritypriv->PMKIDList[i].Bssid, 
bssid)) {
+   ether_addr_equal(psecuritypriv->PMKIDList[i].Bssid, bssid)) 
{
break;
} else {
i++;
@@ -2139,7 +2139,7 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter 
*padapter, u8 *in_ie,
out_len = *pout_len;
pframe = rtw_set_ie23a(out_ie + out_len,
   WLAN_EID_HT_OPERATION,
-  p[1], p + 2 , pout_len);
+  p[1], p + 2, pout_len);
}
}
 
-- 
2.9.3



[PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c

2016-09-04 Thread Matthias Beyer
This patchset fixes some errors and warnings reported by checkpatch.pl.

Matthias Beyer (5):
  drivers: staging: rtl8723au: core: Fix checkpatch.pl errors
  drivers: staging: rtl8723au: core: simplify if-break-else
  drivers: staging: rtl8723au: core: Refactor pointless branching
  drivers: staging: rtl8723au: core: Fix "space prohibited" warning
  drivers: staging: rtl8723au: core: Fix indentation

 drivers/staging/rtl8723au/core/rtw_mlme.c | 72 ++-
 1 file changed, 33 insertions(+), 39 deletions(-)

-- 
2.9.3



[PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c

2016-09-04 Thread Matthias Beyer
This patchset fixes some errors and warnings reported by checkpatch.pl.

Matthias Beyer (5):
  drivers: staging: rtl8723au: core: Fix checkpatch.pl errors
  drivers: staging: rtl8723au: core: simplify if-break-else
  drivers: staging: rtl8723au: core: Refactor pointless branching
  drivers: staging: rtl8723au: core: Fix "space prohibited" warning
  drivers: staging: rtl8723au: core: Fix indentation

 drivers/staging/rtl8723au/core/rtw_mlme.c | 72 ++-
 1 file changed, 33 insertions(+), 39 deletions(-)

-- 
2.9.3



[PATCH v2 1/1] drivers: staging: rtl8723au: hal: Remove pointless test

2016-09-04 Thread Matthias Beyer
This patch removes the pointless `else if` test.

Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
Reported-by: David Binderman <linuxdev.baldr...@gmail.com>
---
 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index 6989580..47e8d69 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -3530,7 +3530,7 @@ bthci_CmdLinkStatusNotify(
pBtMgnt->ExtConfig.linkInfo[i].BTProfile,
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec));
pTriple += 4;
-   } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
+   } else {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = *((u16 
*)[0]);
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = pTriple[2];
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec = pTriple[3];
-- 
2.9.3



[PATCH v2 1/1] drivers: staging: rtl8723au: hal: Remove pointless test

2016-09-04 Thread Matthias Beyer
This patch removes the pointless `else if` test.

Signed-off-by: Matthias Beyer 
Reported-by: David Binderman 
---
 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index 6989580..47e8d69 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -3530,7 +3530,7 @@ bthci_CmdLinkStatusNotify(
pBtMgnt->ExtConfig.linkInfo[i].BTProfile,
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec));
pTriple += 4;
-   } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
+   } else {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = *((u16 
*)[0]);
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = pTriple[2];
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec = pTriple[3];
-- 
2.9.3



[PATCH v2 0/1] Remove pointless test

2016-09-04 Thread Matthias Beyer
Re-sending as

On 01-09-2016 17:54:47, Greg KH wrote:
> There is no patch here :(

8<

As reported by David Binderman, this test is useless as of

if (a < 3) {
/* ... */
} else if (a >= 3) {
/* ... */
}

so this patch removes the second check.

Matthias Beyer (1):
  drivers: staging: rtl8723au: hal: Remove pointless test

 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.3



[PATCH v2 0/1] Remove pointless test

2016-09-04 Thread Matthias Beyer
Re-sending as

On 01-09-2016 17:54:47, Greg KH wrote:
> There is no patch here :(

8<

As reported by David Binderman, this test is useless as of

if (a < 3) {
/* ... */
} else if (a >= 3) {
/* ... */
}

so this patch removes the second check.

Matthias Beyer (1):
  drivers: staging: rtl8723au: hal: Remove pointless test

 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.3



Re: [PATCH] drivers: staging: rtl823au: hal: Remove pointless test

2016-08-31 Thread Matthias Beyer
Pinging here as nobody responded yet.

Maybe this was overlooked.

On 23-08-2016 21:44:16, Matthias Beyer wrote:
> As reported by David Binderman, this test is useless as of
> 
> if (a < 3) {
> /* ... */
> } else if (a >= 3) {
> /* ... */
> }
> 
> so this patch removes the second check.
> 
> Matthias Beyer (1):
>   drivers: staging: rtl8723au: hal: Remove pointless test
> 
>  drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> -- 
> 2.9.2
> 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


Re: [PATCH] drivers: staging: rtl823au: hal: Remove pointless test

2016-08-31 Thread Matthias Beyer
Pinging here as nobody responded yet.

Maybe this was overlooked.

On 23-08-2016 21:44:16, Matthias Beyer wrote:
> As reported by David Binderman, this test is useless as of
> 
> if (a < 3) {
> /* ... */
> } else if (a >= 3) {
> /* ... */
> }
> 
> so this patch removes the second check.
> 
> Matthias Beyer (1):
>   drivers: staging: rtl8723au: hal: Remove pointless test
> 
>  drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> -- 
> 2.9.2
> 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


[PATCH] drivers: staging: rtl8723au: hal: Remove pointless test

2016-08-23 Thread Matthias Beyer
This patch removes the pointless `else if` test.

Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
Reported-by: David Binderman <linuxdev.baldr...@gmail.com>
---
 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index bfcbd7a..7f11521 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -3530,7 +3530,7 @@ bthci_CmdLinkStatusNotify(
pBtMgnt->ExtConfig.linkInfo[i].BTProfile,
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec));
pTriple += 4;
-   } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
+   } else {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = *((u16 
*)[0]);
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = pTriple[2];
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec = pTriple[3];
-- 
2.9.2



[PATCH] drivers: staging: rtl823au: hal: Remove pointless test

2016-08-23 Thread Matthias Beyer
As reported by David Binderman, this test is useless as of

if (a < 3) {
/* ... */
} else if (a >= 3) {
/* ... */
}

so this patch removes the second check.

Matthias Beyer (1):
  drivers: staging: rtl8723au: hal: Remove pointless test

 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.2



[PATCH] drivers: staging: rtl8723au: hal: Remove pointless test

2016-08-23 Thread Matthias Beyer
This patch removes the pointless `else if` test.

Signed-off-by: Matthias Beyer 
Reported-by: David Binderman 
---
 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index bfcbd7a..7f11521 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -3530,7 +3530,7 @@ bthci_CmdLinkStatusNotify(
pBtMgnt->ExtConfig.linkInfo[i].BTProfile,
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec));
pTriple += 4;
-   } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
+   } else {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = *((u16 
*)[0]);
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = pTriple[2];
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec = pTriple[3];
-- 
2.9.2



[PATCH] drivers: staging: rtl823au: hal: Remove pointless test

2016-08-23 Thread Matthias Beyer
As reported by David Binderman, this test is useless as of

if (a < 3) {
/* ... */
} else if (a >= 3) {
/* ... */
}

so this patch removes the second check.

Matthias Beyer (1):
  drivers: staging: rtl8723au: hal: Remove pointless test

 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.2



[PATCH 1/1] Remove checkpatch.pl cleanups todo

2016-07-30 Thread Matthias Beyer
Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
---
 drivers/staging/android/TODO | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO
index 64d8c87..4ce0ac6 100644
--- a/drivers/staging/android/TODO
+++ b/drivers/staging/android/TODO
@@ -1,5 +1,4 @@
 TODO:
-   - checkpatch.pl cleanups
- sparse fixes
- rename files to be not so "generic"
- add proper arch dependencies as needed
-- 
2.9.1



[PATCH 1/1] Remove checkpatch.pl cleanups todo

2016-07-30 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
---
 drivers/staging/android/TODO | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO
index 64d8c87..4ce0ac6 100644
--- a/drivers/staging/android/TODO
+++ b/drivers/staging/android/TODO
@@ -1,5 +1,4 @@
 TODO:
-   - checkpatch.pl cleanups
- sparse fixes
- rename files to be not so "generic"
- add proper arch dependencies as needed
-- 
2.9.1



[PATCH 0/1] drivers: staging: android: Remove checkpatch.pl-TODO

2016-07-30 Thread Matthias Beyer
Hi Arve,
Hi Riley,

I just noticed that the drivers/staging/android driver has only 4
remaining checkpatch.pl warnings, two of them beeing
80-character-per-line warnings (the two lines are 81 characters
exactly).

The other warnings are:

./sw_sync.c:258: WARNING: memory barrier without comment
./uapi/ion.h:23: WARNING: do not add new typedefs

I'm not sure about the first one, though I could provide a patch for
the second one. The change would simply remove

typedef int ion_user_handle_t;

and replace all occurences of `ion_user_handle_t` with `int`.

I'm not sure, though, whether such a patch would be welcome.

Either way, I propose to remove the TODO note on checkpatch cleanup
with the attached patch.


Matthias Beyer (1):
  Remove checkpatch.pl cleanups todo

 drivers/staging/android/TODO | 1 -
 1 file changed, 1 deletion(-)

-- 
2.9.1



[PATCH 0/1] drivers: staging: android: Remove checkpatch.pl-TODO

2016-07-30 Thread Matthias Beyer
Hi Arve,
Hi Riley,

I just noticed that the drivers/staging/android driver has only 4
remaining checkpatch.pl warnings, two of them beeing
80-character-per-line warnings (the two lines are 81 characters
exactly).

The other warnings are:

./sw_sync.c:258: WARNING: memory barrier without comment
./uapi/ion.h:23: WARNING: do not add new typedefs

I'm not sure about the first one, though I could provide a patch for
the second one. The change would simply remove

typedef int ion_user_handle_t;

and replace all occurences of `ion_user_handle_t` with `int`.

I'm not sure, though, whether such a patch would be welcome.

Either way, I propose to remove the TODO note on checkpatch cleanup
with the attached patch.


Matthias Beyer (1):
  Remove checkpatch.pl cleanups todo

 drivers/staging/android/TODO | 1 -
 1 file changed, 1 deletion(-)

-- 
2.9.1



Re: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable

2016-07-14 Thread Matthias Beyer
Hi list,

I just wondered: I send the patch >14 days ago, 9 days ago it was 
reviewed by Rex Zhu. As far as I know, it isn't applied by now. At 
least I did not get a mail indicating that it was applied.

Are there issues with the patch I missed?

On 05-07-2016 15:06:59, Zhu, Rex wrote:
> 
> Yes, stretch_amount2 was not used on Polaris.
> 
> 
> Patch was Reviewed-by: Rex Zhu <rex@amd.com>
> 
> 
> Thanks.
> 
> 
> Best Regards
> 
> Rex
> 
> ____
> From: Matthias Beyer <m...@beyermatthias.de>
> Sent: Friday, July 1, 2016 12:38:49 AM
> To: linuxdev.baldr...@gmail.com
> Cc: Deucher, Alexander; Koenig, Christian; airl...@linux.ie; 
> dri-de...@lists.freedesktop.org; dcb...@hotmail.com; 
> linux-kernel@vger.kernel.org; Zhu, Rex; Huang, JinHuiEric; 
> nils.wallmen...@gmail.com; Matthias Beyer
> Subject: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused 
> variable
> 
> Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++--
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c 
> b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> index 64ee78f..1dcd52d 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> @@ -1761,7 +1761,7 @@ static int 
> polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
>  {
>  uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
>  struct polaris10_hwmgr *data = (struct polaris10_hwmgr 
> *)(hwmgr->backend);
> -   uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
> +   uint8_t i, stretch_amount, volt_offset = 0;
>  struct phm_ppt_v1_information *table_info =
>  (struct phm_ppt_v1_information *)(hwmgr->pptable);
>  struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
> @@ -1806,11 +1806,8 @@ static int 
> polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
>  }
> 
>  /* Populate CKS Lookup Table */
> -   if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
> -   stretch_amount2 = 0;
> -   else if (stretch_amount == 3 || stretch_amount == 4)
> -   stretch_amount2 = 1;
> -   else {
> +   if (stretch_amount != 1 && stretch_amount != 2 && stretch_amount != 3 
> &&
> +   stretch_amount != 4 && stretch_amount != 5) {
>  phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
>  PHM_PlatformCaps_ClockStretcher);
>  PP_ASSERT_WITH_CODE(false,
> --
> 2.9.0
> 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


Re: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable

2016-07-14 Thread Matthias Beyer
Hi list,

I just wondered: I send the patch >14 days ago, 9 days ago it was 
reviewed by Rex Zhu. As far as I know, it isn't applied by now. At 
least I did not get a mail indicating that it was applied.

Are there issues with the patch I missed?

On 05-07-2016 15:06:59, Zhu, Rex wrote:
> 
> Yes, stretch_amount2 was not used on Polaris.
> 
> 
> Patch was Reviewed-by: Rex Zhu 
> 
> 
> Thanks.
> 
> 
> Best Regards
> 
> Rex
> 
> ____
> From: Matthias Beyer 
> Sent: Friday, July 1, 2016 12:38:49 AM
> To: linuxdev.baldr...@gmail.com
> Cc: Deucher, Alexander; Koenig, Christian; airl...@linux.ie; 
> dri-de...@lists.freedesktop.org; dcb...@hotmail.com; 
> linux-kernel@vger.kernel.org; Zhu, Rex; Huang, JinHuiEric; 
> nils.wallmen...@gmail.com; Matthias Beyer
> Subject: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused 
> variable
> 
> Signed-off-by: Matthias Beyer 
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++--
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c 
> b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> index 64ee78f..1dcd52d 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
> @@ -1761,7 +1761,7 @@ static int 
> polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
>  {
>  uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
>  struct polaris10_hwmgr *data = (struct polaris10_hwmgr 
> *)(hwmgr->backend);
> -   uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
> +   uint8_t i, stretch_amount, volt_offset = 0;
>  struct phm_ppt_v1_information *table_info =
>  (struct phm_ppt_v1_information *)(hwmgr->pptable);
>  struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
> @@ -1806,11 +1806,8 @@ static int 
> polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
>  }
> 
>  /* Populate CKS Lookup Table */
> -   if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
> -   stretch_amount2 = 0;
> -   else if (stretch_amount == 3 || stretch_amount == 4)
> -   stretch_amount2 = 1;
> -   else {
> +   if (stretch_amount != 1 && stretch_amount != 2 && stretch_amount != 3 
> &&
> +   stretch_amount != 4 && stretch_amount != 5) {
>  phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
>  PHM_PlatformCaps_ClockStretcher);
>  PP_ASSERT_WITH_CODE(false,
> --
> 2.9.0
> 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature


[PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable

2016-06-30 Thread Matthias Beyer
Signed-off-by: Matthias Beyer <m...@beyermatthias.de>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
index 64ee78f..1dcd52d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
@@ -1761,7 +1761,7 @@ static int 
polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
 {
uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
struct polaris10_hwmgr *data = (struct polaris10_hwmgr 
*)(hwmgr->backend);
-   uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+   uint8_t i, stretch_amount, volt_offset = 0;
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1806,11 +1806,8 @@ static int 
polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
}
 
/* Populate CKS Lookup Table */
-   if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
-   stretch_amount2 = 0;
-   else if (stretch_amount == 3 || stretch_amount == 4)
-   stretch_amount2 = 1;
-   else {
+   if (stretch_amount != 1 && stretch_amount != 2 && stretch_amount != 3 &&
+   stretch_amount != 4 && stretch_amount != 5) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
-- 
2.9.0



[PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable

2016-06-30 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
index 64ee78f..1dcd52d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
@@ -1761,7 +1761,7 @@ static int 
polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
 {
uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min;
struct polaris10_hwmgr *data = (struct polaris10_hwmgr 
*)(hwmgr->backend);
-   uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+   uint8_t i, stretch_amount, volt_offset = 0;
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1806,11 +1806,8 @@ static int 
polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
}
 
/* Populate CKS Lookup Table */
-   if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
-   stretch_amount2 = 0;
-   else if (stretch_amount == 3 || stretch_amount == 4)
-   stretch_amount2 = 1;
-   else {
+   if (stretch_amount != 1 && stretch_amount != 2 && stretch_amount != 3 &&
+   stretch_amount != 4 && stretch_amount != 5) {
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher);
PP_ASSERT_WITH_CODE(false,
-- 
2.9.0



[PATCH] Remove unused variable

2016-06-30 Thread Matthias Beyer

Hi,

after reading your email, I created this patch.

**Please note all**: I'm getting into kernel dev right now (again), so I don't
even know how to test-compile this patch, let alone testing it.

You're more than welcome to teach me things.

Matthias Beyer (1):
  drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable

 drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

-- 
2.9.0



[PATCH] Remove unused variable

2016-06-30 Thread Matthias Beyer

Hi,

after reading your email, I created this patch.

**Please note all**: I'm getting into kernel dev right now (again), so I don't
even know how to test-compile this patch, let alone testing it.

You're more than welcome to teach me things.

Matthias Beyer (1):
  drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable

 drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

-- 
2.9.0



Re: [PATCH v2 00/16] checkpatch clean-up of rtl8723au's rtw_security.c

2015-03-15 Thread Matthias Beyer
Hi,

On 14-03-2015 20:10:25, M. Vefa Bicakci wrote:
> These commits address a number of checkpatch.pl warnings and errors
> in rtl8723au's rtw_security.c.

Were these patches already applied? I cannot apply them on top of Greg KHs
latest staging-next!

I reviewed them and I want to add Reviewed-by: tags, but I would like to apply
them on my kernel source copy first, just to re-check them!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpepb1gMwEFg.pgp
Description: PGP signature


Re: [PATCH v2 00/16] checkpatch clean-up of rtl8723au's rtw_security.c

2015-03-15 Thread Matthias Beyer
Hi,

On 14-03-2015 20:10:25, M. Vefa Bicakci wrote:
 These commits address a number of checkpatch.pl warnings and errors
 in rtl8723au's rtw_security.c.

Were these patches already applied? I cannot apply them on top of Greg KHs
latest staging-next!

I reviewed them and I want to add Reviewed-by: tags, but I would like to apply
them on my kernel source copy first, just to re-check them!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpepb1gMwEFg.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: fix spaces before commas in Bcmchar.c

2014-12-15 Thread Matthias Beyer
Hi Jack,

bcm is removed from the linux kernel. You are working against the
wrong tree!

Please work against staging-next of gregkh for staging drivers!

Ask me if you do not understand what the problem is!
Feel free to ask me other questions as well!

On 15-12-2014 11:22:29, Jack Wilson wrote:
> This is a patch to the Bcmchar.c file that fixes a space before comma warning 
> found by checkpatch.pl.
> Signed-off-by: Jack Wilson 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgp27YGzssRv6.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: fix spaces before commas in Bcmchar.c

2014-12-15 Thread Matthias Beyer
Hi Jack,

bcm is removed from the linux kernel. You are working against the
wrong tree!

Please work against staging-next of gregkh for staging drivers!

Ask me if you do not understand what the problem is!
Feel free to ask me other questions as well!

On 15-12-2014 11:22:29, Jack Wilson wrote:
 This is a patch to the Bcmchar.c file that fixes a space before comma warning 
 found by checkpatch.pl.
 Signed-off-by: Jack Wilson jackwilson...@gmail.com

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgp27YGzssRv6.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: Fix tab between spaces in InterfaceMacros.h This is a patch to the InterfaceMacros.h file that fixes an added tab instead of a space. Found by the checkpatch.pl tool.

2014-12-02 Thread Matthias Beyer
Hi Pieter,

On 02-12-2014 19:04:31, 1Ago - Pieter Waegeman wrote:
> That's weird. I can still see the driver in the 'master' branch on
> https://github.com/torvalds/linux/tree/master/drivers/staging/bcm
> I've cloned from
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> 
> Or am I doing something wrong?

nope, you've done everything right. BUT the staging stuff gets
developed in the repo/branch from gregkh, so you should base your
patches to drivers/staging on that branch. And there, this driver is
removed already!

Feel free to contact me directly if you get stuck with it!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpCf8pAlQnaS.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: Fix tab between spaces in InterfaceMacros.h This is a patch to the InterfaceMacros.h file that fixes an added tab instead of a space. Found by the checkpatch.pl tool.

2014-12-02 Thread Matthias Beyer
Hi Pieter,

as far as I know, this driver was removed from the source tree. Please
update your local copy of the kernel.

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.

On 02-12-2014 18:25:49, Pieter Waegeman wrote:
> ---
>  drivers/staging/bcm/InterfaceMacros.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/bcm/InterfaceMacros.h 
> b/drivers/staging/bcm/InterfaceMacros.h
> index fedb794..67e7b62 100644
> --- a/drivers/staging/bcm/InterfaceMacros.h
> +++ b/drivers/staging/bcm/InterfaceMacros.h
> @@ -4,7 +4,7 @@
>  #define BCM_USB_MAX_READ_LENGTH 2048
>  
>  #define MAXIMUM_USB_TCB  128
> -#define MAXIMUM_USB_RCB   128
> +#define MAXIMUM_USB_RCB   128
>  
>  #define MAX_BUFFERS_PER_QUEUE   256
>  
> -- 
> 2.1.0
> 


pgp_q76Z2zF_o.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: Fix tab between spaces in InterfaceMacros.h This is a patch to the InterfaceMacros.h file that fixes an added tab instead of a space. Found by the checkpatch.pl tool.

2014-12-02 Thread Matthias Beyer
Hi Pieter,

as far as I know, this driver was removed from the source tree. Please
update your local copy of the kernel.

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.

On 02-12-2014 18:25:49, Pieter Waegeman wrote:
 ---
  drivers/staging/bcm/InterfaceMacros.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/staging/bcm/InterfaceMacros.h 
 b/drivers/staging/bcm/InterfaceMacros.h
 index fedb794..67e7b62 100644
 --- a/drivers/staging/bcm/InterfaceMacros.h
 +++ b/drivers/staging/bcm/InterfaceMacros.h
 @@ -4,7 +4,7 @@
  #define BCM_USB_MAX_READ_LENGTH 2048
  
  #define MAXIMUM_USB_TCB  128
 -#define MAXIMUM_USB_RCB   128
 +#define MAXIMUM_USB_RCB   128
  
  #define MAX_BUFFERS_PER_QUEUE   256
  
 -- 
 2.1.0
 


pgp_q76Z2zF_o.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: Fix tab between spaces in InterfaceMacros.h This is a patch to the InterfaceMacros.h file that fixes an added tab instead of a space. Found by the checkpatch.pl tool.

2014-12-02 Thread Matthias Beyer
Hi Pieter,

On 02-12-2014 19:04:31, 1Ago - Pieter Waegeman wrote:
 That's weird. I can still see the driver in the 'master' branch on
 https://github.com/torvalds/linux/tree/master/drivers/staging/bcm
 I've cloned from
 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 
 Or am I doing something wrong?

nope, you've done everything right. BUT the staging stuff gets
developed in the repo/branch from gregkh, so you should base your
patches to drivers/staging on that branch. And there, this driver is
removed already!

Feel free to contact me directly if you get stuck with it!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpCf8pAlQnaS.pgp
Description: PGP signature


Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings

2014-10-15 Thread Matthias Beyer
On 15-10-2014 15:19:44, Jeff Kirsher wrote:
> I will just go ahead and create a patch to remove the driver.  Greg can
> then decide to either accept the patch to fix the Kconfig or accept the
> patch to remove the driver.

Don't forget the maintainers file :-)

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpgABAhNBRlO.pgp
Description: PGP signature


Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings

2014-10-15 Thread Matthias Beyer
On 15-10-2014 06:03:33, Jeff Kirsher wrote:
> 
> I thought I remember Greg saying something about getting rid of this
> driver anyway, but I could be wrong.  If Greg decides to keep this
> driver around, then I think we should something like your suggestion
> above.

Let me throw in my comment here: Yes, Greg stated in several places
that this whole driver should be removed. I was about to ask when this
will happen, so let me add a suggestion:

Lets delete this _now_!!1!1!

If you care, I can search the statements where Greg stated that this
should be removed, but I guess this some effort... I can barely
remember that one time was on the linuxnewbies ML and one or two times
here.

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpWjLBXCQcuF.pgp
Description: PGP signature


Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings

2014-10-15 Thread Matthias Beyer
On 15-10-2014 06:03:33, Jeff Kirsher wrote:
 
 I thought I remember Greg saying something about getting rid of this
 driver anyway, but I could be wrong.  If Greg decides to keep this
 driver around, then I think we should something like your suggestion
 above.

Let me throw in my comment here: Yes, Greg stated in several places
that this whole driver should be removed. I was about to ask when this
will happen, so let me add a suggestion:

Lets delete this _now_!!1!1!

If you care, I can search the statements where Greg stated that this
should be removed, but I guess this some effort... I can barely
remember that one time was on the linuxnewbies ML and one or two times
here.

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpWjLBXCQcuF.pgp
Description: PGP signature


Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings

2014-10-15 Thread Matthias Beyer
On 15-10-2014 15:19:44, Jeff Kirsher wrote:
 I will just go ahead and create a patch to remove the driver.  Greg can
 then decide to either accept the patch to fix the Kconfig or accept the
 patch to remove the driver.

Don't forget the maintainers file :-)

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpgABAhNBRlO.pgp
Description: PGP signature


Re: [PATCH] Staging/bcm: Fix whitespace/comments in Ioctl.h

2014-09-16 Thread Matthias Beyer
Reviewed-by: Matthias Beyer 

On 15-09-2014 21:16:15, Martin Kelly wrote:
> Cleanup whitespace and comments in Ioctl.h in a few ways:
> - > 80 character cleanup
> - Comment clarification
> - More consistent vertical alignment
> 
> Signed-off-by: Martin Kelly 
> ---
>  drivers/staging/bcm/Ioctl.h | 26 +-
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/bcm/Ioctl.h b/drivers/staging/bcm/Ioctl.h
> index 797f862..fa5f867 100644
> --- a/drivers/staging/bcm/Ioctl.h
> +++ b/drivers/staging/bcm/Ioctl.h
> @@ -87,9 +87,9 @@ struct bcm_user_thread_req {
>  #define IOCTL_BCM_FLASH2X_SECTION_WRITE  _IOW(BCM_IOCTL, 0x866, 
> int)
>  #define IOCTL_BCM_GET_FLASH2X_SECTION_BITMAP _IOR(BCM_IOCTL, 0x867, int)
>  #define IOCTL_BCM_SET_ACTIVE_SECTION _IOW(BCM_IOCTL, 0x868, int)
> -#define  IOCTL_BCM_IDENTIFY_ACTIVE_SECTION   _IO(BCM_IOCTL, 0x869)
> +#define IOCTL_BCM_IDENTIFY_ACTIVE_SECTION_IO(BCM_IOCTL, 0x869)
>  #define IOCTL_BCM_COPY_SECTION   _IOW(BCM_IOCTL, 0x870, 
> int)
> -#define  IOCTL_BCM_GET_FLASH_CS_INFO _IOR(BCM_IOCTL, 0x871, 
> int)
> +#define IOCTL_BCM_GET_FLASH_CS_INFO  _IOR(BCM_IOCTL, 0x871, int)
>  #define IOCTL_BCM_SELECT_DSD _IOW(BCM_IOCTL, 0x872, int)
>  #define IOCTL_BCM_NVM_RAW_READ   _IOR(BCM_IOCTL, 0x875, 
> int)
>  #define IOCTL_BCM_CNTRLMSG_MASK  _IOW(BCM_IOCTL, 0x874, 
> int)
> @@ -130,7 +130,7 @@ struct bcm_bulk_wrm_buffer {
>  };
>  
>  enum bcm_flash2x_section_val {
> - NO_SECTION_VAL = 0, /* no section is chosen when absolute offset is 
> given for RD/WR */
> + NO_SECTION_VAL = 0, /* no section chosen when absolute offset is given 
> for RD/WR */
>   ISO_IMAGE1,
>   ISO_IMAGE2,
>   DSD0,
> @@ -152,11 +152,11 @@ enum bcm_flash2x_section_val {
>   * Structure used for READ/WRITE Flash Map2.x
>   */
>  struct bcm_flash2x_readwrite {
> - enum bcm_flash2x_section_val Section; /* which section has to be 
> read/written */
> - u32 offset;  /* Offset within Section. */
> - u32 numOfBytes;  /* NOB from the offset */
> + enum bcm_flash2x_section_val Section; /* section to be read/written */
> + u32 offset; /* offset within section. */
> + u32 numOfBytes; /* number of bytes from the offset */
>   u32 bVerify;
> - void __user *pDataBuff;  /* Buffer for reading/writing */
> + void __user *pDataBuff; /* buffer for reading/writing */
>  };
>  
>  /*
> @@ -207,20 +207,20 @@ struct bcm_time_elapsed {
>  };
>  
>  enum {
> - WIMAX_IDX = 0,  /* To access WiMAX chip GPIO's for GPIO_MULTI_INFO or 
> GPIO_MULTI_MODE */
> - HOST_IDX,   /* To access Host chip GPIO's for GPIO_MULTI_INFO or 
> GPIO_MULTI_MODE */
> + WIMAX_IDX = 0, /* To access WiMAX chip GPIO's for GPIO_MULTI_INFO or 
> GPIO_MULTI_MODE */
> + HOST_IDX, /* To access Host chip GPIO's for GPIO_MULTI_INFO or 
> GPIO_MULTI_MODE */
>   MAX_IDX
>  };
>  
>  struct bcm_gpio_multi_info {
>   unsigned int uiGPIOCommand; /* 1 for set and 0 for get */
> - unsigned int uiGPIOMask;/* set the correspondig bit to 1 to access 
> GPIO */
> - unsigned int uiGPIOValue;   /* 0 or 1; value to be set when command is 
> 1. */
> + unsigned int uiGPIOMask; /* set the corresponding bit to 1 to access 
> GPIO */
> + unsigned int uiGPIOValue; /* 0 or 1; value to be set when command is 1. 
> */
>  } __packed;
>  
>  struct bcm_gpio_multi_mode {
> - unsigned int uiGPIOMode;/* 1 for OUT mode, 0 for IN mode */
> - unsigned int uiGPIOMask;/* GPIO mask to set mode */
> + unsigned int uiGPIOMode; /* 1 for OUT mode, 0 for IN mode */
> + unsigned int uiGPIOMask; /* GPIO mask to set mode */
>  } __packed;
>  
>  #endif
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpEbiaDiH3Yu.pgp
Description: PGP signature


Re: [PATCH] Staging/bcm: Fix whitespace/comments in Ioctl.h

2014-09-16 Thread Matthias Beyer
Reviewed-by: Matthias Beyer m...@beyermatthias.de

On 15-09-2014 21:16:15, Martin Kelly wrote:
 Cleanup whitespace and comments in Ioctl.h in a few ways:
 -  80 character cleanup
 - Comment clarification
 - More consistent vertical alignment
 
 Signed-off-by: Martin Kelly martk...@amazon.com
 ---
  drivers/staging/bcm/Ioctl.h | 26 +-
  1 file changed, 13 insertions(+), 13 deletions(-)
 
 diff --git a/drivers/staging/bcm/Ioctl.h b/drivers/staging/bcm/Ioctl.h
 index 797f862..fa5f867 100644
 --- a/drivers/staging/bcm/Ioctl.h
 +++ b/drivers/staging/bcm/Ioctl.h
 @@ -87,9 +87,9 @@ struct bcm_user_thread_req {
  #define IOCTL_BCM_FLASH2X_SECTION_WRITE  _IOW(BCM_IOCTL, 0x866, 
 int)
  #define IOCTL_BCM_GET_FLASH2X_SECTION_BITMAP _IOR(BCM_IOCTL, 0x867, int)
  #define IOCTL_BCM_SET_ACTIVE_SECTION _IOW(BCM_IOCTL, 0x868, int)
 -#define  IOCTL_BCM_IDENTIFY_ACTIVE_SECTION   _IO(BCM_IOCTL, 0x869)
 +#define IOCTL_BCM_IDENTIFY_ACTIVE_SECTION_IO(BCM_IOCTL, 0x869)
  #define IOCTL_BCM_COPY_SECTION   _IOW(BCM_IOCTL, 0x870, 
 int)
 -#define  IOCTL_BCM_GET_FLASH_CS_INFO _IOR(BCM_IOCTL, 0x871, 
 int)
 +#define IOCTL_BCM_GET_FLASH_CS_INFO  _IOR(BCM_IOCTL, 0x871, int)
  #define IOCTL_BCM_SELECT_DSD _IOW(BCM_IOCTL, 0x872, int)
  #define IOCTL_BCM_NVM_RAW_READ   _IOR(BCM_IOCTL, 0x875, 
 int)
  #define IOCTL_BCM_CNTRLMSG_MASK  _IOW(BCM_IOCTL, 0x874, 
 int)
 @@ -130,7 +130,7 @@ struct bcm_bulk_wrm_buffer {
  };
  
  enum bcm_flash2x_section_val {
 - NO_SECTION_VAL = 0, /* no section is chosen when absolute offset is 
 given for RD/WR */
 + NO_SECTION_VAL = 0, /* no section chosen when absolute offset is given 
 for RD/WR */
   ISO_IMAGE1,
   ISO_IMAGE2,
   DSD0,
 @@ -152,11 +152,11 @@ enum bcm_flash2x_section_val {
   * Structure used for READ/WRITE Flash Map2.x
   */
  struct bcm_flash2x_readwrite {
 - enum bcm_flash2x_section_val Section; /* which section has to be 
 read/written */
 - u32 offset;  /* Offset within Section. */
 - u32 numOfBytes;  /* NOB from the offset */
 + enum bcm_flash2x_section_val Section; /* section to be read/written */
 + u32 offset; /* offset within section. */
 + u32 numOfBytes; /* number of bytes from the offset */
   u32 bVerify;
 - void __user *pDataBuff;  /* Buffer for reading/writing */
 + void __user *pDataBuff; /* buffer for reading/writing */
  };
  
  /*
 @@ -207,20 +207,20 @@ struct bcm_time_elapsed {
  };
  
  enum {
 - WIMAX_IDX = 0,  /* To access WiMAX chip GPIO's for GPIO_MULTI_INFO or 
 GPIO_MULTI_MODE */
 - HOST_IDX,   /* To access Host chip GPIO's for GPIO_MULTI_INFO or 
 GPIO_MULTI_MODE */
 + WIMAX_IDX = 0, /* To access WiMAX chip GPIO's for GPIO_MULTI_INFO or 
 GPIO_MULTI_MODE */
 + HOST_IDX, /* To access Host chip GPIO's for GPIO_MULTI_INFO or 
 GPIO_MULTI_MODE */
   MAX_IDX
  };
  
  struct bcm_gpio_multi_info {
   unsigned int uiGPIOCommand; /* 1 for set and 0 for get */
 - unsigned int uiGPIOMask;/* set the correspondig bit to 1 to access 
 GPIO */
 - unsigned int uiGPIOValue;   /* 0 or 1; value to be set when command is 
 1. */
 + unsigned int uiGPIOMask; /* set the corresponding bit to 1 to access 
 GPIO */
 + unsigned int uiGPIOValue; /* 0 or 1; value to be set when command is 1. 
 */
  } __packed;
  
  struct bcm_gpio_multi_mode {
 - unsigned int uiGPIOMode;/* 1 for OUT mode, 0 for IN mode */
 - unsigned int uiGPIOMask;/* GPIO mask to set mode */
 + unsigned int uiGPIOMode; /* 1 for OUT mode, 0 for IN mode */
 + unsigned int uiGPIOMask; /* GPIO mask to set mode */
  } __packed;
  
  #endif
 -- 
 2.1.0
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpEbiaDiH3Yu.pgp
Description: PGP signature


Re: [PATCH] staging: bcm: sort.c: fix coding style

2014-09-06 Thread Matthias Beyer
Reviewed-by: Matthias Beyer 

On 06-09-2014 01:59:37, Omar Sandoval wrote:
> Fix checkpatch.pl "Alignment should match open parenthesis".
> 
> Signed-off-by: Omar Sandoval 
> ---
>  drivers/staging/bcm/sort.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/bcm/sort.c b/drivers/staging/bcm/sort.c
> index d518c42..ca0b179 100644
> --- a/drivers/staging/bcm/sort.c
> +++ b/drivers/staging/bcm/sort.c
> @@ -28,7 +28,7 @@ VOID SortPackInfo(struct bcm_mini_adapter *Adapter)
>   DBG_LVL_ALL, "<===");
>  
>   sort(Adapter->PackInfo, NO_OF_QUEUES, sizeof(struct bcm_packet_info),
> - compare_packet_info, NULL);
> +  compare_packet_info, NULL);
>  }
>  
>  static int compare_classifiers(void const *a, void const *b)
> @@ -48,5 +48,5 @@ VOID SortClassifiers(struct bcm_mini_adapter *Adapter)
>   DBG_LVL_ALL, "<===");
>  
>   sort(Adapter->astClassifierTable, MAX_CLASSIFIERS,
> - sizeof(struct bcm_classifier_rule), compare_classifiers, NULL);
> +  sizeof(struct bcm_classifier_rule), compare_classifiers, NULL);
>  }
> -- 
> 2.1.0
> 
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpEyT5kHnWOu.pgp
Description: PGP signature


Re: [PATCH] staging: bcm: sort.c: fix coding style

2014-09-06 Thread Matthias Beyer
Reviewed-by: Matthias Beyer m...@beyermatthias.de

On 06-09-2014 01:59:37, Omar Sandoval wrote:
 Fix checkpatch.pl Alignment should match open parenthesis.
 
 Signed-off-by: Omar Sandoval osan...@osandov.com
 ---
  drivers/staging/bcm/sort.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/staging/bcm/sort.c b/drivers/staging/bcm/sort.c
 index d518c42..ca0b179 100644
 --- a/drivers/staging/bcm/sort.c
 +++ b/drivers/staging/bcm/sort.c
 @@ -28,7 +28,7 @@ VOID SortPackInfo(struct bcm_mini_adapter *Adapter)
   DBG_LVL_ALL, ===);
  
   sort(Adapter-PackInfo, NO_OF_QUEUES, sizeof(struct bcm_packet_info),
 - compare_packet_info, NULL);
 +  compare_packet_info, NULL);
  }
  
  static int compare_classifiers(void const *a, void const *b)
 @@ -48,5 +48,5 @@ VOID SortClassifiers(struct bcm_mini_adapter *Adapter)
   DBG_LVL_ALL, ===);
  
   sort(Adapter-astClassifierTable, MAX_CLASSIFIERS,
 - sizeof(struct bcm_classifier_rule), compare_classifiers, NULL);
 +  sizeof(struct bcm_classifier_rule), compare_classifiers, NULL);
  }
 -- 
 2.1.0
 
 ___
 devel mailing list
 de...@linuxdriverproject.org
 http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpEyT5kHnWOu.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: fixed a comment coding style issue

2014-08-31 Thread Matthias Beyer
Reviewed-by: Matthias Beyer 

On 31-08-2014 12:24:50, Anh Le wrote:
> Fixed a C99 comment issue in InterfaceMisc.h.
> 
> Signed-off-by: Anh Le 
> ---
>  drivers/staging/bcm/InterfaceMisc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/bcm/InterfaceMisc.h 
> b/drivers/staging/bcm/InterfaceMisc.h
> index efb6860..0e5e38b 100644
> --- a/drivers/staging/bcm/InterfaceMisc.h
> +++ b/drivers/staging/bcm/InterfaceMisc.h
> @@ -39,4 +39,4 @@ VOID Bcm_kill_all_URBs(struct bcm_interface_adapter 
> *psIntfAdapter);
>  
>  #define DISABLE_USB_ZERO_LEN_INT 0x0F011878
>  
> -#endif // __INTERFACE_MISC_H
> +#endif /* __INTERFACE_MISC_H */
> -- 
> 1.8.5.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpzKQCAV_Rrj.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: fixed a comment coding style issue

2014-08-31 Thread Matthias Beyer
Reviewed-by: Matthias Beyer m...@beyermatthias.de

On 31-08-2014 12:24:50, Anh Le wrote:
 Fixed a C99 comment issue in InterfaceMisc.h.
 
 Signed-off-by: Anh Le anhlq2...@gmail.com
 ---
  drivers/staging/bcm/InterfaceMisc.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/staging/bcm/InterfaceMisc.h 
 b/drivers/staging/bcm/InterfaceMisc.h
 index efb6860..0e5e38b 100644
 --- a/drivers/staging/bcm/InterfaceMisc.h
 +++ b/drivers/staging/bcm/InterfaceMisc.h
 @@ -39,4 +39,4 @@ VOID Bcm_kill_all_URBs(struct bcm_interface_adapter 
 *psIntfAdapter);
  
  #define DISABLE_USB_ZERO_LEN_INT 0x0F011878
  
 -#endif // __INTERFACE_MISC_H
 +#endif /* __INTERFACE_MISC_H */
 -- 
 1.8.5.5
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpzKQCAV_Rrj.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: LeakyBucket: format kernel-docs

2014-08-30 Thread Matthias Beyer
**/
> +/**
> + * transmit_packets() - This function transmits the packets from
> + * different queues, if free descriptors are available on target.
> + * @Adapter: Pointer to the Adapter structure.
> + *
> + * Returns: None.
> + */
>  VOID transmit_packets(struct bcm_mini_adapter *Adapter)
>  {
>   UINT uiPrevTotalCount = 0;
> -- 
> 1.9.1
> 
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reviewed-by: Matthias Beyer 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpzQHbl7gRA5.pgp
Description: PGP signature


Re: [PATCH] Staging: bcm: LeakyBucket: format kernel-docs

2014-08-30 Thread Matthias Beyer
://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reviewed-by: Matthias Beyer m...@beyermatthias.de

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpzQHbl7gRA5.pgp
Description: PGP signature


Re: [PATCH] staging: bcm: add missing blank lines after declarations

2014-07-06 Thread Matthias Beyer
 +915,7 @@ static int flashWriteStatus(struct bcm_mini_adapter 
> *Adapter,
>  static VOID BcmRestoreBlockProtectStatus(struct bcm_mini_adapter *Adapter, 
> ULONG ulWriteStatus)
>  {
>   unsigned int value;
> +
>   value = (FLASH_CMD_WRITE_ENABLE << 24);
>   wrmalt(Adapter, FLASH_SPI_CMDQ_REG, , sizeof(value));
>  
> @@ -1154,6 +1156,7 @@ static int BeceemFlashBulkWrite(struct bcm_mini_adapter 
> *Adapter,
>   if (STATUS_SUCCESS == BeceemFlashBulkRead(Adapter, 
> (PUINT)ucReadBk, uiOffsetFromSectStart + uiIndex, MAX_RW_SIZE)) {
>   if (Adapter->ulFlashWriteSize == 1) {
>   unsigned int uiReadIndex = 0;
> +
>   for (uiReadIndex = 0; uiReadIndex < 16; 
> uiReadIndex++) {
>   if (ucReadBk[uiReadIndex] != 
> pTempBuff[uiIndex + uiReadIndex]) {
>   if (STATUS_SUCCESS != 
> (*Adapter->fpFlashWriteWithStatusCheck)(Adapter, uiPartOffset + uiIndex + 
> uiReadIndex, [uiIndex+uiReadIndex])) {
> @@ -1868,6 +1871,7 @@ int BeceemNVMWrite(struct bcm_mini_adapter *Adapter,
>   if ((uiOffset + uiNumBytes) > EEPROM_CALPARAM_START) {
>   ULONG ulBytesTobeSkipped = 0;
>   PUCHAR pcBuffer = (PUCHAR)pBuffer; /* char 
> pointer to take care of odd byte cases. */
> +
>   uiNumBytes -= (EEPROM_CALPARAM_START - 
> uiOffset);
>   ulBytesTobeSkipped += (EEPROM_CALPARAM_START - 
> uiOffset);
>   uiOffset += (EEPROM_CALPARAM_START - uiOffset);
> @@ -2455,6 +2459,7 @@ static int BcmGetFlashCSInfo(struct bcm_mini_adapter 
> *Adapter)
>   #endif
>  
>   unsigned int uiFlashLayoutMajorVersion;
> +
>   Adapter->uiFlashLayoutMinorVersion = 0;
>   Adapter->uiFlashLayoutMajorVersion = 0;
>   Adapter->ulFlashControlSectionStart = FLASH_CS_INFO_START_ADDR;
> @@ -4319,6 +4324,7 @@ static int ReadISOSignature(struct bcm_mini_adapter 
> *Adapter, enum bcm_flash2x_s
>  static int ReadISOPriority(struct bcm_mini_adapter *Adapter, enum 
> bcm_flash2x_section_val iso)
>  {
>   unsigned int ISOPri = STATUS_FAILURE;
> +
>   if (IsSectionWritable(Adapter, iso)) {
>   if (ReadISOSignature(Adapter, iso) == ISO_IMAGE_MAGIC_NUMBER) {
>   BcmFlash2xBulkRead(Adapter,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

Looks good.

Reviewed-by: Matthias Beyer 

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpCIJ6zN6ZXV.pgp
Description: PGP signature


Re: [PATCH] staging: bcm: add missing blank lines after declarations

2014-07-06 Thread Matthias Beyer
);
   ulBytesTobeSkipped += (EEPROM_CALPARAM_START - 
 uiOffset);
   uiOffset += (EEPROM_CALPARAM_START - uiOffset);
 @@ -2455,6 +2459,7 @@ static int BcmGetFlashCSInfo(struct bcm_mini_adapter 
 *Adapter)
   #endif
  
   unsigned int uiFlashLayoutMajorVersion;
 +
   Adapter-uiFlashLayoutMinorVersion = 0;
   Adapter-uiFlashLayoutMajorVersion = 0;
   Adapter-ulFlashControlSectionStart = FLASH_CS_INFO_START_ADDR;
 @@ -4319,6 +4324,7 @@ static int ReadISOSignature(struct bcm_mini_adapter 
 *Adapter, enum bcm_flash2x_s
  static int ReadISOPriority(struct bcm_mini_adapter *Adapter, enum 
 bcm_flash2x_section_val iso)
  {
   unsigned int ISOPri = STATUS_FAILURE;
 +
   if (IsSectionWritable(Adapter, iso)) {
   if (ReadISOSignature(Adapter, iso) == ISO_IMAGE_MAGIC_NUMBER) {
   BcmFlash2xBulkRead(Adapter,
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

Looks good.

Reviewed-by: Matthias Beyer m...@beyermatthias.de

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpCIJ6zN6ZXV.pgp
Description: PGP signature


Re: [BUG] 3.14-rc6 at mousedev_open_device+0x77/0x100

2014-03-29 Thread Matthias Beyer
Hi,

I want to add that my suspend is broken too. And I don't know if this has
any to do with the reported issues.

On 29-03-2014 12:15:35, Matthias Beyer wrote:
> Hi,
> 
> I got this error with 3.13.7, which I just installed:
> 
> ---
> 
> Mär 29 11:53:05 fu kernel: BUG: unable to handle kernel NULL pointer 
> dereference at   (null)
> Mär 29 11:53:05 fu kernel: IP: [] 
> mousedev_open_device+0x77/0x100 [mousedev]
> Mär 29 11:53:05 fu kernel: PGD 400853067 PUD 400852067 PMD 0 
> Mär 29 11:53:05 fu kernel: Oops:  [#1] PREEMPT SMP 
> Mär 29 11:53:05 fu kernel: Modules linked in: mousedev(+) btusb bluetooth 
> intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm btrfs 
> iTCO_wdt iTCO_vendor_support snd_hda_codec_hdmi snd_hda_codec_conexant 
> raid6_pq libcrc32c xor nls_cp437 vfat fat arc4 iwldvm mac80211 microcode 
> evdev pcspkr psmouse se
> Mär 29 11:53:05 fu kernel:  crc32c_intel ghash_clmulni_intel aesni_intel 
> aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd ehci_pci sdhci_pci 
> ehci_hcd sdhci scsi_mod mmc_core usbcore usb_common i8042 serio
> Mär 29 11:53:05 fu kernel: CPU: 2 PID: 764 Comm: acpid Tainted: G   O 
> 3.13.7-1-ARCH #1
> Mär 29 11:53:05 fu kernel: Hardware name: LENOVO 4290A11/4290A11, BIOS 
> 8DET66WW (1.36 ) 10/22/2012
> Mär 29 11:53:05 fu kernel: task: 8804068c2400 ti: 88007fc62000 
> task.ti: 88007fc62000
> Mär 29 11:53:05 fu kernel: RIP: 0010:[]  
> [] mousedev_open_device+0x77/0x100 [mousedev]
> Mär 29 11:53:05 fu kernel: RSP: 0018:88007fc63c10  EFLAGS: 00010202
> Mär 29 11:53:05 fu kernel: RAX:  RBX: 880406ded000 RCX: 
> 880406ded068
> Mär 29 11:53:05 fu kernel: RDX:  RSI:  RDI: 
> 0246
> Mär 29 11:53:05 fu kernel: RBP: 88007fc63c28 R08:  R09: 
> 88040d803600
> Mär 29 11:53:05 fu kernel: R10:  R11: 0004 R12: 
> 
> Mär 29 11:53:05 fu kernel: R13: 880406ded080 R14: 880400607238 R15: 
> 880405e16f00
> Mär 29 11:53:05 fu kernel: FS:  7f0469f18700() 
> GS:88041e28() knlGS:
> Mär 29 11:53:05 fu kernel: CS:  0010 DS:  ES:  CR0: 80050033
> Mär 29 11:53:05 fu kernel: CR2:  CR3: d9926000 CR4: 
> 000407e0
> Mär 29 11:53:05 fu kernel: Stack:
> Mär 29 11:53:05 fu kernel:  880405c7fa00 880406ded000 
> 880406ded078 88007fc63c60
> Mär 29 11:53:05 fu kernel:  a01f90cc 880406ded348 
> 880400607238 880405e16f00
> Mär 29 11:53:05 fu kernel:  a01f9e80 880405e16f10 
> 88007fc63c98 811a843f
> Mär 29 11:53:05 fu kernel: Call Trace:
> Mär 29 11:53:05 fu kernel:  [] mousedev_open+0xcc/0x150 
> [mousedev]
> Mär 29 11:53:05 fu kernel:  [] chrdev_open+0x9f/0x1d0
> Mär 29 11:53:05 fu kernel:  [] do_dentry_open+0x1b7/0x2c0
> Mär 29 11:53:05 fu kernel:  [] ? 
> __inode_permission+0x41/0xb0
> Mär 29 11:53:05 fu kernel:  [] ? cdev_put+0x30/0x30
> Mär 29 11:53:05 fu kernel:  [] finish_open+0x31/0x40
> Mär 29 11:53:05 fu kernel:  [] do_last+0x572/0xe90
> Mär 29 11:53:05 fu kernel:  [] ? link_path_walk+0x236/0x8d0
> Mär 29 11:53:05 fu kernel:  [] ? unlock_page+0x23/0x30
> Mär 29 11:53:05 fu kernel:  [] path_openat+0xbb/0x6b0
> Mär 29 11:53:05 fu kernel:  [] ? handle_mm_fault+0x264/0xed0
> Mär 29 11:53:05 fu kernel:  [] do_filp_open+0x3a/0x90
> Mär 29 11:53:05 fu kernel:  [] ? __alloc_fd+0xa7/0x130
> Mär 29 11:53:05 fu kernel:  [] do_sys_open+0x124/0x220
> Mär 29 11:53:05 fu kernel:  [] SyS_open+0x1e/0x20
> Mär 29 11:53:05 fu kernel:  [] 
> system_call_fastpath+0x1a/0x1f
> Mär 29 11:53:05 fu kernel: Code: e0 05 32 e1 5b 44 89 e0 41 5c 41 5d 5d c3 66 
> 0f 1f 44 00 00 4c 89 ef 41 bc ed ff ff ff e8 c2 05 32 e1 eb e0 48 8b 15 c9 21 
> 00 00 <8b> 02 8d 48 01 85 c0 89 0a 75 c6 48 8b 05 37 1f 00 00 48 3d 60 
> Mär 29 11:53:05 fu kernel: RIP  [] 
> mousedev_open_device+0x77/0x100 [mousedev]
> Mär 29 11:53:05 fu kernel:  RSP 
> Mär 29 11:53:05 fu kernel: CR2: 
> Mär 29 11:53:05 fu kernel: ---[ end trace cea09d6c5d332dfc ]---
> 
> ---
> 
> I am on Archlinux, on a Thinkpad x220, if that matters. I will also
> write a message to the bugtracker as soon as my email addr gets
> verified.
> 
> Regards!
> 


-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpE4cRLboDVo.pgp
Description: PGP signature


Re: [BUG] 3.14-rc6 at mousedev_open_device+0x77/0x100

2014-03-29 Thread Matthias Beyer
rt x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm 
> crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel 
> aes_x86_64 lrw gf1
> 28mul glue_helper ablk_helper cryptd psmouse pcspkr i2c_i801 serio_raw 
> tpm_tis tpm i915 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm drm_kms_helper 
> mei_me snd_tim
> er e1000e drm nuvoton_cir mei snd rc_core shpchp intel_gtt ptp i2c_algo_bit 
> pps_core soundcore lpc_ich evdev microcode ath3k bluetooth 6lowpan_iphc 
> rfkill gspca_pa
> c7311 gspca_ov519 gspca_main videodev media i2c_core video acpi_power_meter 
> thermal processor pci chipreg mtd fan button battery acpi_pad acpi_ipmi 
> ipmi_msghandler
>  ext4 crc16 mbcache jbd2 usb_storage sd_mod crc_t10dif crct10dif_common atkbd 
> libps2 ahci libahci libata ehci_pci xhci_hcd ehci_hcd scsi_mod usbcore 
> usb_common i80
> 42 serio
> Mar 10 10:45:05 localhost kernel: [4.742722] CPU: 4 PID: 338 Comm: acpid 
> Not tainted 3.14.0-1-mainline #1
> Mar 10 10:45:05 localhost kernel: [4.742822] Hardware name: To Be Filled 
> By O.E.M. To Be Filled By O.E.M./Z87E-ITX, BIOS P2.30 12/06/2013
> Mar 10 10:45:05 localhost kernel: [4.742916] task: 8804170889e0 ti: 
> 8800c280 task.ti: 8800c280
> Mar 10 10:45:05 localhost kernel: [4.743013] RIP: 
> 0010:[]  [] 
> mousedev_open_device+0x77/0x100 [mousedev]
> Mar 10 10:45:05 localhost kernel: [4.743015] RSP: 0018:8800c2801c10  
> EFLAGS: 00010202
> Mar 10 10:45:05 localhost kernel: [4.743021] RAX:  RBX: 
> 880404650800 RCX: 880404650868
> Mar 10 10:45:05 localhost kernel: [4.743023] RDX:  RSI: 
>  RDI: 0246
> Mar 10 10:45:05 localhost kernel: [4.743024] RBP: 8800c2801c28 R08: 
>  R09: 88041e803600
> Mar 10 10:45:05 localhost kernel: [4.743025] R10:  R11: 
> 0004 R12: 
> Mar 10 10:45:05 localhost kernel: [4.743027] R13: 880404650880 R14: 
> 88040a78f778 R15: 880417744c00
> Mar 10 10:45:05 localhost kernel: [4.743029] FS:  7f93d2f6c700() 
> GS:88042f30() knlGS:
> Mar 10 10:45:05 localhost kernel: [4.743031] CS:  0010 DS:  ES:  
> CR0: 80050033
> Mar 10 10:45:05 localhost kernel: [4.743032] CR2:  CR3: 
> 000417542000 CR4: 001407e0
> Mar 10 10:45:05 localhost kernel: [4.743033] Stack:
> Mar 10 10:45:05 localhost kernel: [4.743038]  880412de1c00 
> 880404650800 880404650878 8800c2801c60
> Mar 10 10:45:05 localhost kernel: [4.743041]  a02ef0cc 
> 880404650b48 88040a78f778 880417744c00
> Mar 10 10:45:05 localhost kernel: [4.743045]  a02efe80 
> 880417744c10 8800c2801c98 811b5e2f
> Mar 10 10:45:05 localhost kernel: [4.743046] Call Trace:
> Mar 10 10:45:05 localhost kernel: [4.743054]  [] 
> mousedev_open+0xcc/0x150 [mousedev]
> Mar 10 10:45:05 localhost kernel: [4.743061]  [] 
> chrdev_open+0x9f/0x1d0
> Mar 10 10:45:05 localhost kernel: [4.743068]  [] 
> do_dentry_open+0x1b7/0x2c0
> Mar 10 10:45:05 localhost kernel: [4.743073]  [] ? 
> __inode_permission+0x41/0xb0
> Mar 10 10:45:05 localhost kernel: [4.743077]  [] ? 
> cdev_put+0x30/0x30
> Mar 10 10:45:05 localhost kernel: [4.743081]  [] 
> finish_open+0x31/0x40
> Mar 10 10:45:05 localhost kernel: [4.743086]  [] 
> do_last+0x572/0xe90
> Mar 10 10:45:05 localhost kernel: [4.743091]  [] ? 
> link_path_walk+0x236/0x8d0
> Mar 10 10:45:05 localhost kernel: [4.743097]  [] 
> path_openat+0xbb/0x6b0
> Mar 10 10:45:05 localhost kernel: [4.743102]  [] 
> do_filp_open+0x3a/0x90
> Mar 10 10:45:05 localhost kernel: [4.743106]  [] ? 
> __alloc_fd+0xa7/0x130
> Mar 10 10:45:05 localhost kernel: [4.743111]  [] 
> do_sys_open+0x124/0x220
> Mar 10 10:45:05 localhost kernel: [4.743116]  [] 
> SyS_open+0x1e/0x20
> Mar 10 10:45:05 localhost kernel: [4.743120]  [] 
> system_call_fastpath+0x1a/0x1f
> Mar 10 10:45:05 localhost kernel: [4.743151] Code: c0 f2 23 e1 5b 44 89 
> e0 41 5c 41 5d 5d c3 66 0f 1f 44 00 00 4c 89 ef 41 bc ed ff ff ff e8 a2 f2 23 
> e1 eb e0 
> 48 8b 15 c9 21 00 00 <8b> 02 8d 48 01 85 c0 89 0a 75 c6 48 8b 05 37 1f 00 00 
> 48 3d 60 
> Mar 10 10:45:05 localhost kernel: [4.743156] RIP  [] 
> mousedev_open_device+0x77/0x100 [mousedev]
> Mar 10 10:45:05 localhost kernel: [4.743157]  RSP 
> Mar 10 10:45:05 localhost kernel: [4.743158] CR2: 
> Mar 10 10:45:05 localhost kernel: [4.743200] ---[ end trace 
> 9ee5bcb02f264a08 ]---
> 
> The bug does not seem to hurt things much but...
>

Re: [BUG] 3.14-rc6 at mousedev_open_device+0x77/0x100

2014-03-29 Thread Matthias Beyer
: [4.743158] CR2: 
 Mar 10 10:45:05 localhost kernel: [4.743200] ---[ end trace 
 9ee5bcb02f264a08 ]---
 
 The bug does not seem to hurt things much but...
 
 TIA
 Ed Tomlinson
 
 
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpswSg4OOQWM.pgp
Description: PGP signature


Re: [BUG] 3.14-rc6 at mousedev_open_device+0x77/0x100

2014-03-29 Thread Matthias Beyer
Hi,

I want to add that my suspend is broken too. And I don't know if this has
any to do with the reported issues.

On 29-03-2014 12:15:35, Matthias Beyer wrote:
 Hi,
 
 I got this error with 3.13.7, which I just installed:
 
 ---
 
 Mär 29 11:53:05 fu kernel: BUG: unable to handle kernel NULL pointer 
 dereference at   (null)
 Mär 29 11:53:05 fu kernel: IP: [a01f8317] 
 mousedev_open_device+0x77/0x100 [mousedev]
 Mär 29 11:53:05 fu kernel: PGD 400853067 PUD 400852067 PMD 0 
 Mär 29 11:53:05 fu kernel: Oops:  [#1] PREEMPT SMP 
 Mär 29 11:53:05 fu kernel: Modules linked in: mousedev(+) btusb bluetooth 
 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm btrfs 
 iTCO_wdt iTCO_vendor_support snd_hda_codec_hdmi snd_hda_codec_conexant 
 raid6_pq libcrc32c xor nls_cp437 vfat fat arc4 iwldvm mac80211 microcode 
 evdev pcspkr psmouse se
 Mär 29 11:53:05 fu kernel:  crc32c_intel ghash_clmulni_intel aesni_intel 
 aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd ehci_pci sdhci_pci 
 ehci_hcd sdhci scsi_mod mmc_core usbcore usb_common i8042 serio
 Mär 29 11:53:05 fu kernel: CPU: 2 PID: 764 Comm: acpid Tainted: G   O 
 3.13.7-1-ARCH #1
 Mär 29 11:53:05 fu kernel: Hardware name: LENOVO 4290A11/4290A11, BIOS 
 8DET66WW (1.36 ) 10/22/2012
 Mär 29 11:53:05 fu kernel: task: 8804068c2400 ti: 88007fc62000 
 task.ti: 88007fc62000
 Mär 29 11:53:05 fu kernel: RIP: 0010:[a01f8317]  
 [a01f8317] mousedev_open_device+0x77/0x100 [mousedev]
 Mär 29 11:53:05 fu kernel: RSP: 0018:88007fc63c10  EFLAGS: 00010202
 Mär 29 11:53:05 fu kernel: RAX:  RBX: 880406ded000 RCX: 
 880406ded068
 Mär 29 11:53:05 fu kernel: RDX:  RSI:  RDI: 
 0246
 Mär 29 11:53:05 fu kernel: RBP: 88007fc63c28 R08:  R09: 
 88040d803600
 Mär 29 11:53:05 fu kernel: R10:  R11: 0004 R12: 
 
 Mär 29 11:53:05 fu kernel: R13: 880406ded080 R14: 880400607238 R15: 
 880405e16f00
 Mär 29 11:53:05 fu kernel: FS:  7f0469f18700() 
 GS:88041e28() knlGS:
 Mär 29 11:53:05 fu kernel: CS:  0010 DS:  ES:  CR0: 80050033
 Mär 29 11:53:05 fu kernel: CR2:  CR3: d9926000 CR4: 
 000407e0
 Mär 29 11:53:05 fu kernel: Stack:
 Mär 29 11:53:05 fu kernel:  880405c7fa00 880406ded000 
 880406ded078 88007fc63c60
 Mär 29 11:53:05 fu kernel:  a01f90cc 880406ded348 
 880400607238 880405e16f00
 Mär 29 11:53:05 fu kernel:  a01f9e80 880405e16f10 
 88007fc63c98 811a843f
 Mär 29 11:53:05 fu kernel: Call Trace:
 Mär 29 11:53:05 fu kernel:  [a01f90cc] mousedev_open+0xcc/0x150 
 [mousedev]
 Mär 29 11:53:05 fu kernel:  [811a843f] chrdev_open+0x9f/0x1d0
 Mär 29 11:53:05 fu kernel:  [811a1ad7] do_dentry_open+0x1b7/0x2c0
 Mär 29 11:53:05 fu kernel:  [811aeeb1] ? 
 __inode_permission+0x41/0xb0
 Mär 29 11:53:05 fu kernel:  [811a83a0] ? cdev_put+0x30/0x30
 Mär 29 11:53:05 fu kernel:  [811a1ef1] finish_open+0x31/0x40
 Mär 29 11:53:05 fu kernel:  [811b1ce2] do_last+0x572/0xe90
 Mär 29 11:53:05 fu kernel:  [811af1a6] ? link_path_walk+0x236/0x8d0
 Mär 29 11:53:05 fu kernel:  [81135cf3] ? unlock_page+0x23/0x30
 Mär 29 11:53:05 fu kernel:  [811b26bb] path_openat+0xbb/0x6b0
 Mär 29 11:53:05 fu kernel:  [81161084] ? handle_mm_fault+0x264/0xed0
 Mär 29 11:53:05 fu kernel:  [811b3dca] do_filp_open+0x3a/0x90
 Mär 29 11:53:05 fu kernel:  [811c0677] ? __alloc_fd+0xa7/0x130
 Mär 29 11:53:05 fu kernel:  [811a30c4] do_sys_open+0x124/0x220
 Mär 29 11:53:05 fu kernel:  [811a31de] SyS_open+0x1e/0x20
 Mär 29 11:53:05 fu kernel:  [81521b6d] 
 system_call_fastpath+0x1a/0x1f
 Mär 29 11:53:05 fu kernel: Code: e0 05 32 e1 5b 44 89 e0 41 5c 41 5d 5d c3 66 
 0f 1f 44 00 00 4c 89 ef 41 bc ed ff ff ff e8 c2 05 32 e1 eb e0 48 8b 15 c9 21 
 00 00 8b 02 8d 48 01 85 c0 89 0a 75 c6 48 8b 05 37 1f 00 00 48 3d 60 
 Mär 29 11:53:05 fu kernel: RIP  [a01f8317] 
 mousedev_open_device+0x77/0x100 [mousedev]
 Mär 29 11:53:05 fu kernel:  RSP 88007fc63c10
 Mär 29 11:53:05 fu kernel: CR2: 
 Mär 29 11:53:05 fu kernel: ---[ end trace cea09d6c5d332dfc ]---
 
 ---
 
 I am on Archlinux, on a Thinkpad x220, if that matters. I will also
 write a message to the bugtracker as soon as my email addr gets
 verified.
 
 Regards!
 


-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpE4cRLboDVo.pgp
Description: PGP signature


Re: How to test my patches for the (staging) android driver?

2013-12-03 Thread Matthias Beyer
Hi,

Greg-KHs email bot tells me to send this message to a ML. It suggests
to send it to this list or kernelnewb...@nl.linux.org, but the latter
results in a failure notice. So I send this email to this list.

On 03-12-2013 16:16:42, Matthias Beyer wrote:
> Hi,
> 
> First: I'm really new to the kernel in manner of submitting patches,
> testing etc. Please, if you send me guidelines or pointers on
> what to do, explain how to do things!
> 
> I'm working on some cleanup patches for code in drivers/staging/android/.
> These patches are cleanup patches as suggested in the appropriate TODO
> file, including fixes for checkpatch, but also function splitting as
> there are some really long functions (mainly in binder.c).
> 
> How to test my code beside compiling it? Do I even have a possibility
> to test it or should I just send it to you?
> 
> Besides: Which ML should I post this (and the patches) to? Main Kernel
> ML?
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.



-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpyBJMAk44xa.pgp
Description: PGP signature


Re: How to test my patches for the (staging) android driver?

2013-12-03 Thread Matthias Beyer
Hi,

Greg-KHs email bot tells me to send this message to a ML. It suggests
to send it to this list or kernelnewb...@nl.linux.org, but the latter
results in a failure notice. So I send this email to this list.

On 03-12-2013 16:16:42, Matthias Beyer wrote:
 Hi,
 
 First: I'm really new to the kernel in manner of submitting patches,
 testing etc. Please, if you send me guidelines or pointers on
 what to do, explain how to do things!
 
 I'm working on some cleanup patches for code in drivers/staging/android/.
 These patches are cleanup patches as suggested in the appropriate TODO
 file, including fixes for checkpatch, but also function splitting as
 there are some really long functions (mainly in binder.c).
 
 How to test my code beside compiling it? Do I even have a possibility
 to test it or should I just send it to you?
 
 Besides: Which ML should I post this (and the patches) to? Main Kernel
 ML?
 
 -- 
 Mit freundlichen Grüßen,
 Kind regards,
 Matthias Beyer
 
 Proudly sent with mutt.
 Happily signed with gnupg.



-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


pgpyBJMAk44xa.pgp
Description: PGP signature


[PATCH v2 1/5] drivers: usb: core: devio.c: Spaces to tabs for proc_reapurbnonblock()

2013-10-14 Thread Matthias Beyer
Replaced spaces by tabs for proc_reapurbnonblock() function.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71dc5d7..6a2e567 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1636,14 +1636,14 @@ static int proc_reapurbnonblock(struct dev_state *ps, 
void __user *arg)
 static int proc_control_compat(struct dev_state *ps,
struct usbdevfs_ctrltransfer32 __user *p32)
 {
-struct usbdevfs_ctrltransfer __user *p;
-__u32 udata;
-p = compat_alloc_user_space(sizeof(*p));
-if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
-get_user(udata, >data) ||
+   struct usbdevfs_ctrltransfer __user *p;
+   __u32 udata;
+   p = compat_alloc_user_space(sizeof(*p));
+   if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
+   get_user(udata, >data) ||
put_user(compat_ptr(udata), >data))
return -EFAULT;
-return proc_control(ps, p);
+   return proc_control(ps, p);
 }
 
 static int proc_bulk_compat(struct dev_state *ps,
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/5] drivers: usb: core: devio.c: Spaces to tabs for proc_control_compat()

2013-10-14 Thread Matthias Beyer
Replaced spaces by tabs for proc_control_compat() function.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 6a2e567..d15aa51 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1649,19 +1649,19 @@ static int proc_control_compat(struct dev_state *ps,
 static int proc_bulk_compat(struct dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
 {
-struct usbdevfs_bulktransfer __user *p;
-compat_uint_t n;
-compat_caddr_t addr;
+   struct usbdevfs_bulktransfer __user *p;
+   compat_uint_t n;
+   compat_caddr_t addr;
 
-p = compat_alloc_user_space(sizeof(*p));
+   p = compat_alloc_user_space(sizeof(*p));
 
-if (get_user(n, >ep) || put_user(n, >ep) ||
-get_user(n, >len) || put_user(n, >len) ||
-get_user(n, >timeout) || put_user(n, >timeout) ||
-get_user(addr, >data) || put_user(compat_ptr(addr), >data))
-return -EFAULT;
+   if (get_user(n, >ep) || put_user(n, >ep) ||
+   get_user(n, >len) || put_user(n, >len) ||
+   get_user(n, >timeout) || put_user(n, >timeout) ||
+   get_user(addr, >data) || put_user(compat_ptr(addr), >data))
+   return -EFAULT;
 
-return proc_bulk(ps, p);
+   return proc_bulk(ps, p);
 }
 static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg)
 {
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 5/5] drivers: usb: core: devio.c: Put arguments on new line

2013-10-14 Thread Matthias Beyer
To fit the 80-cols convention, this patch moves the arguments (the
second and third one) for driver->unlocked_ioctl() onto a new line.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 9761a27..0387948 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1870,7 +1870,8 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
if (driver == NULL || driver->unlocked_ioctl == NULL) {
retval = -ENOTTY;
} else {
-   retval = driver->unlocked_ioctl(intf, 
ctl->ioctl_code, buf);
+   retval = driver->unlocked_ioctl(intf,
+   ctl->ioctl_code, buf);
if (retval == -ENOIOCTLCMD)
retval = -ENOTTY;
}
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 4/5] drivers: usb: core: devio.c: Reindented switch-block

2013-10-14 Thread Matthias Beyer
Reindented the switch-block.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index dd8701b..9761a27 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1843,39 +1843,39 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
} else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
} else {
-   switch (ctl->ioctl_code) {
-
-   /* disconnect kernel driver from interface */
-   case USBDEVFS_DISCONNECT:
-   if (intf->dev.driver) {
-   driver = to_usb_driver(intf->dev.driver);
-   dev_dbg(>dev, "disconnect by usbfs\n");
-   usb_driver_release_interface(driver, intf);
-   } else
-   retval = -ENODATA;
-   break;
+   switch (ctl->ioctl_code) {
+
+   /* disconnect kernel driver from interface */
+   case USBDEVFS_DISCONNECT:
+   if (intf->dev.driver) {
+   driver = to_usb_driver(intf->dev.driver);
+   dev_dbg(>dev, "disconnect by usbfs\n");
+   usb_driver_release_interface(driver, intf);
+   } else
+   retval = -ENODATA;
+   break;
 
-   /* let kernel drivers try to (re)bind to the interface */
-   case USBDEVFS_CONNECT:
-   if (!intf->dev.driver)
-   retval = device_attach(>dev);
-   else
-   retval = -EBUSY;
-   break;
+   /* let kernel drivers try to (re)bind to the interface */
+   case USBDEVFS_CONNECT:
+   if (!intf->dev.driver)
+   retval = device_attach(>dev);
+   else
+   retval = -EBUSY;
+   break;
 
-   /* talk directly to the interface's driver */
-   default:
-   if (intf->dev.driver)
-   driver = to_usb_driver(intf->dev.driver);
-   if (driver == NULL || driver->unlocked_ioctl == NULL) {
-   retval = -ENOTTY;
-   } else {
-   retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, 
buf);
-   if (retval == -ENOIOCTLCMD)
+   /* talk directly to the interface's driver */
+   default:
+   if (intf->dev.driver)
+   driver = to_usb_driver(intf->dev.driver);
+   if (driver == NULL || driver->unlocked_ioctl == NULL) {
retval = -ENOTTY;
+   } else {
+   retval = driver->unlocked_ioctl(intf, 
ctl->ioctl_code, buf);
+   if (retval == -ENOIOCTLCMD)
+   retval = -ENOTTY;
+   }
}
}
-   }
 
/* cleanup and return */
if (retval >= 0
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 3/5] drivers: usb: core: devio.c: Braces around if-elseif-else

2013-10-14 Thread Matthias Beyer
This patch applies the rules for braces to the if-elseif-else statement
in proc_ioctl().

As the kernel styleguide says: If there is at least one multiline block
in a if-else branching, we should add braces around all blocks. This
includes braces around the switch-statement on the else branch, which
needs a reindent after adding the braces.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index d15aa51..dd8701b 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1222,7 +1222,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
return -ENOENT;
 
u = 0;
-   switch(uurb->type) {
+   switch (uurb->type) {
case USBDEVFS_URB_TYPE_CONTROL:
if (!usb_endpoint_xfer_control(>desc))
return -EINVAL;
@@ -1838,11 +1838,12 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
return -ENODEV;
}
 
-   if (ps->dev->state != USB_STATE_CONFIGURED)
+   if (ps->dev->state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno)))
+   } else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
-   else switch (ctl->ioctl_code) {
+   } else {
+   switch (ctl->ioctl_code) {
 
/* disconnect kernel driver from interface */
case USBDEVFS_DISCONNECT:
@@ -1874,6 +1875,7 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
retval = -ENOTTY;
}
}
+   }
 
/* cleanup and return */
if (retval >= 0
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 0/5] Coding style fixes

2013-10-14 Thread Matthias Beyer
Actually this is the third reroll of this patchseries, but I just figured out
how to place this "v2" thing in the patches... sorry for that!

As Greg KH requested: 

I splitted the coding style fixes into several patches. The replacing of spaces
by tabs in proc_reapurbnonblock() and proc_control_compat() is splitted into two
patches. As the patch for adding braces around the switch-block in here did not
apply (don't know why), this patch series resubmits it (also splitted).

Note: This patch series makes the remaining patches from the origin patch series
_obsolete_. So you have not to apply 5/6 and 6/6 from the origin patch series
(I would be confused if it still works)!

Btw: If you are stressed out by me sending coding style fixes, I wouldn't take
it wrong if you would redirect me to a submaintainer or so!

Best regards!

Matthias Beyer (5):
  drivers: usb: core: devio.c: Spaces to tabs for proc_reapurbnonblock()
  drivers: usb: core: devio.c: Spaces to tabs for proc_control_compat()
  drivers: usb: core: devio.c: Braces around if-elseif-else
  drivers: usb: core: devio.c: Reindented switch-block
  drivers: usb: core: devio.c: Put arguments on new line

 drivers/usb/core/devio.c | 95 +---
 1 file changed, 49 insertions(+), 46 deletions(-)

-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 0/5] Coding style fixes

2013-10-14 Thread Matthias Beyer
Actually this is the third reroll of this patchseries, but I just figured out
how to place this v2 thing in the patches... sorry for that!

As Greg KH requested: 

I splitted the coding style fixes into several patches. The replacing of spaces
by tabs in proc_reapurbnonblock() and proc_control_compat() is splitted into two
patches. As the patch for adding braces around the switch-block in here did not
apply (don't know why), this patch series resubmits it (also splitted).

Note: This patch series makes the remaining patches from the origin patch series
_obsolete_. So you have not to apply 5/6 and 6/6 from the origin patch series
(I would be confused if it still works)!

Btw: If you are stressed out by me sending coding style fixes, I wouldn't take
it wrong if you would redirect me to a submaintainer or so!

Best regards!

Matthias Beyer (5):
  drivers: usb: core: devio.c: Spaces to tabs for proc_reapurbnonblock()
  drivers: usb: core: devio.c: Spaces to tabs for proc_control_compat()
  drivers: usb: core: devio.c: Braces around if-elseif-else
  drivers: usb: core: devio.c: Reindented switch-block
  drivers: usb: core: devio.c: Put arguments on new line

 drivers/usb/core/devio.c | 95 +---
 1 file changed, 49 insertions(+), 46 deletions(-)

-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 3/5] drivers: usb: core: devio.c: Braces around if-elseif-else

2013-10-14 Thread Matthias Beyer
This patch applies the rules for braces to the if-elseif-else statement
in proc_ioctl().

As the kernel styleguide says: If there is at least one multiline block
in a if-else branching, we should add braces around all blocks. This
includes braces around the switch-statement on the else branch, which
needs a reindent after adding the braces.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index d15aa51..dd8701b 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1222,7 +1222,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
return -ENOENT;
 
u = 0;
-   switch(uurb-type) {
+   switch (uurb-type) {
case USBDEVFS_URB_TYPE_CONTROL:
if (!usb_endpoint_xfer_control(ep-desc))
return -EINVAL;
@@ -1838,11 +1838,12 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
return -ENODEV;
}
 
-   if (ps-dev-state != USB_STATE_CONFIGURED)
+   if (ps-dev-state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno)))
+   } else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
-   else switch (ctl-ioctl_code) {
+   } else {
+   switch (ctl-ioctl_code) {
 
/* disconnect kernel driver from interface */
case USBDEVFS_DISCONNECT:
@@ -1874,6 +1875,7 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
retval = -ENOTTY;
}
}
+   }
 
/* cleanup and return */
if (retval = 0
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 4/5] drivers: usb: core: devio.c: Reindented switch-block

2013-10-14 Thread Matthias Beyer
Reindented the switch-block.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index dd8701b..9761a27 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1843,39 +1843,39 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
} else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
} else {
-   switch (ctl-ioctl_code) {
-
-   /* disconnect kernel driver from interface */
-   case USBDEVFS_DISCONNECT:
-   if (intf-dev.driver) {
-   driver = to_usb_driver(intf-dev.driver);
-   dev_dbg(intf-dev, disconnect by usbfs\n);
-   usb_driver_release_interface(driver, intf);
-   } else
-   retval = -ENODATA;
-   break;
+   switch (ctl-ioctl_code) {
+
+   /* disconnect kernel driver from interface */
+   case USBDEVFS_DISCONNECT:
+   if (intf-dev.driver) {
+   driver = to_usb_driver(intf-dev.driver);
+   dev_dbg(intf-dev, disconnect by usbfs\n);
+   usb_driver_release_interface(driver, intf);
+   } else
+   retval = -ENODATA;
+   break;
 
-   /* let kernel drivers try to (re)bind to the interface */
-   case USBDEVFS_CONNECT:
-   if (!intf-dev.driver)
-   retval = device_attach(intf-dev);
-   else
-   retval = -EBUSY;
-   break;
+   /* let kernel drivers try to (re)bind to the interface */
+   case USBDEVFS_CONNECT:
+   if (!intf-dev.driver)
+   retval = device_attach(intf-dev);
+   else
+   retval = -EBUSY;
+   break;
 
-   /* talk directly to the interface's driver */
-   default:
-   if (intf-dev.driver)
-   driver = to_usb_driver(intf-dev.driver);
-   if (driver == NULL || driver-unlocked_ioctl == NULL) {
-   retval = -ENOTTY;
-   } else {
-   retval = driver-unlocked_ioctl(intf, ctl-ioctl_code, 
buf);
-   if (retval == -ENOIOCTLCMD)
+   /* talk directly to the interface's driver */
+   default:
+   if (intf-dev.driver)
+   driver = to_usb_driver(intf-dev.driver);
+   if (driver == NULL || driver-unlocked_ioctl == NULL) {
retval = -ENOTTY;
+   } else {
+   retval = driver-unlocked_ioctl(intf, 
ctl-ioctl_code, buf);
+   if (retval == -ENOIOCTLCMD)
+   retval = -ENOTTY;
+   }
}
}
-   }
 
/* cleanup and return */
if (retval = 0
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/5] drivers: usb: core: devio.c: Spaces to tabs for proc_control_compat()

2013-10-14 Thread Matthias Beyer
Replaced spaces by tabs for proc_control_compat() function.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 6a2e567..d15aa51 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1649,19 +1649,19 @@ static int proc_control_compat(struct dev_state *ps,
 static int proc_bulk_compat(struct dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
 {
-struct usbdevfs_bulktransfer __user *p;
-compat_uint_t n;
-compat_caddr_t addr;
+   struct usbdevfs_bulktransfer __user *p;
+   compat_uint_t n;
+   compat_caddr_t addr;
 
-p = compat_alloc_user_space(sizeof(*p));
+   p = compat_alloc_user_space(sizeof(*p));
 
-if (get_user(n, p32-ep) || put_user(n, p-ep) ||
-get_user(n, p32-len) || put_user(n, p-len) ||
-get_user(n, p32-timeout) || put_user(n, p-timeout) ||
-get_user(addr, p32-data) || put_user(compat_ptr(addr), p-data))
-return -EFAULT;
+   if (get_user(n, p32-ep) || put_user(n, p-ep) ||
+   get_user(n, p32-len) || put_user(n, p-len) ||
+   get_user(n, p32-timeout) || put_user(n, p-timeout) ||
+   get_user(addr, p32-data) || put_user(compat_ptr(addr), p-data))
+   return -EFAULT;
 
-return proc_bulk(ps, p);
+   return proc_bulk(ps, p);
 }
 static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg)
 {
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 5/5] drivers: usb: core: devio.c: Put arguments on new line

2013-10-14 Thread Matthias Beyer
To fit the 80-cols convention, this patch moves the arguments (the
second and third one) for driver-unlocked_ioctl() onto a new line.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 9761a27..0387948 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1870,7 +1870,8 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
if (driver == NULL || driver-unlocked_ioctl == NULL) {
retval = -ENOTTY;
} else {
-   retval = driver-unlocked_ioctl(intf, 
ctl-ioctl_code, buf);
+   retval = driver-unlocked_ioctl(intf,
+   ctl-ioctl_code, buf);
if (retval == -ENOIOCTLCMD)
retval = -ENOTTY;
}
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 1/5] drivers: usb: core: devio.c: Spaces to tabs for proc_reapurbnonblock()

2013-10-14 Thread Matthias Beyer
Replaced spaces by tabs for proc_reapurbnonblock() function.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71dc5d7..6a2e567 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1636,14 +1636,14 @@ static int proc_reapurbnonblock(struct dev_state *ps, 
void __user *arg)
 static int proc_control_compat(struct dev_state *ps,
struct usbdevfs_ctrltransfer32 __user *p32)
 {
-struct usbdevfs_ctrltransfer __user *p;
-__u32 udata;
-p = compat_alloc_user_space(sizeof(*p));
-if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
-get_user(udata, p32-data) ||
+   struct usbdevfs_ctrltransfer __user *p;
+   __u32 udata;
+   p = compat_alloc_user_space(sizeof(*p));
+   if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
+   get_user(udata, p32-data) ||
put_user(compat_ptr(udata), p-data))
return -EFAULT;
-return proc_control(ps, p);
+   return proc_control(ps, p);
 }
 
 static int proc_bulk_compat(struct dev_state *ps,
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers: usb: core: devio.c: Braces around switch (updated)

2013-10-12 Thread Matthias Beyer
Added braces around switch statement as the styleguide tells us.
Indented the switch-block for it and split a function call
(driver->unlocked_ioctl() on line 1876) arguments to several lines to
fit the 80-column convention.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 63 +---
 1 file changed, 33 insertions(+), 30 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 5f8a40d..adbdea3 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1840,40 +1840,43 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
 
if (ps->dev->state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   }
-   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
+   } else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
-   }
-   else switch (ctl->ioctl_code) {
-
-   /* disconnect kernel driver from interface */
-   case USBDEVFS_DISCONNECT:
-   if (intf->dev.driver) {
-   driver = to_usb_driver(intf->dev.driver);
-   dev_dbg(>dev, "disconnect by usbfs\n");
-   usb_driver_release_interface(driver, intf);
-   } else
-   retval = -ENODATA;
-   break;
+   } else {
+   switch (ctl->ioctl_code) {
+
+   /* disconnect kernel driver from interface */
+   case USBDEVFS_DISCONNECT:
+   if (intf->dev.driver) {
+   driver = to_usb_driver(intf->dev.driver);
+   dev_dbg(>dev, "disconnect by usbfs\n");
+   usb_driver_release_interface(driver, intf);
+   } else {
+   retval = -ENODATA;
+   }
+   break;
 
-   /* let kernel drivers try to (re)bind to the interface */
-   case USBDEVFS_CONNECT:
-   if (!intf->dev.driver)
-   retval = device_attach(>dev);
-   else
-   retval = -EBUSY;
-   break;
+   /* let kernel drivers try to (re)bind to the interface */
+   case USBDEVFS_CONNECT:
+   if (!intf->dev.driver)
+   retval = device_attach(>dev);
+   else
+   retval = -EBUSY;
+   break;
 
-   /* talk directly to the interface's driver */
-   default:
-   if (intf->dev.driver)
-   driver = to_usb_driver(intf->dev.driver);
-   if (driver == NULL || driver->unlocked_ioctl == NULL) {
-   retval = -ENOTTY;
-   } else {
-   retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, 
buf);
-   if (retval == -ENOIOCTLCMD)
+   /* talk directly to the interface's driver */
+   default:
+   if (intf->dev.driver)
+   driver = to_usb_driver(intf->dev.driver);
+   if (driver == NULL || driver->unlocked_ioctl == NULL) {
retval = -ENOTTY;
+   } else {
+   retval = driver->unlocked_ioctl(intf,
+   ctl->ioctl_code,
+   buf);
+   if (retval == -ENOIOCTLCMD)
+   retval = -ENOTTY;
+   }
}
}
 
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers: usb: core: devio.c: Coding style fixes

2013-10-12 Thread Matthias Beyer
Whitespace fixes, including:

- Whitespace after if-keyword
- Spaces to Tabs

Other coding style fixes:

- Added braces for if-else blocks where missing

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 40 +---
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71dc5d7..5f8a40d 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1222,7 +1222,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
return -ENOENT;
 
u = 0;
-   switch(uurb->type) {
+   switch (uurb->type) {
case USBDEVFS_URB_TYPE_CONTROL:
if (!usb_endpoint_xfer_control(>desc))
return -EINVAL;
@@ -1636,32 +1636,32 @@ static int proc_reapurbnonblock(struct dev_state *ps, 
void __user *arg)
 static int proc_control_compat(struct dev_state *ps,
struct usbdevfs_ctrltransfer32 __user *p32)
 {
-struct usbdevfs_ctrltransfer __user *p;
-__u32 udata;
-p = compat_alloc_user_space(sizeof(*p));
-if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
-get_user(udata, >data) ||
+   struct usbdevfs_ctrltransfer __user *p;
+   __u32 udata;
+   p = compat_alloc_user_space(sizeof(*p));
+   if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
+   get_user(udata, >data) ||
put_user(compat_ptr(udata), >data))
return -EFAULT;
-return proc_control(ps, p);
+   return proc_control(ps, p);
 }
 
 static int proc_bulk_compat(struct dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
 {
-struct usbdevfs_bulktransfer __user *p;
-compat_uint_t n;
-compat_caddr_t addr;
+   struct usbdevfs_bulktransfer __user *p;
+   compat_uint_t n;
+   compat_caddr_t addr;
 
-p = compat_alloc_user_space(sizeof(*p));
+   p = compat_alloc_user_space(sizeof(*p));
 
-if (get_user(n, >ep) || put_user(n, >ep) ||
-get_user(n, >len) || put_user(n, >len) ||
-get_user(n, >timeout) || put_user(n, >timeout) ||
-get_user(addr, >data) || put_user(compat_ptr(addr), >data))
-return -EFAULT;
+   if (get_user(n, >ep) || put_user(n, >ep) ||
+   get_user(n, >len) || put_user(n, >len) ||
+   get_user(n, >timeout) || put_user(n, >timeout) ||
+   get_user(addr, >data) || put_user(compat_ptr(addr), >data))
+   return -EFAULT;
 
-return proc_bulk(ps, p);
+   return proc_bulk(ps, p);
 }
 static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg)
 {
@@ -1838,10 +1838,12 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
return -ENODEV;
}
 
-   if (ps->dev->state != USB_STATE_CONFIGURED)
+   if (ps->dev->state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno)))
+   }
+   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
+   }
else switch (ctl->ioctl_code) {
 
/* disconnect kernel driver from interface */
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers: usb: core: devio.c: Coding style fixes

2013-10-12 Thread Matthias Beyer
Whitespace fixes, including:

- Whitespace after if-keyword
- Spaces to Tabs

Other coding style fixes:

- Added braces for if-else blocks where missing

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 40 +---
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71dc5d7..5f8a40d 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1222,7 +1222,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
return -ENOENT;
 
u = 0;
-   switch(uurb-type) {
+   switch (uurb-type) {
case USBDEVFS_URB_TYPE_CONTROL:
if (!usb_endpoint_xfer_control(ep-desc))
return -EINVAL;
@@ -1636,32 +1636,32 @@ static int proc_reapurbnonblock(struct dev_state *ps, 
void __user *arg)
 static int proc_control_compat(struct dev_state *ps,
struct usbdevfs_ctrltransfer32 __user *p32)
 {
-struct usbdevfs_ctrltransfer __user *p;
-__u32 udata;
-p = compat_alloc_user_space(sizeof(*p));
-if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
-get_user(udata, p32-data) ||
+   struct usbdevfs_ctrltransfer __user *p;
+   __u32 udata;
+   p = compat_alloc_user_space(sizeof(*p));
+   if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
+   get_user(udata, p32-data) ||
put_user(compat_ptr(udata), p-data))
return -EFAULT;
-return proc_control(ps, p);
+   return proc_control(ps, p);
 }
 
 static int proc_bulk_compat(struct dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
 {
-struct usbdevfs_bulktransfer __user *p;
-compat_uint_t n;
-compat_caddr_t addr;
+   struct usbdevfs_bulktransfer __user *p;
+   compat_uint_t n;
+   compat_caddr_t addr;
 
-p = compat_alloc_user_space(sizeof(*p));
+   p = compat_alloc_user_space(sizeof(*p));
 
-if (get_user(n, p32-ep) || put_user(n, p-ep) ||
-get_user(n, p32-len) || put_user(n, p-len) ||
-get_user(n, p32-timeout) || put_user(n, p-timeout) ||
-get_user(addr, p32-data) || put_user(compat_ptr(addr), p-data))
-return -EFAULT;
+   if (get_user(n, p32-ep) || put_user(n, p-ep) ||
+   get_user(n, p32-len) || put_user(n, p-len) ||
+   get_user(n, p32-timeout) || put_user(n, p-timeout) ||
+   get_user(addr, p32-data) || put_user(compat_ptr(addr), p-data))
+   return -EFAULT;
 
-return proc_bulk(ps, p);
+   return proc_bulk(ps, p);
 }
 static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg)
 {
@@ -1838,10 +1838,12 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
return -ENODEV;
}
 
-   if (ps-dev-state != USB_STATE_CONFIGURED)
+   if (ps-dev-state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno)))
+   }
+   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
+   }
else switch (ctl-ioctl_code) {
 
/* disconnect kernel driver from interface */
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers: usb: core: devio.c: Braces around switch (updated)

2013-10-12 Thread Matthias Beyer
Added braces around switch statement as the styleguide tells us.
Indented the switch-block for it and split a function call
(driver-unlocked_ioctl() on line 1876) arguments to several lines to
fit the 80-column convention.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 63 +---
 1 file changed, 33 insertions(+), 30 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 5f8a40d..adbdea3 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1840,40 +1840,43 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
 
if (ps-dev-state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   }
-   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
+   } else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
-   }
-   else switch (ctl-ioctl_code) {
-
-   /* disconnect kernel driver from interface */
-   case USBDEVFS_DISCONNECT:
-   if (intf-dev.driver) {
-   driver = to_usb_driver(intf-dev.driver);
-   dev_dbg(intf-dev, disconnect by usbfs\n);
-   usb_driver_release_interface(driver, intf);
-   } else
-   retval = -ENODATA;
-   break;
+   } else {
+   switch (ctl-ioctl_code) {
+
+   /* disconnect kernel driver from interface */
+   case USBDEVFS_DISCONNECT:
+   if (intf-dev.driver) {
+   driver = to_usb_driver(intf-dev.driver);
+   dev_dbg(intf-dev, disconnect by usbfs\n);
+   usb_driver_release_interface(driver, intf);
+   } else {
+   retval = -ENODATA;
+   }
+   break;
 
-   /* let kernel drivers try to (re)bind to the interface */
-   case USBDEVFS_CONNECT:
-   if (!intf-dev.driver)
-   retval = device_attach(intf-dev);
-   else
-   retval = -EBUSY;
-   break;
+   /* let kernel drivers try to (re)bind to the interface */
+   case USBDEVFS_CONNECT:
+   if (!intf-dev.driver)
+   retval = device_attach(intf-dev);
+   else
+   retval = -EBUSY;
+   break;
 
-   /* talk directly to the interface's driver */
-   default:
-   if (intf-dev.driver)
-   driver = to_usb_driver(intf-dev.driver);
-   if (driver == NULL || driver-unlocked_ioctl == NULL) {
-   retval = -ENOTTY;
-   } else {
-   retval = driver-unlocked_ioctl(intf, ctl-ioctl_code, 
buf);
-   if (retval == -ENOIOCTLCMD)
+   /* talk directly to the interface's driver */
+   default:
+   if (intf-dev.driver)
+   driver = to_usb_driver(intf-dev.driver);
+   if (driver == NULL || driver-unlocked_ioctl == NULL) {
retval = -ENOTTY;
+   } else {
+   retval = driver-unlocked_ioctl(intf,
+   ctl-ioctl_code,
+   buf);
+   if (retval == -ENOIOCTLCMD)
+   retval = -ENOTTY;
+   }
}
}
 
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] drivers: usb: core: devio.c: Coding style fixes

2013-10-10 Thread Matthias Beyer
Whitespace fixes, including:

- Whitespace after if-keyword
- Spaces to Tabs

Other coding style fixes:

- Added braces for if-else blocks where missing

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 39 ---
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71dc5d7..8aca6b93 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1222,7 +1222,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
return -ENOENT;
 
u = 0;
-   switch(uurb->type) {
+   switch (uurb->type) {
case USBDEVFS_URB_TYPE_CONTROL:
if (!usb_endpoint_xfer_control(>desc))
return -EINVAL;
@@ -1636,32 +1636,32 @@ static int proc_reapurbnonblock(struct dev_state *ps, 
void __user *arg)
 static int proc_control_compat(struct dev_state *ps,
struct usbdevfs_ctrltransfer32 __user *p32)
 {
-struct usbdevfs_ctrltransfer __user *p;
-__u32 udata;
-p = compat_alloc_user_space(sizeof(*p));
-if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
-get_user(udata, >data) ||
+   struct usbdevfs_ctrltransfer __user *p;
+   __u32 udata;
+   p = compat_alloc_user_space(sizeof(*p));
+   if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
+   get_user(udata, >data) ||
put_user(compat_ptr(udata), >data))
return -EFAULT;
-return proc_control(ps, p);
+   return proc_control(ps, p);
 }
 
 static int proc_bulk_compat(struct dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
 {
-struct usbdevfs_bulktransfer __user *p;
-compat_uint_t n;
-compat_caddr_t addr;
+   struct usbdevfs_bulktransfer __user *p;
+   compat_uint_t n;
+   compat_caddr_t addr;
 
-p = compat_alloc_user_space(sizeof(*p));
+   p = compat_alloc_user_space(sizeof(*p));
 
-if (get_user(n, >ep) || put_user(n, >ep) ||
-get_user(n, >len) || put_user(n, >len) ||
-get_user(n, >timeout) || put_user(n, >timeout) ||
-get_user(addr, >data) || put_user(compat_ptr(addr), >data))
-return -EFAULT;
+   if (get_user(n, >ep) || put_user(n, >ep) ||
+   get_user(n, >len) || put_user(n, >len) ||
+   get_user(n, >timeout) || put_user(n, >timeout) ||
+   get_user(addr, >data) || put_user(compat_ptr(addr), >data))
+   return -EFAULT;
 
-return proc_bulk(ps, p);
+   return proc_bulk(ps, p);
 }
 static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg)
 {
@@ -1838,9 +1838,10 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
return -ENODEV;
}
 
-   if (ps->dev->state != USB_STATE_CONFIGURED)
+   if (ps->dev->state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno)))
+   }
+   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
else switch (ctl->ioctl_code) {
 
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6] drivers: usb: core: file.c: moved asterisk to variable name

2013-10-10 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 903c7ef..3bdfbf8 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -27,7 +27,7 @@
 static const struct file_operations *usb_minors[MAX_USB_MINORS];
 static DECLARE_RWSEM(minor_rwsem);
 
-static int usb_open(struct inode * inode, struct file * file)
+static int usb_open(struct inode *inode, struct file *file)
 {
int minor = iminor(inode);
const struct file_operations *c;
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] drivers: usb: core: devio.c: Braces around switch

2013-10-10 Thread Matthias Beyer
Added braces around switch statement as the styleguide tells us.
Indented the switch-block for it and split a function call
(driver->unlocked_ioctl() on line 1876) arguments to several lines to
fit the 80-column convention.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 60 ++--
 1 file changed, 33 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 8aca6b93..215d882 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1843,36 +1843,42 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
}
else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
-   else switch (ctl->ioctl_code) {
-
-   /* disconnect kernel driver from interface */
-   case USBDEVFS_DISCONNECT:
-   if (intf->dev.driver) {
-   driver = to_usb_driver(intf->dev.driver);
-   dev_dbg(>dev, "disconnect by usbfs\n");
-   usb_driver_release_interface(driver, intf);
-   } else
-   retval = -ENODATA;
-   break;
+   }
+   else {
+   switch (ctl->ioctl_code) {
+
+   /* disconnect kernel driver from interface */
+   case USBDEVFS_DISCONNECT:
+   if (intf->dev.driver) {
+   driver = to_usb_driver(intf->dev.driver);
+   dev_dbg(>dev, "disconnect by usbfs\n");
+   usb_driver_release_interface(driver, intf);
+   } else {
+   retval = -ENODATA;
+   }
+   break;
 
-   /* let kernel drivers try to (re)bind to the interface */
-   case USBDEVFS_CONNECT:
-   if (!intf->dev.driver)
-   retval = device_attach(>dev);
-   else
-   retval = -EBUSY;
-   break;
+   /* let kernel drivers try to (re)bind to the interface */
+   case USBDEVFS_CONNECT:
+   if (!intf->dev.driver)
+   retval = device_attach(>dev);
+   else
+   retval = -EBUSY;
+   break;
 
-   /* talk directly to the interface's driver */
-   default:
-   if (intf->dev.driver)
-   driver = to_usb_driver(intf->dev.driver);
-   if (driver == NULL || driver->unlocked_ioctl == NULL) {
-   retval = -ENOTTY;
-   } else {
-   retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, 
buf);
-   if (retval == -ENOIOCTLCMD)
+   /* talk directly to the interface's driver */
+   default:
+   if (intf->dev.driver)
+   driver = to_usb_driver(intf->dev.driver);
+   if (driver == NULL || driver->unlocked_ioctl == NULL) {
retval = -ENOTTY;
+   } else {
+   retval = driver->unlocked_ioctl(intf,
+   ctl->ioctl_code,
+   buf);
+   if (retval == -ENOIOCTLCMD)
+   retval = -ENOTTY;
+   }
}
}
 
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6] drivers: usb: core: devio.c: Else should be on closing braces

2013-10-10 Thread Matthias Beyer
moved else keyword of if-else construct to closing braces.

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/devio.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 215d882..adbdea3 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1840,11 +1840,9 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
 
if (ps->dev->state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   }
-   else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
+   } else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno))) {
retval = -EINVAL;
-   }
-   else {
+   } else {
switch (ctl->ioctl_code) {
 
/* disconnect kernel driver from interface */
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6] drivers: usb: core: hub.c: Comments shouldnt be C99 // comment style

2013-10-10 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/hub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e5fdf4b..5e9fc21 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2488,7 +2488,7 @@ error_device_descriptor:
usb_autosuspend_device(usb_dev);
 error_autoresume:
 out_authorized:
-   usb_unlock_device(usb_dev); // complements locktree
+   usb_unlock_device(usb_dev); /* complements locktree */
return result;
 }
 
@@ -3210,7 +3210,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t 
msg)
if (status == 0 && !port_is_suspended(hub, portstatus))
goto SuspendCleared;
 
-   // dev_dbg(hub->intfdev, "resume port %d\n", port1);
+   /* dev_dbg(hub->intfdev, "resume port %d\n", port1); */
 
set_bit(port1, hub->busy_bits);
 
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/6] drivers: usb: core: Adapt source to styleguide

2013-10-10 Thread Matthias Beyer
Hi,

I patches several files in drivers/usb/core/ to adapt them to the kernel
styleguide.

Most of these patches are whitespace/indention fixes.

As these patches are only style-patches, I just compiled the kernel, no compile
errors or warnings. So I think everything seems to be okay!

Note: I did not fix all ERROR messages from the scripts/checkpatch.pl script, as
I don't know what to do with "do not use assignments in if-condition" messages.

Matthias Beyer (6):
  drivers: usb: core: {file,hub,sysfs,usb}.c: Whitespace fixes
  drivers: usb: core: file.c: moved asterisk to variable name
  drivers: usb: core: hub.c: Comments shouldnt be C99 // comment style
  drivers: usb: core: devio.c: Coding style fixes
  drivers: usb: core: devio.c: Braces around switch
  drivers: usb: core: devio.c: Else should be on closing braces

 drivers/usb/core/devio.c |  97 ---
 drivers/usb/core/file.c  |   8 ++--
 drivers/usb/core/hub.c   | 115 +++
 drivers/usb/core/sysfs.c |   5 ++-
 drivers/usb/core/usb.c   |   2 +-
 5 files changed, 116 insertions(+), 111 deletions(-)

-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6] drivers: usb: core: {file,hub,sysfs,usb}.c: Whitespace fixes

2013-10-10 Thread Matthias Beyer
including:

- removing of trailing whitespace
- removing spaces before array indexing (foo [] to foo[])
- reindention of a switch-case block
- spaces to tabs

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/file.c  |   6 +--
 drivers/usb/core/hub.c   | 111 +++
 drivers/usb/core/sysfs.c |   5 ++-
 drivers/usb/core/usb.c   |   2 +-
 4 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 7421888..903c7ef 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -8,7 +8,7 @@
  * (C) Copyright Deti Fliegl 1999 (new USB architecture)
  * (C) Copyright Randy Dunlap 2000
  * (C) Copyright David Brownell 2000-2001 (kernel hotplug, usb_device_id,
-   more docs, etc)
+ * more docs, etc)
  * (C) Copyright Yggdrasil Computing, Inc. 2000
  * (usb_device_id matching changes by Adam J. Richter)
  * (C) Copyright Greg Kroah-Hartman 2002-2003
@@ -44,7 +44,7 @@ static int usb_open(struct inode * inode, struct file * file)
file->f_op = new_fops;
/* Curiouser and curiouser... NULL ->open() as "no device" ? */
if (file->f_op->open)
-   err = file->f_op->open(inode,file);
+   err = file->f_op->open(inode, file);
if (err) {
fops_put(file->f_op);
file->f_op = fops_get(old_fops);
@@ -166,7 +166,7 @@ int usb_register_dev(struct usb_interface *intf,
char *temp;
 
 #ifdef CONFIG_USB_DYNAMIC_MINORS
-   /* 
+   /*
 * We don't care what the device tries to start at, we want to start
 * at zero to pack the devices into the smallest available space with
 * no holes in the minor range.
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e6b682c..e5fdf4b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -120,7 +120,7 @@ static inline char *portspeed(struct usb_hub *hub, int 
portstatus)
if (hub_is_superspeed(hub->hdev))
return "5.0 Gb/s";
if (portstatus & USB_PORT_STAT_HIGH_SPEED)
-   return "480 Mb/s";
+   return "480 Mb/s";
else if (portstatus & USB_PORT_STAT_LOW_SPEED)
return "1.5 Mb/s";
else
@@ -857,7 +857,7 @@ static int hub_hub_status(struct usb_hub *hub,
"%s failed (err = %d)\n", __func__, ret);
} else {
*status = le16_to_cpu(hub->status->hub.wHubStatus);
-   *change = le16_to_cpu(hub->status->hub.wHubChange); 
+   *change = le16_to_cpu(hub->status->hub.wHubChange);
ret = 0;
}
mutex_unlock(>status_mutex);
@@ -956,7 +956,7 @@ static void hub_port_logical_disconnect(struct usb_hub 
*hub, int port1)
 */
 
set_bit(port1, hub->change_bits);
-   kick_khubd(hub);
+   kick_khubd(hub);
 }
 
 /**
@@ -1361,7 +1361,7 @@ static int hub_configure(struct usb_hub *hub,
if ((wHubCharacteristics & HUB_CHAR_COMPOUND) &&
!(hub_is_superspeed(hdev))) {
int i;
-   charportstr [USB_MAXCHILDREN + 1];
+   charportstr[USB_MAXCHILDREN + 1];
 
for (i = 0; i < hdev->maxchild; i++)
portstr[i] = hub->descriptor->u.hs.DeviceRemovable
@@ -1429,32 +1429,32 @@ static int hub_configure(struct usb_hub *hub,
 
/* Note 8 FS bit times == (8 bits / 1200 bps) ~= 666ns */
switch (wHubCharacteristics & HUB_CHAR_) {
-   case HUB__8_BITS:
-   if (hdev->descriptor.bDeviceProtocol != 0) {
-   hub->tt.think_time = 666;
-   dev_dbg(hub_dev, "TT requires at most %d "
-   "FS bit times (%d ns)\n",
-   8, hub->tt.think_time);
-   }
-   break;
-   case HUB__16_BITS:
-   hub->tt.think_time = 666 * 2;
-   dev_dbg(hub_dev, "TT requires at most %d "
-   "FS bit times (%d ns)\n",
-   16, hub->tt.think_time);
-   break;
-   case HUB__24_BITS:
-   hub->tt.think_time = 666 * 3;
-   dev_dbg(hub_dev, "TT requires at most %d "
-   "FS bit times (%d ns)\n",
-   24, hub->tt.think_time);
-   break;
-   case HUB__32_BITS:
-   hub->tt.think_time = 666 * 4;
+   case HUB__8_BITS:
+   

[PATCH 0/6] drivers: usb: core: Adapt source to styleguide

2013-10-10 Thread Matthias Beyer
Hi,

I patches several files in drivers/usb/core/ to adapt them to the kernel
styleguide.

Most of these patches are whitespace/indention fixes.

As these patches are only style-patches, I just compiled the kernel, no compile
errors or warnings. So I think everything seems to be okay!

Note: I did not fix all ERROR messages from the scripts/checkpatch.pl script, as
I don't know what to do with do not use assignments in if-condition messages.

Matthias Beyer (6):
  drivers: usb: core: {file,hub,sysfs,usb}.c: Whitespace fixes
  drivers: usb: core: file.c: moved asterisk to variable name
  drivers: usb: core: hub.c: Comments shouldnt be C99 // comment style
  drivers: usb: core: devio.c: Coding style fixes
  drivers: usb: core: devio.c: Braces around switch
  drivers: usb: core: devio.c: Else should be on closing braces

 drivers/usb/core/devio.c |  97 ---
 drivers/usb/core/file.c  |   8 ++--
 drivers/usb/core/hub.c   | 115 +++
 drivers/usb/core/sysfs.c |   5 ++-
 drivers/usb/core/usb.c   |   2 +-
 5 files changed, 116 insertions(+), 111 deletions(-)

-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6] drivers: usb: core: {file,hub,sysfs,usb}.c: Whitespace fixes

2013-10-10 Thread Matthias Beyer
including:

- removing of trailing whitespace
- removing spaces before array indexing (foo [] to foo[])
- reindention of a switch-case block
- spaces to tabs

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/file.c  |   6 +--
 drivers/usb/core/hub.c   | 111 +++
 drivers/usb/core/sysfs.c |   5 ++-
 drivers/usb/core/usb.c   |   2 +-
 4 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 7421888..903c7ef 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -8,7 +8,7 @@
  * (C) Copyright Deti Fliegl 1999 (new USB architecture)
  * (C) Copyright Randy Dunlap 2000
  * (C) Copyright David Brownell 2000-2001 (kernel hotplug, usb_device_id,
-   more docs, etc)
+ * more docs, etc)
  * (C) Copyright Yggdrasil Computing, Inc. 2000
  * (usb_device_id matching changes by Adam J. Richter)
  * (C) Copyright Greg Kroah-Hartman 2002-2003
@@ -44,7 +44,7 @@ static int usb_open(struct inode * inode, struct file * file)
file-f_op = new_fops;
/* Curiouser and curiouser... NULL -open() as no device ? */
if (file-f_op-open)
-   err = file-f_op-open(inode,file);
+   err = file-f_op-open(inode, file);
if (err) {
fops_put(file-f_op);
file-f_op = fops_get(old_fops);
@@ -166,7 +166,7 @@ int usb_register_dev(struct usb_interface *intf,
char *temp;
 
 #ifdef CONFIG_USB_DYNAMIC_MINORS
-   /* 
+   /*
 * We don't care what the device tries to start at, we want to start
 * at zero to pack the devices into the smallest available space with
 * no holes in the minor range.
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e6b682c..e5fdf4b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -120,7 +120,7 @@ static inline char *portspeed(struct usb_hub *hub, int 
portstatus)
if (hub_is_superspeed(hub-hdev))
return 5.0 Gb/s;
if (portstatus  USB_PORT_STAT_HIGH_SPEED)
-   return 480 Mb/s;
+   return 480 Mb/s;
else if (portstatus  USB_PORT_STAT_LOW_SPEED)
return 1.5 Mb/s;
else
@@ -857,7 +857,7 @@ static int hub_hub_status(struct usb_hub *hub,
%s failed (err = %d)\n, __func__, ret);
} else {
*status = le16_to_cpu(hub-status-hub.wHubStatus);
-   *change = le16_to_cpu(hub-status-hub.wHubChange); 
+   *change = le16_to_cpu(hub-status-hub.wHubChange);
ret = 0;
}
mutex_unlock(hub-status_mutex);
@@ -956,7 +956,7 @@ static void hub_port_logical_disconnect(struct usb_hub 
*hub, int port1)
 */
 
set_bit(port1, hub-change_bits);
-   kick_khubd(hub);
+   kick_khubd(hub);
 }
 
 /**
@@ -1361,7 +1361,7 @@ static int hub_configure(struct usb_hub *hub,
if ((wHubCharacteristics  HUB_CHAR_COMPOUND) 
!(hub_is_superspeed(hdev))) {
int i;
-   charportstr [USB_MAXCHILDREN + 1];
+   charportstr[USB_MAXCHILDREN + 1];
 
for (i = 0; i  hdev-maxchild; i++)
portstr[i] = hub-descriptor-u.hs.DeviceRemovable
@@ -1429,32 +1429,32 @@ static int hub_configure(struct usb_hub *hub,
 
/* Note 8 FS bit times == (8 bits / 1200 bps) ~= 666ns */
switch (wHubCharacteristics  HUB_CHAR_) {
-   case HUB__8_BITS:
-   if (hdev-descriptor.bDeviceProtocol != 0) {
-   hub-tt.think_time = 666;
-   dev_dbg(hub_dev, TT requires at most %d 
-   FS bit times (%d ns)\n,
-   8, hub-tt.think_time);
-   }
-   break;
-   case HUB__16_BITS:
-   hub-tt.think_time = 666 * 2;
-   dev_dbg(hub_dev, TT requires at most %d 
-   FS bit times (%d ns)\n,
-   16, hub-tt.think_time);
-   break;
-   case HUB__24_BITS:
-   hub-tt.think_time = 666 * 3;
-   dev_dbg(hub_dev, TT requires at most %d 
-   FS bit times (%d ns)\n,
-   24, hub-tt.think_time);
-   break;
-   case HUB__32_BITS:
-   hub-tt.think_time = 666 * 4;
+   case HUB__8_BITS:
+   if (hdev-descriptor.bDeviceProtocol != 0) {
+   hub-tt.think_time = 666;
dev_dbg(hub_dev, TT requires at most %d 
FS bit times (%d ns)\n,
-   32, hub

[PATCH 3/6] drivers: usb: core: hub.c: Comments shouldnt be C99 // comment style

2013-10-10 Thread Matthias Beyer
Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/hub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e5fdf4b..5e9fc21 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2488,7 +2488,7 @@ error_device_descriptor:
usb_autosuspend_device(usb_dev);
 error_autoresume:
 out_authorized:
-   usb_unlock_device(usb_dev); // complements locktree
+   usb_unlock_device(usb_dev); /* complements locktree */
return result;
 }
 
@@ -3210,7 +3210,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t 
msg)
if (status == 0  !port_is_suspended(hub, portstatus))
goto SuspendCleared;
 
-   // dev_dbg(hub-intfdev, resume port %d\n, port1);
+   /* dev_dbg(hub-intfdev, resume port %d\n, port1); */
 
set_bit(port1, hub-busy_bits);
 
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6] drivers: usb: core: devio.c: Else should be on closing braces

2013-10-10 Thread Matthias Beyer
moved else keyword of if-else construct to closing braces.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 215d882..adbdea3 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1840,11 +1840,9 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
 
if (ps-dev-state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   }
-   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
+   } else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
-   }
-   else {
+   } else {
switch (ctl-ioctl_code) {
 
/* disconnect kernel driver from interface */
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] drivers: usb: core: devio.c: Braces around switch

2013-10-10 Thread Matthias Beyer
Added braces around switch statement as the styleguide tells us.
Indented the switch-block for it and split a function call
(driver-unlocked_ioctl() on line 1876) arguments to several lines to
fit the 80-column convention.

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 60 ++--
 1 file changed, 33 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 8aca6b93..215d882 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1843,36 +1843,42 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
}
else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
-   else switch (ctl-ioctl_code) {
-
-   /* disconnect kernel driver from interface */
-   case USBDEVFS_DISCONNECT:
-   if (intf-dev.driver) {
-   driver = to_usb_driver(intf-dev.driver);
-   dev_dbg(intf-dev, disconnect by usbfs\n);
-   usb_driver_release_interface(driver, intf);
-   } else
-   retval = -ENODATA;
-   break;
+   }
+   else {
+   switch (ctl-ioctl_code) {
+
+   /* disconnect kernel driver from interface */
+   case USBDEVFS_DISCONNECT:
+   if (intf-dev.driver) {
+   driver = to_usb_driver(intf-dev.driver);
+   dev_dbg(intf-dev, disconnect by usbfs\n);
+   usb_driver_release_interface(driver, intf);
+   } else {
+   retval = -ENODATA;
+   }
+   break;
 
-   /* let kernel drivers try to (re)bind to the interface */
-   case USBDEVFS_CONNECT:
-   if (!intf-dev.driver)
-   retval = device_attach(intf-dev);
-   else
-   retval = -EBUSY;
-   break;
+   /* let kernel drivers try to (re)bind to the interface */
+   case USBDEVFS_CONNECT:
+   if (!intf-dev.driver)
+   retval = device_attach(intf-dev);
+   else
+   retval = -EBUSY;
+   break;
 
-   /* talk directly to the interface's driver */
-   default:
-   if (intf-dev.driver)
-   driver = to_usb_driver(intf-dev.driver);
-   if (driver == NULL || driver-unlocked_ioctl == NULL) {
-   retval = -ENOTTY;
-   } else {
-   retval = driver-unlocked_ioctl(intf, ctl-ioctl_code, 
buf);
-   if (retval == -ENOIOCTLCMD)
+   /* talk directly to the interface's driver */
+   default:
+   if (intf-dev.driver)
+   driver = to_usb_driver(intf-dev.driver);
+   if (driver == NULL || driver-unlocked_ioctl == NULL) {
retval = -ENOTTY;
+   } else {
+   retval = driver-unlocked_ioctl(intf,
+   ctl-ioctl_code,
+   buf);
+   if (retval == -ENOIOCTLCMD)
+   retval = -ENOTTY;
+   }
}
}
 
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6] drivers: usb: core: file.c: moved asterisk to variable name

2013-10-10 Thread Matthias Beyer
Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 903c7ef..3bdfbf8 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -27,7 +27,7 @@
 static const struct file_operations *usb_minors[MAX_USB_MINORS];
 static DECLARE_RWSEM(minor_rwsem);
 
-static int usb_open(struct inode * inode, struct file * file)
+static int usb_open(struct inode *inode, struct file *file)
 {
int minor = iminor(inode);
const struct file_operations *c;
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] drivers: usb: core: devio.c: Coding style fixes

2013-10-10 Thread Matthias Beyer
Whitespace fixes, including:

- Whitespace after if-keyword
- Spaces to Tabs

Other coding style fixes:

- Added braces for if-else blocks where missing

Signed-off-by: Matthias Beyer m...@beyermatthias.de
---
 drivers/usb/core/devio.c | 39 ---
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71dc5d7..8aca6b93 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1222,7 +1222,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
return -ENOENT;
 
u = 0;
-   switch(uurb-type) {
+   switch (uurb-type) {
case USBDEVFS_URB_TYPE_CONTROL:
if (!usb_endpoint_xfer_control(ep-desc))
return -EINVAL;
@@ -1636,32 +1636,32 @@ static int proc_reapurbnonblock(struct dev_state *ps, 
void __user *arg)
 static int proc_control_compat(struct dev_state *ps,
struct usbdevfs_ctrltransfer32 __user *p32)
 {
-struct usbdevfs_ctrltransfer __user *p;
-__u32 udata;
-p = compat_alloc_user_space(sizeof(*p));
-if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
-get_user(udata, p32-data) ||
+   struct usbdevfs_ctrltransfer __user *p;
+   __u32 udata;
+   p = compat_alloc_user_space(sizeof(*p));
+   if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) ||
+   get_user(udata, p32-data) ||
put_user(compat_ptr(udata), p-data))
return -EFAULT;
-return proc_control(ps, p);
+   return proc_control(ps, p);
 }
 
 static int proc_bulk_compat(struct dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
 {
-struct usbdevfs_bulktransfer __user *p;
-compat_uint_t n;
-compat_caddr_t addr;
+   struct usbdevfs_bulktransfer __user *p;
+   compat_uint_t n;
+   compat_caddr_t addr;
 
-p = compat_alloc_user_space(sizeof(*p));
+   p = compat_alloc_user_space(sizeof(*p));
 
-if (get_user(n, p32-ep) || put_user(n, p-ep) ||
-get_user(n, p32-len) || put_user(n, p-len) ||
-get_user(n, p32-timeout) || put_user(n, p-timeout) ||
-get_user(addr, p32-data) || put_user(compat_ptr(addr), p-data))
-return -EFAULT;
+   if (get_user(n, p32-ep) || put_user(n, p-ep) ||
+   get_user(n, p32-len) || put_user(n, p-len) ||
+   get_user(n, p32-timeout) || put_user(n, p-timeout) ||
+   get_user(addr, p32-data) || put_user(compat_ptr(addr), p-data))
+   return -EFAULT;
 
-return proc_bulk(ps, p);
+   return proc_bulk(ps, p);
 }
 static int proc_disconnectsignal_compat(struct dev_state *ps, void __user *arg)
 {
@@ -1838,9 +1838,10 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
return -ENODEV;
}
 
-   if (ps-dev-state != USB_STATE_CONFIGURED)
+   if (ps-dev-state != USB_STATE_CONFIGURED) {
retval = -EHOSTUNREACH;
-   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno)))
+   }
+   else if (!(intf = usb_ifnum_to_if(ps-dev, ctl-ifno))) {
retval = -EINVAL;
else switch (ctl-ioctl_code) {
 
-- 
1.8.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers: usb: core: hcd.c: converted busmap from struct to bitmap

2013-10-05 Thread Matthias Beyer
The DECLARE_BITMAP macro should be used for declaring this bitmap.
This commit converts the busmap from a struct to a simple (static)
bitmap, using the DECLARE_BITMAP macro from linux/types.h.

Please review, as I'm new to kernel development, I don't know if this
has any hidden side effects!

Suggested by j...@perches.com

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/hcd.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bbd182a..e9e1b33 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -92,10 +93,7 @@ EXPORT_SYMBOL_GPL (usb_bus_list);
 
 /* used when allocating bus numbers */
 #define USB_MAXBUS 64
-struct usb_busmap {
-   unsigned long busmap[USB_MAXBUS / (8*sizeof (unsigned long))];
-};
-static struct usb_busmap busmap;
+static DECLARE_BITMAP(busmap, USB_MAXBUS);
 
 /* used when updating list of hcds */
 DEFINE_MUTEX(usb_bus_list_lock);   /* exported only for usbfs */
@@ -941,12 +939,12 @@ static int usb_register_bus(struct usb_bus *bus)
int busnum;
 
mutex_lock(_bus_list_lock);
-   busnum = find_next_zero_bit (busmap.busmap, USB_MAXBUS, 1);
+   busnum = find_next_zero_bit(busmap, USB_MAXBUS, 1);
if (busnum >= USB_MAXBUS) {
printk (KERN_ERR "%s: too many buses\n", usbcore_name);
goto error_find_busnum;
}
-   set_bit (busnum, busmap.busmap);
+   set_bit(busnum, busmap);
bus->busnum = busnum;
 
/* Add it to the local list of buses */
@@ -987,7 +985,7 @@ static void usb_deregister_bus (struct usb_bus *bus)
 
usb_notify_remove_bus(bus);
 
-   clear_bit (bus->busnum, busmap.busmap);
+   clear_bit(bus->busnum, busmap);
 }
 
 /**
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/5] Cleanup in drivers/usb/core/hcd.c

2013-10-05 Thread Matthias Beyer
Hi!

I did some cleanup in 

drivers/usb/core/hcd.c

of ERROR messages from "scripts/checkpatch.pl --file". Not all ERRORs are fixed,
there are some remaining with "assignment in if statement".

It's based on 7dee8df, which is Linus current master. I compiled it without
errors. Checkpatch script gives me some warnings, which are remaining warnings
of the file, I didn't introduce them!

Best regards!

Matthias Beyer (5):
  drivers: usb: core: hcd: moved asterix to variable
  drivers: usb: core: hcd: Whitespace fixes
  drivers: usb: core: hcd: replaced C99 // comments
  drivers: usb: core: hcd: removed braces for return statements
  drivers: usb: core: hcd: if-else-braces fixed

 drivers/usb/core/hcd.c | 80 +-
 1 file changed, 40 insertions(+), 40 deletions(-)

-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/5] drivers: usb: core: hcd: removed braces for return statements

2013-10-05 Thread Matthias Beyer
Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/hcd.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 3a2667c..5d13d6c 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1120,18 +1120,18 @@ long usb_calc_bus_time (int speed, int is_input, int 
isoc, int bytecount)
case USB_SPEED_LOW: /* INTR only */
if (is_input) {
tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 
1000L;
-   return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY 
+ tmp);
+   return 64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + 
tmp;
} else {
tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 
1000L;
-   return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY 
+ tmp);
+   return 64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + 
tmp;
}
case USB_SPEED_FULL:/* ISOC or INTR */
if (isoc) {
tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 
1000L;
-   return (((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + 
tmp);
+   return ((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + 
tmp;
} else {
tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 
1000L;
-   return (9107L + BW_HOST_DELAY + tmp);
+   return 9107L + BW_HOST_DELAY + tmp;
}
case USB_SPEED_HIGH:/* ISOC or INTR */
/* FIXME adjust for input vs output */
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] drivers: usb: core: hcd: moved asterix to variable

2013-10-05 Thread Matthias Beyer
instead of type

Signed-off-by: Matthias Beyer 
---
 drivers/usb/core/hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index d6a8d23..9036794 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2818,7 +2818,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
 EXPORT_SYMBOL_GPL(usb_remove_hcd);
 
 void
-usb_hcd_platform_shutdown(struct platform_device* dev)
+usb_hcd_platform_shutdown(struct platform_device *dev)
 {
struct usb_hcd *hcd = platform_get_drvdata(dev);
 
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   >