Re: [PATCH] usb: Replace empty define with do while

2018-06-07 Thread Joe Perches
On Thu, 2018-06-07 at 20:05 +, Corentin Labbe wrote: > It's dangerous to use empty code define. > Furthermore it lead to the following warning: > "suggest braces around empty body in an « else » statement" > > So let's replace emptyness by "do {} while(0)" I also suggest renaming COUNT to

[PATCH 0/4] net: drivers/net: Use octal permissions

2018-03-23 Thread Joe Perches
Using octal and not symbolic permissions is preferred by many as more readable. https://lkml.org/lkml/2016/8/2/1945 Rather than getting these piecemeal, just do them all. Done with checkpatch and some typing. Joe Perches (4): ethernet: Use octal not symbolic permissions wireless: Use octal

[PATCH 4/4] drivers/net: Use octal not symbolic permissions

2018-03-23 Thread Joe Perches
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/bonding/bond_procfs.c | 2 +- d

Re: rfc: remove print_vma_addr ? (was Re: [PATCH 00/16] remove eight obsolete architectures)

2018-03-15 Thread Joe Perches
On Thu, 2018-03-15 at 10:08 -0700, Matthew Wilcox wrote: > On Thu, Mar 15, 2018 at 09:56:46AM -0700, Joe Perches wrote: > > I have a patchset that creates a vsprintf extension for > > print_vma_addr and removes all the uses similar to the > > print_symbol() removal. > &g

rfc: remove print_vma_addr ? (was Re: [PATCH 00/16] remove eight obsolete architectures)

2018-03-15 Thread Joe Perches
On Thu, 2018-03-15 at 10:48 +0100, Geert Uytterhoeven wrote: > Hi David, > > On Thu, Mar 15, 2018 at 10:42 AM, David Howells wrote: > > Do we have anything left that still implements NOMMU? > > Sure: arm, c6x, m68k, microblaze, and sh. I have a patchset that creates a

[PATCH] net: drivers/net: Remove unnecessary skb_copy_expand OOM messages

2018-03-12 Thread Joe Perches
skb_copy_expand without __GFP_NOWARN already does a dump_stack on OOM so these messages are redundant. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/ethernet/qualcomm/qca_spi.c | 1 - drivers/net/usb/lg-vl600.c | 6 +- drivers/net/wimax/i2400m/usb-rx.c

Re: [PATCH 1/2] net/usb/ax88179_178a: Use common code in ax88179_chk_eee()

2018-03-10 Thread Joe Perches
On Sat, 2018-03-10 at 19:24 +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 10 Mar 2018 18:22:43 +0100 > > Adjust a jump target so that a bit of common code can be better reused > at the end of this function. Please stop mindlessly sending

Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW

2017-12-20 Thread Joe Perches
On Wed, 2017-12-20 at 10:59 +0100, Greg Kroah-Hartman wrote: > > > Why you didn't send that patch to the sysfs maintainer is a bit odd... :) > > > > So here's an opportunity for you: > > > > The sysfs maintainer hasn't added include/linux/sysfs.h to > > the list of maintained files... > > > >

Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW

2017-12-20 Thread Joe Perches
On Wed, 2017-12-20 at 10:32 +0100, Greg Kroah-Hartman wrote: > On Wed, Dec 20, 2017 at 01:24:44AM -0800, Joe Perches wrote: > > On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote: > > > On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote: > > >

Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW

2017-12-20 Thread Joe Perches
On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote: > On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote: > > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible. [] > > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c [] > > @@ -854,7 +85

[-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-19 Thread Joe Perches
Joe Perches (4): sysfs.h: Use octal permissions treewide: Use DEVICE_ATTR_RW treewide: Use DEVICE_ATTR_RO treewide: Use DEVICE_ATTR_WO arch/arm/mach-pxa/sharpsl_pm.c | 4 +- arch/s390/kernel/smp.c | 2 +- arch/s390/kernel/topology.c

[-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW

2017-12-19 Thread Joe Perches
\s*,\s*\1_store\s*\)/DEVICE_ATTR_RW(\1)/g; print;}' Signed-off-by: Joe Perches <j...@perches.com> --- arch/s390/kernel/topology.c | 3 +-- arch/tile/kernel/sysfs.c | 2 +- drivers/gpu/drm/i915/i915_sysfs.c| 6 ++--- drivers/platform/x86/compal-l

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-14 Thread Joe Perches
On Mon, 2017-12-11 at 14:43 -0800, Matthew Wilcox wrote: > - There's no warning for the first paragraph of section 6: > > 6) Functions > > > Functions should be short and sweet, and do just one thing. They should > fit on one or two screenfuls of text (the ISO/ANSI screen size is

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-11 Thread Joe Perches
On Mon, 2017-12-11 at 14:43 -0800, Matthew Wilcox wrote: > On Mon, Dec 11, 2017 at 02:12:28PM -0800, Joe Perches wrote: > > Completely reasonable. Thanks. > > If we're doing "completely reasonable" complaints, then ... > > - I don't understand why

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-11 Thread Joe Perches
On Tue, 2017-12-12 at 08:43 +1100, Dave Chinner wrote: > On Sat, Dec 09, 2017 at 09:00:18AM -0800, Joe Perches wrote: > > On Sat, 2017-12-09 at 09:36 +1100, Dave Chinner wrote: > > > 1. Using lockdep_set_novalidate_class() for anything other > > > than device-&

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-09 Thread Joe Perches
On Sat, 2017-12-09 at 09:36 +1100, Dave Chinner wrote: > 1. Using lockdep_set_novalidate_class() for anything other > than device->mutex will throw checkpatch warnings. Nice. (*) [] > (*) checkpatch.pl is considered mostly harmful round here, too, > but that's another rant How so?

