Skip to contentSkip to conversation

Fixing style warnings.

PATCH In review cfredric 2 participants 2 messages Mar 3, 2015 USB

lore
Share & tools
lore

cfredric

author
#0 lore raw

PATCH 1/1 Fixing style warnings.

---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/core/buffer.c +2 -1
index 506b969..89f2e77 100644
@@ -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;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 1 line · cfredric

You could use your full name here.

Quoted 9 lines
---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/core/buffer.c +0 -0
index 506b969..89f2e77 100644

drivers/usb/core/buffer.c int hcd_buffer_create(struct usb_hcd *hcd) · line 73

Quoted 5 lines
drivers/usb/core/buffer.c +1 -1
@@ -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.

drivers/usb/core/buffer.c void hcd_buffer_destroy(struct usb_hcd *hcd) · line 98

Quoted 8 lines
drivers/usb/core/buffer.c +1 -0
 		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.

drivers/usb/core/buffer.c void hcd_buffer_destroy(struct usb_hcd *hcd) · line 101

Quoted 4 lines
drivers/usb/core/buffer.c +0 -0
 		if (pool) {
 			dma_pool_destroy(pool);
 			hcd->pool[i] = NULL;

Sebastian