49814e2c | 29-Jan-2023 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
usb: early: xhci-dbc: Use memcpy_and_pad()
Instead of zeroing some memory and then copying data in part or all of it, use memcpy_and_pad(). This avoids writing some memory twice and should save a fe
usb: early: xhci-dbc: Use memcpy_and_pad()
Instead of zeroing some memory and then copying data in part or all of it, use memcpy_and_pad(). This avoids writing some memory twice and should save a few cycles.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/b447a7e9778d3f9e6997eb9494f1687dc2d5d3bf.1675016180.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
e662c16f | 29-Jan-2023 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
usb: early: xhci-dbc: Optimize early_xdbc_write()
There is no point in zeroing 'buf'. It would be cleared only once, and if the 'while' loop is executed several times, all but the first run would ha
usb: early: xhci-dbc: Optimize early_xdbc_write()
There is no point in zeroing 'buf'. It would be cleared only once, and if the 'while' loop is executed several times, all but the first run would have a 'dirty' buffer. Moreover, the size of the chunk is computed in the loop and this size is passed to xdbc_bulk_write().
So remove this useless memset().
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/687bbcd940c59fbddd0e3a8b578fd3422962e50f.1675016180.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
298ac860 | 04-Mar-2022 |
Peter Zijlstra <peterz@infradead.org> |
usb: early: xhci-dbc: Fix xdbc number parsing
kstrtoul() assumes the string contains the number only and is \0 terminated, this is not the case, as such things like:
earlyprintk=xdbc1,keep
go com
usb: early: xhci-dbc: Fix xdbc number parsing
kstrtoul() assumes the string contains the number only and is \0 terminated, this is not the case, as such things like:
earlyprintk=xdbc1,keep
go completely sideways. Use simple_strtoul() instead.
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220304152136.035911620@infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
8f01cc87 | 21-Sep-2020 |
Chunfeng Yun <chunfeng.yun@mediatek.com> |
usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic()
Use readl_poll_timeout_atomic() to simplify code
Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Petr Mladek <pmladek@suse.com> Sig
usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic()
Use readl_poll_timeout_atomic() to simplify code
Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Petr Mladek <pmladek@suse.com> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1600668815-12135-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
02ec8a09 | 06-Jul-2020 |
Lee Jones <lee.jones@linaro.org> |
usb: early: xhci-dbc: File headers are not good candidates for kerneldoc
Demote xhci-dbc's file header to a standard comment block.
Fixes the following W=1 kernel build warning(s):
drivers/usb/ea
usb: early: xhci-dbc: File headers are not good candidates for kerneldoc
Demote xhci-dbc's file header to a standard comment block.
Fixes the following W=1 kernel build warning(s):
drivers/usb/early/xhci-dbc.c:10: warning: Function parameter or member 'fmt' not described in 'pr_fmt'
Cc: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200706133341.476881-28-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
f0f705fc | 06-Jul-2020 |
Lee Jones <lee.jones@linaro.org> |
usb: early: xhci-dbc: Supply missing 'xhci-dbgp.h' headerfile
If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build syst
usb: early: xhci-dbc: Supply missing 'xhci-dbgp.h' headerfile
If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes.
Fixes the following W=1 kernel build warning(s):
drivers/usb/early/ehci-dbgp.c: In function ‘early_dbgp_write’: drivers/usb/early/ehci-dbgp.c:915:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 915 | int chunk, ret; | ^~~ drivers/usb/early/xhci-dbc.c:600:12: warning: no previous prototype for ‘early_xdbc_parse_parameter’ [-Wmissing-prototypes] 600 | int __init early_xdbc_parse_parameter(char *s) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/early/xhci-dbc.c:653:12: warning: no previous prototype for ‘early_xdbc_setup_hardware’ [-Wmissing-prototypes] 653 | int __init early_xdbc_setup_hardware(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/early/xhci-dbc.c:910:13: warning: no previous prototype for ‘early_xdbc_register_console’ [-Wmissing-prototypes] 910 | void __init early_xdbc_register_console(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Cc: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Jann Horn <jannh@google.com> Link: https://lore.kernel.org/r/20200706133341.476881-27-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
2013288f | 30-Oct-2018 |
Mike Rapoport <rppt@linux.vnet.ibm.com> |
memblock: replace free_bootmem{_node} with memblock_free
The free_bootmem and free_bootmem_node are merely wrappers for memblock_free. Replace their usage with a call to memblock_free using the foll
memblock: replace free_bootmem{_node} with memblock_free
The free_bootmem and free_bootmem_node are merely wrappers for memblock_free. Replace their usage with a call to memblock_free using the following semantic patch:
@@ expression e1, e2, e3; @@ ( - free_bootmem(e1, e2) + memblock_free(e1, e2) | - free_bootmem_node(e1, e2, e3) + memblock_free(e2, e3) )
Link: http://lkml.kernel.org/r/1536927045-23536-24-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chris Zankel <chris@zankel.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greentime Hu <green.hu@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Guan Xuetao <gxt@pku.edu.cn> Cc: Ingo Molnar <mingo@redhat.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Jonas Bonn <jonas@southpole.se> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Paul Burton <paul.burton@mips.com> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Richard Weinberger <richard@nod.at> Cc: Rich Felker <dalias@libc.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Serge Semin <fancer.lancer@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|