Re: [PATCH v2] usb: dwc2: Remove unnecessary debug prints

2017-12-07 Thread Joe Perches
On Thu, 2017-12-07 at 11:17 -0800, Joe Perches wrote: > On Wed, 2017-12-06 at 17:57 +0400, Razmik Karapetyan wrote: > > Removed unnecessary debug prints about DMA mode for host side > > from dwc2_gahbcfg_init() function. > > What other functionality makes these unnecessary

Re: [PATCH v2] usb: dwc2: Remove unnecessary debug prints

2017-12-07 Thread Joe Perches
On Wed, 2017-12-06 at 17:57 +0400, Razmik Karapetyan wrote: > Removed unnecessary debug prints about DMA mode for host side > from dwc2_gahbcfg_init() function. What other functionality makes these unnecessary? If any, it's nice to de -- To unsubscribe from this list: send the line "unsubscribe

Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-07 Thread Joe Perches
On Thu, 2017-12-07 at 10:12 -0500, Alan Stern wrote: > The real problem is that the kernel development community doesn't have > a fixed policy on how to handle memory allocation errors. [] > If there was one agreed-upon policy, then we could definitively point > to old code and say "That's wrong,

Re: [PATCH] USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-06 Thread Joe Perches
On Wed, 2017-12-06 at 11:45 -0500, Alan Stern wrote: > On Wed, 6 Dec 2017, SF Markus Elfring wrote: > > Omit an extra message for a memory allocation failure in this function. Markus' typical terrible commit message. > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c [] > > @@

Re: [PATCH] usb: core: Fix logging messages with spurious periods after newlines

2017-12-05 Thread Joe Perches
On Wed, 2017-12-06 at 07:27 +0100, Greg Kroah-Hartman wrote: > On Tue, Dec 05, 2017 at 10:22:05PM -0800, Joe Perches wrote: > > Using a period after a newline causes bad output. > > Nice catch, how did you find that? $ git grep '\\n\."' -- To unsubscribe from this

[PATCH] usb: core: Fix logging messages with spurious periods after newlines

2017-12-05 Thread Joe Perches
Using a period after a newline causes bad output. Miscellanea: o Coalesce formats too Signed-off-by: Joe Perches <j...@perches.com> --- drivers/usb/core/driver.c | 8 drivers/usb/core/hub.c | 17 +++-- drivers/usb/core/message.c | 6 +++--- 3 files chang

Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-23 Thread Joe Perches
On Thu, 2017-11-23 at 15:30 -0800, Joe Perches wrote: > --- /dev/null 2017-11-23 06:19:12.943046739 -0800 > +++ single_use_module.pl 2017-11-23 15:23:11.729812156 -0800 > @@ -0,0 +1,15 @@ [] > +$data =~ s~$var~$string~; this needs to be: $data =~ s~\b$var\b~$string~; -- To unsu

Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-23 Thread Joe Perches
On Wed, 2017-11-22 at 18:12 +0100, Greg Kroah-Hartman wrote: > On Wed, Nov 22, 2017 at 09:05:36AM -0800, Joe Perches wrote: > > On Fri, 2017-11-17 at 15:19 +0100, Greg Kroah-Hartman wrote: > > > There is no need to #define the license of the driver, just put it in > > >

Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-22 Thread Joe Perches
On Fri, 2017-11-17 at 15:19 +0100, Greg Kroah-Hartman wrote: > There is no need to #define the license of the driver, just put it in > the MODULE_LICENSE() line directly as a text string. > > This allows tools that check that the module license matches the source > code license to work properly,

Re: [PATCH 4/5] typec: tcpm: Move out of staging

2017-09-10 Thread Joe Perches
On Sun, 2017-09-10 at 13:37 -0700, Guenter Roeck wrote: > Move tcpm (USB Type-C Port Manager) out of staging. git format-patch -M -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 4/4] [media] zr364xx: Fix a typo in a comment line of the file header

