* [PATCH] Fixing style warnings.
@ 2015-03-03 5:19 cfredric
2015-03-03 7:59 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 2+ messages in thread
From: cfredric @ 2015-03-03 5:19 UTC (permalink / raw)
To: gregkh, stern, bigeasy, linux-usb, linux-kernel
Signed-off-by: cfredric <chris.p.fredrickson@gmail.com>
---
drivers/usb/core/buffer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 506b969..89f2e77 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -70,7 +70,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
size = pool_max[i];
if (!size)
continue;
- snprintf(name, sizeof name, "buffer-%d", size);
+ snprintf(name, sizeof(name), "buffer-%d", size);
hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
size, size, 0);
if (!hcd->pool[i]) {
@@ -95,6 +95,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
struct dma_pool *pool = hcd->pool[i];
+
if (pool) {
dma_pool_destroy(pool);
hcd->pool[i] = NULL;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fixing style warnings.
2015-03-03 5:19 [PATCH] Fixing style warnings cfredric
@ 2015-03-03 7:59 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2015-03-03 7:59 UTC (permalink / raw)
To: cfredric, gregkh, stern, linux-usb, linux-kernel
On 03/03/2015 06:19 AM, cfredric wrote:
> Signed-off-by: cfredric <chris.p.fredrickson@gmail.com>
You could use your full name here.
> ---
> drivers/usb/core/buffer.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
> index 506b969..89f2e77 100644
> --- a/drivers/usb/core/buffer.c
> +++ b/drivers/usb/core/buffer.c
> @@ -70,7 +70,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
> size = pool_max[i];
> if (!size)
> continue;
> - snprintf(name, sizeof name, "buffer-%d", size);
> + snprintf(name, sizeof(name), "buffer-%d", size);
This looks like checkpactch warning you fixed. You could add something
to the patch description that says so.
> hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
> size, size, 0);
> if (!hcd->pool[i]) {
> @@ -95,6 +95,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
>
> for (i = 0; i < HCD_BUFFER_POOLS; i++) {
> struct dma_pool *pool = hcd->pool[i];
> +
This looks unrelated.
> if (pool) {
> dma_pool_destroy(pool);
> hcd->pool[i] = NULL;
>
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-03 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 5:19 [PATCH] Fixing style warnings cfredric
2015-03-03 7:59 ` Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox