- 24 2月, 2020 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200220132017.GA29262@embeddedorSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 2月, 2020 24 次提交
-
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast xx_driver_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-21-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
pci_driver name is const char pointer, so it not useful to cast hcd_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-20-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
pci_driver name is const char pointer, so it not useful to cast hcd_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-19-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast hcd_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-18-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
pci_driver name is const char pointer, so it not useful to cast hcd_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-17-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
pci_driver name is const char pointer, so it not useful to cast hcd_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-16-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast udc_name (which is already const char). Reviewed-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-15-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast udc_name (which is already const char). Reviewed-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-14-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast driver_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-13-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast driver_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-12-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast udc_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-11-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast driver_name (which is already const char). Reviewed-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-10-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
pci_driver name is const char pointer, so it not useful to cast driver_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-9-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast udc_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-8-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast udc_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-7-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast driver_name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-6-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast driver_name (which is already const char). Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-5-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
pci_driver name is const char pointer, so it not useful to cast name (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-4-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
device_driver name is const char pointer, so it not useful to cast shortname (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-3-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Corentin Labbe 提交于
usb_composite_driver name is const char pointer, so it not useful to cast longname (which is already const char). Signed-off-by: NCorentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1582054383-35760-2-git-send-email-clabbe@baylibre.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andy Shevchenko 提交于
Use ACPI_SUCCESS() to replace !ACPI_FAILURE(), this avoids additional operation. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200218191717.73512-1-andriy.shevchenko@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andy Shevchenko 提交于
Compiler is not happy about dangling variable: .../core/usb-acpi.c: In function ‘usb_acpi_get_connect_type’: .../core/usb-acpi.c:90:14: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 90 | acpi_status status; | ^~~~~~ Make use of it by checking the status and bail out in case of error. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200218185207.62527-1-andriy.shevchenko@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Joe Perches 提交于
Make structs const to reduce data size ~20KB. Change function arguments and prototypes as necessary to compile. $ size (x86-64 defconfig pre) text data bss dec hex filename 12281 10948 480 23709 5c9d ./drivers/usb/storage/usb.o 111 10528 8 10647 2997 ./drivers/usb/storage/usual-tables.o $ size (x86-64 defconfig post) text data bss dec hex filename 22809 420 480 23709 5c9d drivers/usb/storage/usb.o 10551 0 0 10551 2937 drivers/usb/storage/usual-tables.o Signed-off-by: NJoe Perches <joe@perches.com> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/cf13bd2d790ae3afbf5da55ea7bed12e00c5119d.camel@perches.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rasmus Villemoes 提交于
After this was made buildable for something other than PPC32, kbuild starts warning drivers/usb/host/fhci-hcd.c:398:8: warning: this statement may fall through [-Wimplicit-fallthrough=] I don't know this code, but from the construction (initializing size with 0 and explicitly using "size +=" in the PIPE_BULK case) I assume that fallthrough is indeed intended. Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: NLi Yang <leoyang.li@nxp.com> Link: https://lore.kernel.org/r/20200213085401.27862-1-linux@rasmusvillemoes.dkSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 2月, 2020 6 次提交
-
-
由 Ajay Gupta 提交于
Ucsi ppm is unregistered during fw flashing so disable runtime pm also and reenable after fw flashing is completed and ppm is re-registered. Signed-off-by: NAjay Gupta <ajayg@nvidia.com> Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200217144913.55330-3-heikki.krogerus@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ajay Gupta 提交于
NVIDIA VirtualLink (svid 0x955) has two altmode, vdo=0x1 for VirtualLink DP mode and vdo=0x3 for NVIDIA test mode. Register display altmode driver only for vdo=0x1 Signed-off-by: NAjay Gupta <ajayg@nvidia.com> Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200217144913.55330-2-heikki.krogerus@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jules Irenge 提交于
Sparse reports a warning at xhci_enter_test_mode() warning: context imbalance in xhci_enter_test_mode - unexpected unlock The root cause is the missing annotation at xhci_enter_test_mode() Add the missing __must_hold(&xhci->lock) annotattion Signed-off-by: NJules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20200214204741.94112-24-jbi.octave@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jules Irenge 提交于
Sparse reports a warning at xhci_set_port_power() warning: context imbalance in xhci_set_port_power - unexpected unlock The root cause is the missing annotation at xhci_set_port_power() Add the missing __must_hold(&xhci->lock) annotattion Signed-off-by: NJules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20200214204741.94112-23-jbi.octave@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Steven Rostedt (VMware) 提交于
libtraceevent (used by perf and trace-cmd) failed to parse the xhci_urb_dequeue trace event. This is because the user space trace event format parsing is not a full C compiler. It can handle some basic logic, but is not meant to be able to handle everything C can do. In cases where a trace event field needs to be converted from a number to a string, there's the __print_symbolic() macro that should be used: See samples/trace_events/trace-events-sample.h Some xhci trace events open coded the __print_symbolic() causing the user spaces tools to fail to parse it. This has to be replaced with __print_symbolic() instead. CC: stable@vger.kernel.org Reported-by: NTzvetomir Stoyanov <tstoyanov@vmware.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206531 Fixes: 5abdc2e6 ("usb: host: xhci: add urb_enqueue/dequeue/giveback tracers") Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org> Link: https://lore.kernel.org/r/20200214115634.30e8ebf2@gandalf.local.homeSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexandre Belloni 提交于
The variable is named reserved, the comment should say so. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200214142446.22483-1-alexandre.belloni@bootlin.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 2月, 2020 5 次提交
-
-
由 Gustavo A. R. Silva 提交于
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertenly introduced[3] to the codebase from now on. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200211232303.GA21495@embeddedorSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gustavo A. R. Silva 提交于
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertenly introduced[3] to the codebase from now on. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200211232519.GA23263@embeddedorSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Li Jun 提交于
Since the typec port data role is separated from power role, so check the port data capability when setting data role. Signed-off-by: NLi Jun <jun.li@nxp.com> Reviewed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/1581666828-2063-1-git-send-email-jun.li@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mika Westerberg 提交于
Two functions that were added for USB4 support miss kernel-doc parameter descriptions so add them now. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/20200214121638.75589-1-mika.westerberg@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 chenqiwu 提交于
Use kobj_to_dev() API instead of container_of(). Signed-off-by: Nchenqiwu <chenqiwu@xiaomi.com> Link: https://lore.kernel.org/r/1581683820-9978-1-git-send-email-qiwuchen55@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 2月, 2020 4 次提交
-
-
由 Oliver Neukum 提交于
The product ID is little endian and needs to be converted. Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NOliver Neukum <oneukum@suse.com> Reviewed-by: NBastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20200213111336.32392-1-oneukum@suse.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bastien Nocera 提交于
iOS devices will not draw more than 500mA unless instructed to do so. Setting the charge type power supply property to "fast" tells the device to start drawing more power, using the same procedure that official "MFi" chargers would. Signed-off-by: NBastien Nocera <hadess@hadess.net> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20191016093933.693-7-hadess@hadess.netSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bastien Nocera 提交于
If ->probe fails for a device specific driver, ask the driver core to reprobe us, after having flagged the device for the generic driver to be forced. Signed-off-by: NBastien Nocera <hadess@hadess.net> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20191016093933.693-6-hadess@hadess.netSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bastien Nocera 提交于
Now that USB device drivers can reuse code from the generic USB device driver, we need to make sure that they get selected rather than the generic driver. Add an id_table and match vfunc to the usb_device_driver struct, which will get used to select a better matching driver at ->probe time. This is a similar mechanism to that used in the HID drivers, with the generic driver being selected unless there's a better matching one found in the registered drivers (see hid_generic_match() in drivers/hid/hid-generic.c). Signed-off-by: NBastien Nocera <hadess@hadess.net> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20191016093933.693-5-hadess@hadess.netSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-