2017-08-29 Thread Joe Perches
On Tue, 2017-08-29 at 07:35 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 28 Aug 2017 22:46:30 +0200 > > Fix a word in this description. > > Signed-off-by: Markus Elfring > --- >

[PATCH 00/18] treewide: Move storage class before return type

2017-07-05 Thread Joe Perches
Move the inline/asmlinkage keywords before the return types Add a checkpatch test for this too. Joe Perches (18): checkpatch: improve the STORAGE_CLASS test ARM: KVM: Move asmlinkage before type ARM: HP Jornada 7XX: Move inline before return type CRIS: gpio: Move inline before return type

[PATCH 14/18] USB: serial: safe_serial: Move __inline__ before return type

2017-07-05 Thread Joe Perches
Make the code like the rest of the kernel. Also use inline instead of __inline__. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/usb/serial/safe_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/

Re: [PATCH v2 5/8] PM / sleep: Print timing information if debug is enabled

2017-06-12 Thread Joe Perches
On Mon, 2017-06-12 at 22:51 +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Avoid printing the device suspend/resume timing information if > CONFIG_PM_DEBUG is not set to reduce the log noise level. > > Signed-off-by: Rafael J. Wysocki

Re: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-10 Thread Joe Perches
On Wed, 2017-05-10 at 12:07 -0500, Bin Liu wrote: > On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote: > > We have one register for each EP to set the maximum packet size for both > > TX and RX. > > If for example an RX programming would happen before the previous TX > > transfer

Re: [PATCH 1/2] usb: dwc2: Remove unnecessary debug prints

2017-04-19 Thread Joe Perches
On Wed, 2017-04-19 at 15:16 +0400, Razmik Karapetyan wrote: > Removed unnecessary debug prints about DMA mode for host side > from dwc2_gahbcfg_init() function. Why are these unnecessary? Are these emitted elsewhere? and... > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c [] > @@

Re: Patch for drivers/usb/serial/ch341.c enabling parity

2017-04-02 Thread Joe Perches
On Sun, 2017-04-02 at 18:57 +0200, Leif Neland wrote: > There is a patch > https://github.com/karlp/ch341-linux/blob/master/0001-usb-serial-ch341-Add-parity-support.patch > which enables parity selection for the ch341 USB-RS485 adapter. > > From: Karl Palsson Date: Tue, 18

[PATCH] HID: usbhid: Use pr_ and remove unnecessary OOM messages

2017-03-01 Thread Joe Perches
Use a more common logging style and remove the unnecessary OOM messages as there is default dump_stack when OOM. Miscellanea: o Hoist an assignment in an if o Realign arguments o Realign a deeply indented if descendent above a printk Signed-off-by: Joe Perches <j...@perches.com> --- d

Re: [PATCH] hid: usbhid: usbkbd: fix checkpatch.pl issues

2017-03-01 Thread Joe Perches
On Wed, 2017-03-01 at 21:59 +0200, Avraham Shukron wrote: > > > > This kind of change is definitely not helpful. The original table was > > Nx16, you converted it to Nx14. Why do you think original table used 16 > > columns? > > > > Regardless, it's a very old driver, just let it be. > > > >

Re: [PATCH v4 00/19] Replace PCI pool by DMA pool API

2017-03-01 Thread Joe Perches
On Wed, 2017-03-01 at 16:55 +0100, Romain Perier wrote: > support to warn about this old API in checkpath.pl checkpatch This part isn't true anymore, but it seems sensible enough, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API

2017-02-27 Thread Joe Perches
On Mon, 2017-02-27 at 13:52 +0100, Romain Perier wrote: > > I also wonder if you've in fact converted all of the > > pci_pool struct and function uses why a new checkpatch > > test is needed at all. > > That's just to avoid futures mistakes/uses. When all instances and macro definitions are

Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API

2017-02-27 Thread Joe Perches
s > > > in the DMA pool API. This adds support to check for use of these pci > > > functions and display a warning when it is the case. > > > > > > > I guess Joe Perches did sent some comments for this one, did you address > > them? > >

Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API

2017-02-27 Thread Joe Perches
i > > functions and display a warning when it is the case. > > > > I guess Joe Perches did sent some comments for this one, did you address > them? > Reviewed-by: Peter Senna Tschudin <peter.se...@collabora.com> > > Signed-off-by: Romain Perier <romain.per...

Re: [RFC 19/19] checkpatch: warn for use of old PCI pool API

2017-02-08 Thread Joe Perches
On Wed, 2017-02-08 at 19:55 +0100, Peter Senna Tschudin wrote: > On Wed, Feb 08, 2017 at 05:34:57PM +0100, Romain Perier wrote: > > pci_pool_*() functions should be replaced by the corresponding functions > > in the DMA pool API. This adds support to check for use of these pci > > functions and

