* [PATCH 00/44] usb: don't print on ENOMEM
@ 2016-08-25 17:38 Wolfram Sang
[not found] ` <20160825173947.26624-1-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
2016-08-26 6:27 ` [PATCH 00/44] usb: " Lothar Waßmann
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-08-25 17:38 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: Wolfram Sang,
accessrunner-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
legousb-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf
Here is my next series to save memory by removing unneeded strings. It removes
in the usb subsystem all unspecific error messages after calling malloc-based
functions, i.e. (devm_)k[zcm]alloc. kmalloc prints enough information in that
case. If the message was specific (e.g. "can't save CLEAR_TT_BUFFER state"), I
left it. This series saves ~4.5KB of "out of memory" permutations in .text and
.rodata. For modified lines, (x == NULL) was replaced with (!NULL) as well.
This seems to be the dominant style in this subsystem and checkpatch recommends
it as well (and I prefer it, too).
Wolfram Sang (44):
usb: atm: cxacru: don't print on ENOMEM
usb: atm: speedtch: don't print on ENOMEM
usb: atm: ueagle-atm: don't print on ENOMEM
usb: atm: usbatm: don't print on ENOMEM
usb: class: usbtmc: don't print on ENOMEM
usb: core: hcd: don't print on ENOMEM
usb: core: hub: don't print on ENOMEM
usb: core: message: don't print on ENOMEM
usb: core: urb: don't print on ENOMEM
usb: dwc2: gadget: don't print on ENOMEM
usb: gadget: udc: fsl_qe_udc: don't print on ENOMEM
usb: gadget: udc: goku_udc: don't print on ENOMEM
usb: gadget: udc: udc-xilinx: don't print on ENOMEM
usb: host: fhci-hcd: don't print on ENOMEM
usb: host: max3421-hcd: don't print on ENOMEM
usb: host: uhci-hcd: don't print on ENOMEM
usb: host: xhci-tegra: don't print on ENOMEM
usb: host: xhci: don't print on ENOMEM
usb: misc: adutux: don't print on ENOMEM
usb: misc: appledisplay: don't print on ENOMEM
usb: misc: cypress_cy7c63: don't print on ENOMEM
usb: misc: cytherm: don't print on ENOMEM
usb: misc: ftdi-elan: don't print on ENOMEM
usb: misc: idmouse: don't print on ENOMEM
usb: misc: iowarrior: don't print on ENOMEM
usb: misc: ldusb: don't print on ENOMEM
usb: misc: legousbtower: don't print on ENOMEM
usb: misc: lvstest: don't print on ENOMEM
usb: misc: trancevibrator: don't print on ENOMEM
usb: misc: usblcd: don't print on ENOMEM
usb: misc: usbsevseg: don't print on ENOMEM
usb: misc: uss720: don't print on ENOMEM
usb: misc: yurex: don't print on ENOMEM
usb: musb: am35x: don't print on ENOMEM
usb: musb: da8xx: don't print on ENOMEM
usb: renesas_usbhs: mod_gadget: don't print on ENOMEM
usb: renesas_usbhs: mod_host: don't print on ENOMEM
usb: renesas_usbhs: pipe: don't print on ENOMEM
usb: storage: alauda: don't print on ENOMEM
usb: storage: sddr09: don't print on ENOMEM
usb: usb-skeleton: don't print on ENOMEM
usb: wusbcore: crypto: don't print on ENOMEM
usb: wusbcore: security: don't print on ENOMEM
usb: wusbcore: wa-nep: don't print on ENOMEM
drivers/usb/atm/cxacru.c | 4 +---
drivers/usb/atm/speedtch.c | 1 -
drivers/usb/atm/ueagle-atm.c | 9 ++-------
drivers/usb/atm/usbatm.c | 7 +------
drivers/usb/class/usbtmc.c | 4 +---
drivers/usb/core/hcd.c | 4 +---
drivers/usb/core/hub.c | 9 +++------
drivers/usb/core/message.c | 5 +----
drivers/usb/core/urb.c | 4 +---
drivers/usb/dwc2/gadget.c | 8 ++------
drivers/usb/gadget/udc/fsl_qe_udc.c | 16 ++++------------
drivers/usb/gadget/udc/goku_udc.c | 3 +--
drivers/usb/gadget/udc/udc-xilinx.c | 4 +---
drivers/usb/host/fhci-hcd.c | 4 +---
drivers/usb/host/max3421-hcd.c | 8 ++------
drivers/usb/host/uhci-hcd.c | 5 +----
drivers/usb/host/xhci-tegra.c | 1 -
drivers/usb/host/xhci.c | 4 +---
drivers/usb/misc/adutux.c | 13 +++----------
drivers/usb/misc/appledisplay.c | 3 ---
drivers/usb/misc/cypress_cy7c63.c | 5 +----
drivers/usb/misc/cytherm.c | 32 ++++++++------------------------
drivers/usb/misc/ftdi-elan.c | 1 -
drivers/usb/misc/idmouse.c | 1 -
drivers/usb/misc/iowarrior.c | 20 ++++++--------------
drivers/usb/misc/ldusb.c | 20 +++++---------------
drivers/usb/misc/legousbtower.c | 16 ++++------------
drivers/usb/misc/lvstest.c | 4 +---
drivers/usb/misc/trancevibrator.c | 3 +--
drivers/usb/misc/usblcd.c | 9 ++-------
drivers/usb/misc/usbsevseg.c | 8 ++------
drivers/usb/misc/uss720.c | 4 +---
drivers/usb/misc/yurex.c | 8 ++------
drivers/usb/musb/am35x.c | 4 +---
drivers/usb/musb/da8xx.c | 4 +---
drivers/usb/renesas_usbhs/mod_gadget.c | 6 +-----
drivers/usb/renesas_usbhs/mod_host.c | 10 ++--------
drivers/usb/renesas_usbhs/pipe.c | 4 +---
drivers/usb/storage/alauda.c | 11 +++--------
drivers/usb/storage/sddr09.c | 14 ++++----------
drivers/usb/usb-skeleton.c | 9 ++-------
drivers/usb/wusbcore/crypto.c | 4 +---
drivers/usb/wusbcore/security.c | 4 +---
drivers/usb/wusbcore/wa-nep.c | 5 +----
44 files changed, 78 insertions(+), 244 deletions(-)
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 17/44] usb: host: xhci-tegra: don't print on ENOMEM
[not found] ` <20160825173947.26624-1-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
@ 2016-08-25 17:39 ` Wolfram Sang
[not found] ` <20160825173947.26624-18-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2016-08-25 17:39 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: Wolfram Sang, Mathias Nyman, Greg Kroah-Hartman, Stephen Warren,
Thierry Reding, Alexandre Courbot,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
All kmalloc-based functions print enough information on failures.
Signed-off-by: Wolfram Sang <wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
---
drivers/usb/host/xhci-tegra.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 0f53ae0f464e6d..d39b37be71f01f 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1033,7 +1033,6 @@ static int tegra_xusb_probe(struct platform_device *pdev)
tegra->phys = devm_kcalloc(&pdev->dev, tegra->num_phys,
sizeof(*tegra->phys), GFP_KERNEL);
if (!tegra->phys) {
- dev_err(&pdev->dev, "failed to allocate PHY array\n");
err = -ENOMEM;
goto put_padctl;
}
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 00/44] usb: don't print on ENOMEM
2016-08-25 17:38 [PATCH 00/44] usb: don't print on ENOMEM Wolfram Sang
[not found] ` <20160825173947.26624-1-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
@ 2016-08-26 6:27 ` Lothar Waßmann
1 sibling, 0 replies; 4+ messages in thread
From: Lothar Waßmann @ 2016-08-26 6:27 UTC (permalink / raw)
To: Wolfram Sang
Cc: legousb-devel, usb-storage, linux-usb, accessrunner-general,
linux-tegra, linuxppc-dev, linux-arm-kernel
Hi,
On Thu, 25 Aug 2016 19:38:52 +0200 Wolfram Sang wrote:
> Here is my next series to save memory by removing unneeded strings. It removes
> in the usb subsystem all unspecific error messages after calling malloc-based
> functions, i.e. (devm_)k[zcm]alloc. kmalloc prints enough information in that
> case. If the message was specific (e.g. "can't save CLEAR_TT_BUFFER state"), I
> left it. This series saves ~4.5KB of "out of memory" permutations in .text and
> .rodata. For modified lines, (x == NULL) was replaced with (!NULL) as well.
s/!NULL/!x/
Lothar Waßmann
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 17/44] usb: host: xhci-tegra: don't print on ENOMEM
[not found] ` <20160825173947.26624-18-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
@ 2016-09-05 9:23 ` Thierry Reding
0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2016-09-05 9:23 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Mathias Nyman,
Greg Kroah-Hartman, Stephen Warren, Alexandre Courbot,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
On Thu, Aug 25, 2016 at 07:39:09PM +0200, Wolfram Sang wrote:
> All kmalloc-based functions print enough information on failures.
>
> Signed-off-by: Wolfram Sang <wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
> ---
> drivers/usb/host/xhci-tegra.c | 1 -
> 1 file changed, 1 deletion(-)
Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-05 9:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-25 17:38 [PATCH 00/44] usb: don't print on ENOMEM Wolfram Sang
[not found] ` <20160825173947.26624-1-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
2016-08-25 17:39 ` [PATCH 17/44] usb: host: xhci-tegra: " Wolfram Sang
[not found] ` <20160825173947.26624-18-wsa-dev-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>
2016-09-05 9:23 ` Thierry Reding
2016-08-26 6:27 ` [PATCH 00/44] usb: " Lothar Waßmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).