Skip to contentSkip to conversation

USB: core: buffer: fixed the checkpatch warning

PATCH In review Nizam Haider 2 participants 2 messages May 4, 2015 – May 5, 2015 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: core: buffer: fixed the checkpatch warning

Fixed two warnings sizeof name and Blank line after declaration

---
 drivers/usb/core/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/core/buffer.c +2 -1
index 684ef70..04125b6 100644
@@ -62,7 +62,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]) {
@@ -87,6 +87,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.8.1.4
maintainer
#1 lore raw
Quoted 1 line · Nizam Haider

Fixed two warnings sizeof name and Blank line after declaration

That's two different things, please send two different patches.

thanks,

greg k-h