Re: [RFC PATCH v3 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2016-09-30 Thread Joe Perches
On Fri, 2016-09-30 at 12:06 -0700, Guenter Roeck wrote: > On Thu, Sep 29, 2016 at 11:37 PM, Jun Li wrote: [] > > diff --git a/include/linux/usb/pd.h b/include/linux/usb/pd.h [] > > +#define PDO_VAR(min_mv, max_mv, max_ma) > > \ > > +

[PATCH] usb: Convert pr_warning to pr_warn

2016-09-27 Thread Joe Perches
Use the more common logging mechanism. Miscellanea: o Realign multiline statements o Coalesce format Signed-off-by: Joe Perches <j...@perches.com> --- drivers/usb/gadget/function/rndis.c | 9 - drivers/usb/gadget/function/u_serial.c | 4 ++-- drivers/usb/gadget/udc/at91

Re: [PATCH 05/15] usb: chipidea: imx: Change switch order

2016-09-19 Thread Joe Perches
On Mon, 2016-09-19 at 12:18 +0200, Fabien Lahoudere wrote: > Each USB controller have different behaviour, so in order to avoid to have > several "swicth(data->index)" and lock/unlock, we prefer to get the index > and then test for features if they exist for this index. [] > diff --git

Re: [PATCH 00/26] constify local structures

2016-09-11 Thread Joe Perches
On Sun, 2016-09-11 at 15:05 +0200, Julia Lawall wrote: > Constify local structures. Thanks Julia. A few suggestions & questions: Perhaps the script should go into scripts/coccinelle/ so that future cases could be caught by the robot and commit message referenced by the patch instances. Can you

Re: [PATCH 0/2] lan78xx: Remove trailing underscores from macros

2016-09-06 Thread Joe Perches
On Wed, 2016-09-07 at 02:00 +, ronnie.ku...@microchip.com wrote: > Microchip's internal convention is for register (offset) definitions > to be capitalized (i.e.: MY_REGISTER). Our convention for bits > (position) definitions within a register is to carry as a prefix the > name of the register

Re: [PATCH 0/2] lan78xx: Remove trailing underscores from macros

2016-09-06 Thread Joe Perches
On Tue, 2016-09-06 at 23:19 +, woojung@microchip.com wrote: > > Joe Perches (2): > >   lan78xx: Remove locally defined trailing underscores from defines and uses > >   microchipphy.h and uses: Remove trailing underscores from defines and > > uses > > &g

[PATCH 1/2] lan78xx: Remove locally defined trailing underscores from defines and uses

2016-09-06 Thread Joe Perches
(?!LAN88XX_)([A-Z0-9_][A-Za-z0-9_]+)_\b/\U\1\E/g' \ drivers/net/usb/lan78xx.[ch] and some editing to realign columns in the .h file. No change in defconfig object. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/usb/lan78xx.c | 340 +++ drivers/net/usb/lan78xx.h

[PATCH 0/2] lan78xx: Remove trailing underscores from macros

2016-09-06 Thread Joe Perches
Joe Perches (2): lan78xx: Remove locally defined trailing underscores from defines and uses microchipphy.h and uses: Remove trailing underscores from defines and uses drivers/net/phy/microchip.c |4 +- drivers/net/usb/lan78xx.c| 368 +++ drivers/net/usb/lan78xx.h

[PATCH 2/2] microchipphy.h and uses: Remove trailing underscores from defines and uses

2016-09-06 Thread Joe Perches
/lan78xx.c \ drivers/net/phy/microchip.c and some editing to realign columns in the .h file. No change in defconfig objects. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/phy/microchip.c | 4 +-- drivers/net/usb/lan78xx.c| 28 - include/linux/microchipphy.

[PATCH] smsc95xx: Remove trailing underscores from macros and uses

2016-09-06 Thread Joe Perches
in defconfig objects. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/usb/smsc95xx.c | 198 +-- drivers/net/usb/smsc95xx.h | 330 ++--- 2 files changed, 264 insertions(+), 264 deletions(-) diff --git a/drivers/n

[PATCH 2/2] hso: Convert printk to pr_

2016-09-02 Thread Joe Perches
Use a more common logging style Miscellanea: o Add pr_fmt to prefix each output message o Realign arguments Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/usb/hso.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb

[PATCH 0/2] hso: neatening

2016-09-02 Thread Joe Perches
This seems to be the only code in the kernel that uses macro defines with a trailing underscore. Fix that. Joe Perches (2): hso: Use a more common logging style hso: Convert printk to pr_ drivers/net/usb/hso.c | 118 +++--- 1 file changed, 55

[PATCH 1/2] hso: Use a more common logging style

2016-09-02 Thread Joe Perches
. Signed-off-by: Joe Perches <j...@perches.com> --- drivers/net/usb/hso.c | 97 +++ 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index c5544d3..6c37512 100644 --- a/drivers/net/usb

Re: [PATCH v10 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-06-09 Thread Joe Perches
On Thu, 2016-06-09 at 10:55 +0300, Roger Quadros wrote: > Now that we have a device reference in struct usb_otg > let's use dev_vdbg() for debug messages instead of VDBG(). > > Signed-off-by: Roger Quadros > Acked-by: Peter Chen > --- > v10: > - in the commit

Re: [PATCH v9 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-06-08 Thread Joe Perches
On Wed, 2016-06-08 at 12:03 +0300, Roger Quadros wrote: > Now that we have a device reference in struct usb_otg > let's use dev_dbg() for debug messages. dev_vdbg vs dev_dbg The patch subject and commit message don't match the code changes. > diff --git a/drivers/usb/common/usb-otg-fsm.c >

Re: [PATCH v2 10/14] USB: ch341: fix coding style

2016-04-02 Thread Joe Perches
On Sat, 2016-04-02 at 19:07 +0200, Grigori Goronzy wrote: > No functional change.  The following adjustments were made to be more in > line with official coding style and to be more consistent. > > Stop mixing tabs and spaces for alignment. Align continuations in > function prototypes correctly.  

Re: [RFC 7/7] USB: usbatm: avoid fragile and inefficient snprintf use

2016-03-08 Thread Joe Perches
On Tue, 2016-03-08 at 21:40 +0100, Rasmus Villemoes wrote: > Passing overlapping source and destination is fragile, and in this > case we can even simplify the code and avoid the huge stack buffer by > using the %p extension for printing a small hex dump. [] > diff --git a/drivers/usb/atm/usbatm.c

Re: [PATCH 0/5] usb-misc: cleanup sisusbvga

2016-01-06 Thread Joe Perches
On Wed, 2016-01-06 at 16:30 +0100, Peter Senna Tschudin wrote: > is it ok to fix horizontal issues caused by vertical changes in the > vertical changes patch? Yes. > Is it reasonable to respin if other issues are > reported for this series? Your choice. I think it'd be better to respin in any

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-05 Thread Joe Perches
On Tue, 2016-01-05 at 10:12 -0500, Alan Stern wrote: > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > > > >> @@ -404,12 +422,8 @@ static inline char token_mark(struct ehci_hcd > > >> *ehci, __hc32 token) > > >>   return '/'; > > >>  } > > >> > > >> -static void qh_lines( > > >> - struct

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-05 Thread Joe Perches
On Tue, 2016-01-05 at 11:06 -0500, Alan Stern wrote: > Trying to come up with hard-and-fast rules for this sort of thing is  > pretty hopeless.  Even "Maximize readability" doesn't work too well,  > because different people find different things most readable. Readability is mostly habituation.

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-05 Thread Joe Perches
On Tue, 2016-01-05 at 10:12 -0500, Alan Stern wrote: > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > > > >> @@ -404,12 +422,8 @@ static inline char token_mark(struct > ehci_hcd *ehci, __hc32 token) > > >>   return '/'; > > >>  } > > >> > > >> -static void qh_lines( > > >> - struct ehci_hcd

Re: [PATCH 0/5] usb-misc: cleanup sisusbvga

2016-01-05 Thread Joe Perches
On Tue, 2016-01-05 at 17:54 +0100, Peter Senna Tschudin wrote: [] > Patch 1 is the biggest and fix only whitespace, tab and newline issues. I used > > $ git diff -w --word-diff=porcelain drivers/usb/misc/sisusbvga/sisusb.c > > to verify that this patch do not change any visible character. If the

Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast

2016-01-04 Thread Joe Perches
On Mon, 2016-01-04 at 19:07 -0300, Geyslan G. Bem wrote: > 2016-01-04 18:52 GMT-03:00 Sergei Shtylyov : > > > > > > This patch fixes coding style issues reported by checkpatch > > > > > > concerning > > > > > > to unnecessary space after a cast. > > > > > This is a case where checkpatch is wrong,

Re: [PATCH 3/9] usb/host/fotg210: Remove useless else statement

2015-10-12 Thread Joe Perches
On Mon, 2015-10-12 at 23:22 +0200, Peter Senna Tschudin wrote: > This patch remove an else statement after a return to make the code > easier to understand. [] > diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c [] > @@ -1402,10 +1402,9 @@ static int

Re: [PATCH] usb: core: driver: Use kmalloc_array

2015-08-23 Thread Joe Perches
On Mon, 2015-08-24 at 00:18 +0530, Muhammad Falak R Wani wrote: This patch introduces the use of function kmalloc_array(), instead of using kmalloc(), for allocating memory for an array and removes the corresponding call to kmalloc(). [] diff --git a/drivers/usb/core/driver.c

Re: [PATCH 3/5] drivers:usb:fsl: Replace macros with enumerated type

2015-05-31 Thread Joe Perches
On Sun, 2015-05-31 at 15:50 +0900, Greg KH wrote: On Tue, May 26, 2015 at 05:15:48PM +0530, Nikhil Badola wrote: Replace macros with enumerated type to represent usb ip controller version Signed-off-by: Nikhil Badola nikhil.bad...@freescale.com --- include/linux/fsl_devices.h | 13

[PATCH] usb: storage: scsiglue: Remove SPRINTF macro use

2015-04-18 Thread Joe Perches
Single transform macros with hidden arguments are not particularly useful. Just use seq_printf directly instead. Signed-off-by: Joe Perches j...@perches.com --- drivers/usb/storage/scsiglue.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb

Re: [PATCH] drivers/usb/core: hcd.c: Removed all space warnings from checkpatch.pl

2015-04-11 Thread Joe Perches
On Sat, 2015-04-11 at 03:04 -0700, Chase Metzger wrote: Removed all(except false positives, from calculations) space prohibited warnings generated by checkpatch.pl. False positives? Please describe them. The only thing I believe you elided was the use of a BitTime macro which in my opinion

Re: [PATCH] drivers/usb/core: devio.c: Removed various errors and warnings generated by checkpatch.pl

2015-04-11 Thread Joe Perches
On Sat, 2015-04-11 at 00:53 -0700, Chase Metzger wrote: Fixed several errors and warnings. [] Lines 1040 and 1591: changed dev_printk(KERN_DEBUG, ...) to dev_dbg(...). These changes hav the possibly undesired effect of removing these messages completely when DEBUG is not #defined or when

[PATCH] usb: gadget: s3c2410_udc: Remove static char buffer, use vsprintf extension %pV

2015-03-26 Thread Joe Perches
Using unnecessary static char buffers isn't good. Use the %pV extension instead. Miscellanea: o the dprintk return value is unused, make it void o add __printf format and argument verification Signed-off-by: Joe Perches j...@perches.com --- This doesn't matter much as it is pretty unusual

[PATCH] goku_udc: Remove uses of seq_foo return values

2015-03-16 Thread Joe Perches
functions for statement expression macros o Use c90 style comments instead of c99 Signed-off-by: Joe Perches j...@perches.com --- compiled/untested drivers/usb/gadget/udc/goku_udc.c | 233 -- 1 file changed, 122 insertions(+), 111 deletions(-) diff --git

[PATCH net-next 00/14] Use eth_foo_addr instead of memset

2015-03-02 Thread Joe Perches
Joe Perches (14): etherdevice: Add eth_foo_addr CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS code ethernet: Use eth_foo_addr instead of memset net: usb: Use eth_foo_addr instead of memset wireless: Use eth_foo_addr instead of memset netconsole: Use eth_foo_addr instead of memset xen: Use

[PATCH net-next 03/14] net: usb: Use eth_foo_addr instead of memset

2015-03-02 Thread Joe Perches
Use the built-in function instead of memset. Signed-off-by: Joe Perches j...@perches.com --- drivers/net/usb/catc.c | 4 ++-- drivers/net/usb/cdc_mbim.c | 2 +- drivers/net/usb/lg-vl600.c | 2 +- drivers/net/usb/qmi_wwan.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 00/27] Convert seq_foo output calls to return void

2015-02-21 Thread Joe Perches
with not doing that. And must check return value and Do Something(tm) is too strong habit for enough people to cause recurring trouble. Joe Perches (27): staging: lustre: Convert return seq_printf(...) uses staging: lustre: Convert seq_ hash functions to return void staging: lustre: Convert uses

[PATCH 10/27] pxa27x_udc: Remove use of seq_printf return value

2015-02-21 Thread Joe Perches
the unnecessary labels. Signed-off-by: Joe Perches j...@perches.com --- drivers/usb/gadget/udc/pxa27x_udc.c | 132 1 file changed, 60 insertions(+), 72 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index 6a855fc

[trivial PATCH] treewide: Remove unnecessary BCMA_CORETABLE_END macro

2015-02-10 Thread Joe Perches
Use the normal {} instead of a macro to terminate an array. Remove the macro too. Signed-off-by: Joe Perches j...@perches.com --- drivers/net/ethernet/broadcom/bgmac.c | 2 +- drivers/net/wireless/b43/main.c | 2 +- drivers/net/wireless/brcm80211/brcmsmac

[trivial PATCH] treewide: Remove unnecessary SSB_DEVTABLE_END macro

2015-02-10 Thread Joe Perches
Use the normal {} instead of a macro to terminate an array. Remove the macro too. Signed-off-by: Joe Perches j...@perches.com --- drivers/net/ethernet/broadcom/b44.c | 2 +- drivers/net/wireless/b43/main.c | 2 +- drivers/net/wireless/b43legacy/main.c | 2 +- drivers/ssb/driver_gige.c

Re: [PATCH v2] usb: gadget: ffs: Fix sparse error

2014-12-24 Thread Joe Perches
On Wed, 2014-12-24 at 14:48 +0530, Rohith Seelaboyina wrote: Dynamic memory allocation through kcalloc is more safer than declaring variable array size, Fix this error by using kcalloc for memory allocation, Check if memory allocation is successful and return -ENOMEM on failure.

Re: [PATCH] usb: gadget: ffs: Fix sparse error

2014-12-23 Thread Joe Perches
On Wed, 2014-12-24 at 10:59 +0530, Rohith Seelaboyina wrote: Dynamic memory allocation through kmalloc is more safer than declaring variable array size, Fix this error by using kmalloc for memory allocation, Check if memory allocation is successful and return -ENOMEM on failure. [] diff --git

Re: [PATCH 0/20] fix misspelling of current function in string

2014-12-07 Thread Joe Perches
On Sun, 2014-12-07 at 20:20 +0100, Julia Lawall wrote: These patches replace what appears to be a reference to the name of the current function but is misspelled in some way by either the name of the function itself, or by %s and then __func__ in an argument list. At least a few of these seem

[PATCH -next 1/2] seq_puts: Convert to return void and convert uses too.

2014-11-10 Thread Joe Perches
Using the return value of seq_puts is error-prone, so make it return void instead. Use seq_has_overflowed where appropriate instead of the old return value. Signed-off-by: Joe Perches j...@perches.com --- drivers/parisc/ccio-dma.c | 7 ++-- drivers/regulator/dbx500-prcmu.c | 21

[PATCH -next 0/2] seq: Convert seq_puts and seq_putc to return void

2014-11-10 Thread Joe Perches
These are error prone, so return void adn use seq_has_overflowed instead Joe Perches (2): seq_puts: Convert to return void and convert uses too. seq_putc: Convert to return void and convert uses too. drivers/char/ipmi/ipmi_msghandler.c| 4 +- drivers/parisc/ccio-dma.c

[PATCH] printk: Add and use LOGLEVEL_level defines for KERN_LEVEL equivalents

2014-11-02 Thread Joe Perches
Use #defines instead of magic values. Signed-off-by: Joe Perches j...@perches.com --- drivers/usb/storage/debug.c | 2 +- include/linux/kern_levels.h | 13 + kernel/printk/printk.c | 28 +--- lib/dynamic_debug.c | 4 ++-- 4 files changed, 29

Re: [PATCH v9 1/4] mfd: add support for Diolan DLN-2 devices

2014-10-27 Thread Joe Perches
On Mon, 2014-10-27 at 18:31 +0200, Octavian Purdila wrote: This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO Master Adapter DLN-2. Details about the device can be found here: trivia: diff --git a/drivers/mfd/dln2.c b/drivers/mfd/dln2.c [] +static int _dln2_transfer(struct

[PATCH 10/11] hwa-hc: Fix probable mask then right shift defect

2014-10-26 Thread Joe Perches
Precedence of and is not the same and is not left to right. shift has higher precedence and should be done after the mask. Add parentheses around the mask. Signed-off-by: Joe Perches j...@perches.com --- drivers/usb/host/hwa-hc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 00/11] treewide: mask then shift defects and style updates

2014-10-26 Thread Joe Perches
logical mask has lower precedence than shift but should be done before the shift so parentheses are generally required. And when masking with a fixed value after a shift, normal kernel style has the shift on the left, then the shift on the right so convert a few non-conforming uses. Joe Perches

Re: [PATCH] USB: kobil_sct: Remove unused transfer buffer allocs

2014-10-22 Thread Joe Perches
On Wed, 2014-10-22 at 06:26 -0400, Peter Hurley wrote: On 10/22/2014 04:20 AM, Johan Hovold wrote: On Thu, Oct 16, 2014 at 01:59:22PM -0400, Peter Hurley wrote: Commit 90419cfcb5d9c889b10dc51363c56a4d394d670e, USB: kobil_sct: fix control requests without data stage, removed

[PATCH] usb: storage: Convert usb_stor_dbg to return void

2014-10-20 Thread Joe Perches
No caller or macro uses the return value so make it void. Signed-off-by: Joe Perches j...@perches.com --- This change is associated to a desire to eventually change printk to return void. drivers/usb/storage/debug.c | 7 ++- drivers/usb/storage/debug.h | 10 ++ 2 files changed, 8

Re: [PATCH] usb: serial: Fix indentation style issue

2014-10-11 Thread Joe Perches
On Sat, 2014-10-11 at 07:20 -0700, Greg KH wrote: On Sat, Oct 11, 2014 at 03:49:43PM +0200, Philip Munksgaard wrote: Fix a style issue [] diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c [] @@ -1616,7 +1616,7 @@ static const struct usb_device_id option_ids[] = {

Re: [PATCH] usb: atm: fix codestyle issues in

2014-10-11 Thread Joe Perches
On Sun, 2014-10-12 at 00:00 +0700, Lars Melin wrote: On 2014-10-11 23:02, Jonas Brunsgaard wrote: Signed-off-by: Jonas Brunsgaard jonas.brunsga...@gmail.com [] diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c [ 15 KB of quoted stuff ] Read:

Re: [PATCH] usb: serial: Fix indentation style issue

2014-10-11 Thread Joe Perches
On Sat, 2014-10-11 at 13:19 -0700, Greg KH wrote: On Sat, Oct 11, 2014 at 08:36:33AM -0700, Joe Perches wrote: On Sat, 2014-10-11 at 07:20 -0700, Greg KH wrote: On Sat, Oct 11, 2014 at 03:49:43PM +0200, Philip Munksgaard wrote: Fix a style issue [] diff --git a/drivers/usb/serial

Re: [PATCH v7 1/4] mfd: add support for Diolan DLN-2 devices

2014-10-09 Thread Joe Perches
On Thu, 2014-10-09 at 22:22 +0300, Octavian Purdila wrote: This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO Master Adapter DLN-2. Details about the device can be found here: trivia: diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig [] +config MFD_DLN2 + tristate

Re: [PATCH] usb: core: log higher level message on malformed LANGID descriptor

2014-09-25 Thread Joe Perches
On Thu, 2014-09-25 at 13:56 +, Scot Doyle wrote: Commit 0cce2eda19923e5e5ccc8b042dec5af87b3ffad0 USB: fix LANGID=0 regression trivia: diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c [] @@ -770,9 +770,7 @@ static int usb_get_langid(struct usb_device *dev,

project wide: git config entry for [diff] renames=true

2014-09-25 Thread Joe Perches
On Thu, 2014-09-25 at 17:03 +0200, Greg Kroah-Hartman wrote: In the future, please generate a git move diff, which makes it easier to review, and prove that nothing really changed. It also helps if the file is a bit different from what you diffed against, which in my case, was true. Maybe

Re: project wide: git config entry for [diff] renames=true

2014-09-25 Thread Joe Perches
On Thu, 2014-09-25 at 14:00 -0400, Jeff King wrote: On Thu, Sep 25, 2014 at 08:48:31AM -0700, Joe Perches wrote: On Thu, 2014-09-25 at 17:03 +0200, Greg Kroah-Hartman wrote: In the future, please generate a git move diff, which makes it easier to review, and prove that nothing really

Re: [PATCH 00/10 linux-next] drivers/usb: remove unnecessary break after goto/return

2014-07-24 Thread Joe Perches
On Thu, 2014-07-24 at 17:46 +0200, Fabian Frederick wrote: On 24 July 2014 at 13:37 Oliver Neukum oneu...@suse.de wrote: On Thu, 2014-07-24 at 10:18 +0200, Fabian Frederick wrote: Small patchset addressing break redundancy on drivers/usb branch (suggested by Joe Perches

Re: [PATCH] staging: usbip: fixed a coding-style warning

2014-06-18 Thread Joe Perches
On Wed, 2014-06-18 at 00:06 -0700, Greg Kroah-Hartman wrote: On Wed, Jun 18, 2014 at 09:49:39AM +0300, Alexey Tulia wrote: On Tue, Jun 17, 2014 at 03:44:58PM -0700, Greg Kroah-Hartman wrote: On Fri, Jun 13, 2014 at 11:35:13AM +0300, Alexey Tulia wrote: This fixes the following warning:

Re: [PATCH -next 24/26] usb: Use dma_zalloc_coherent

2014-06-16 Thread Joe Perches
On Mon, 2014-06-16 at 22:00 +, Paul Zimmerman wrote: From: Joe Perches [mailto:j...@perches.com] Sent: Sunday, June 15, 2014 1:38 PM Use the zeroing function instead of dma_alloc_coherent memset(,0,) Signed-off-by: Joe Perches j...@perches.com --- drivers/usb/dwc2

[PATCH -next 24/26] usb: Use dma_zalloc_coherent

2014-06-15 Thread Joe Perches
Use the zeroing function instead of dma_alloc_coherent memset(,0,) Signed-off-by: Joe Perches j...@perches.com --- drivers/usb/dwc2/hcd_ddma.c | 20 +++- drivers/usb/host/uhci-hcd.c | 7 +++ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/usb/dwc2

[PATCH -next 00/26] treewide: Use dma_zalloc_coherent

2014-06-15 Thread Joe Perches
Use the zeroing function instead of dma_alloc_coherent memset(,0,) Joe Perches (26): powerpc: Use dma_zalloc_coherent sh: Use dma_zalloc_coherent ata: Use dma_zalloc_coherent block: Use dma_zalloc_coherent crypto: Use dma_zalloc_coherent dma: Use dma_zalloc_coherent gpu: Use

  1   2   3   >