Use of_property_read_bool to check for the existence of a property.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
expression e1,e2;
statement S2,S1;
@@
- if (of_get_property(e1,e2,NULL))
+ if (of_property_read_bool(e1,e2))
S1 else
Use of_property_read_bool to check for the existence of a property.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
expression e1,e2;
statement S2,S1;
@@
- if (of_get_property(e1,e2,NULL))
+ if (of_property_read_bool(e1,e2))
S1 else
Use of_property_read_bool to check for the existence of a property.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
expression e1,e2,x;
@@
- if (of_get_property(e1,e2,NULL))
- x = true;
- else
- x = false;
+
On Fri, 5 Aug 2016, Robin Murphy wrote:
> Hi Julia,
>
> On 05/08/16 09:56, Julia Lawall wrote:
> > Use of_property_read_bool to check for the existence of a property.
>
> This caught my eye since Rob told me off for doing the same recently[1].
>
> > The semantic patch that makes this change is a
* Andreas Kemnade [160804 09:44]:
> Nothing happens here, so the previous state of the phy remains.
> It would be disabled by the generic phy layer in drivers/phy/phy-core.c
>
> > gadget driver is loaded.
> > musb_start() is called
> > omap2430_musb_enable() is called
> > calls phy_power_o
On Fri, 5 Aug 2016 06:55:01 -0700
Tony Lindgren wrote:
> * Andreas Kemnade [160804 09:44]:
> > Nothing happens here, so the previous state of the phy remains.
> > It would be disabled by the generic phy layer in
> > drivers/phy/phy-core.c
> >
> > > gadget driver is loaded.
> > > musb_start() is
The early-exit pathway in hub_activate, added by commit e50293ef9775
("USB: fix invalid memory access in hub_activate()") needs
improvement. It duplicates code that is already present at the end of
the subroutine, and it neglects to undo the effect of a
usb_autopm_get_interface_no_resume() call.
The locking in hub_activate() is not adequate to provide full mutual
exclusion with hub_quiesce(). The subroutine locks the hub's
usb_interface, but the callers of hub_quiesce() (such as
hub_pre_reset() and hub_event()) hold the lock to the hub's
usb_device.
This patch changes hub_activate() to m
On 05-08-16, 11:49, Alan Stern wrote:
> The early-exit pathway in hub_activate, added by commit e50293ef9775
> ("USB: fix invalid memory access in hub_activate()") needs
> improvement. It duplicates code that is already present at the end of
> the subroutine, and it neglects to undo the effect of
On 05-08-16, 11:51, Alan Stern wrote:
> The locking in hub_activate() is not adequate to provide full mutual
> exclusion with hub_quiesce(). The subroutine locks the hub's
> usb_interface, but the callers of hub_quiesce() (such as
> hub_pre_reset() and hub_event()) hold the lock to the hub's
> usb
Use gadget's framework allocation function instead of directly calling
usb_ep_alloc_request().
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_hid.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/usb/gadget/function/f_hid.c
b/drivers/usb/gadg
We should always use free_ep_req() when allocating requests with
alloc_ep_req().
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_hid.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/gadget/function/f_hid.c
b/drivers/usb/gadget/funct
512 is the value used by wMaxPacketSize, as specified by the USB Spec. This
makes sure this driver uses, by default, the most optimal value for IN and OUT
endpoint requests.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 2 +-
drivers/usb/gadget/legacy/gmidi.c| 2
This change makes sure that the ALSA buffers are cleaned if an endpoint
becomes disabled.
Before this change, if the internal ALSA buffer did overflow, the MIDI
function would stop sending MIDI to the host.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 27 +
The default_length parameter of alloc_ep_req was not really necessary
and gadget drivers would almost always create an inline function to pass
the same value to len and default_len.
So this patch also removes duplicate code from few drivers.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadg
This refactor results in a cleaner state machine code and promotes
consistency, readability, and maintanability of this driver.
This refactor state machine was well tested and it is currently running in
production code and devices.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/functio
The new version of alloc_ep_req() already aligns the buffer size to
wMaxPacketSize on OUT endpoints.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/function/f_midi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/function/f_midi.c
b/drivers/
Using usb_ep_align() makes sure that the buffer size for OUT endpoints is
always aligned with wMaxPacketSize (512 usually). This makes sure
that no buffer has the wrong size, which can cause nasty bugs.
Signed-off-by: Felipe F. Tonello
---
drivers/usb/gadget/u_f.c | 3 +++
drivers/usb/gadget/u_
As discussed with Baolin Wang, Michal Nazarewicz and Felipe Balbi. I propose
the forced buffer alignment of OUT endpoints USB requests. This is implemented
by patches #1 and #2.
That not just simplifies the driver code, but it also prevents nasty bugs when
buflen is not aligned or even less than w
USB spec specifies wMaxPacketSize to be little endian (as other properties),
so when using this variable in the driver we should convert to the current
CPU endianness if necessary.
This patch also introduces usb_ep_align() which does always returns the
aligned buffer size for an endpoint. This is
Hi Felipe,
[auto build test ERROR on balbi-usb/next]
[also build test ERROR on v4.7 next-20160805]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commits/Felipe-F-Tonello/Gadget-endpoint-request
The following changes since commit e65805251f2db69c9f67ed8062ab82526be5a374:
Merge branch 'irq-core-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2016-07-25 21:35:03
-0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/u
22 matches
Mail list logo