[PATCH v2 09/10] usb: host: ehci-sched: use sizeof operator with parens

2015-12-12 Thread Geyslan G. Bem
This patch adds parens to sizeof operator uses.

Tested by compilation only.
Caught by checkpatch.

Signed-off-by: Geyslan G. Bem 
---
 drivers/usb/host/ehci-sched.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index ff6319b..31fc788 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1028,7 +1028,7 @@ iso_stream_alloc(gfp_t mem_flags)
 {
struct ehci_iso_stream *stream;
 
-   stream = kzalloc(sizeof *stream, mem_flags);
+   stream = kzalloc(sizeof(*stream), mem_flags);
if (likely(stream != NULL)) {
INIT_LIST_HEAD(>td_list);
INIT_LIST_HEAD(>free_list);
@@ -1196,7 +1196,7 @@ static struct ehci_iso_sched *
 iso_sched_alloc(unsigned packets, gfp_t mem_flags)
 {
struct ehci_iso_sched   *iso_sched;
-   int size = sizeof *iso_sched;
+   int size = sizeof(*iso_sched);
 
size += packets * sizeof(struct ehci_iso_packet);
iso_sched = kzalloc(size, mem_flags);
@@ -1315,7 +1315,7 @@ itd_urb_transaction(
}
}
 
-   memset(itd, 0, sizeof *itd);
+   memset(itd, 0, sizeof(*itd));
itd->itd_dma = itd_dma;
itd->frame = NO_FRAME;
list_add(>itd_list, >td_list);
@@ -2109,7 +2109,7 @@ sitd_urb_transaction(
}
}
 
-   memset(sitd, 0, sizeof *sitd);
+   memset(sitd, 0, sizeof(*sitd));
sitd->sitd_dma = sitd_dma;
sitd->frame = NO_FRAME;
list_add(>sitd_list, _sched->td_list);
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 09/10] usb: host: ehci-sched: use sizeof operator with parens

2015-12-12 Thread Geyslan G. Bem
This patch adds parens to sizeof operator uses.

Tested by compilation only.
Caught by checkpatch.

Signed-off-by: Geyslan G. Bem 
---
 drivers/usb/host/ehci-sched.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index ff6319b..31fc788 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1028,7 +1028,7 @@ iso_stream_alloc(gfp_t mem_flags)
 {
struct ehci_iso_stream *stream;
 
-   stream = kzalloc(sizeof *stream, mem_flags);
+   stream = kzalloc(sizeof(*stream), mem_flags);
if (likely(stream != NULL)) {
INIT_LIST_HEAD(>td_list);
INIT_LIST_HEAD(>free_list);
@@ -1196,7 +1196,7 @@ static struct ehci_iso_sched *
 iso_sched_alloc(unsigned packets, gfp_t mem_flags)
 {
struct ehci_iso_sched   *iso_sched;
-   int size = sizeof *iso_sched;
+   int size = sizeof(*iso_sched);
 
size += packets * sizeof(struct ehci_iso_packet);
iso_sched = kzalloc(size, mem_flags);
@@ -1315,7 +1315,7 @@ itd_urb_transaction(
}
}
 
-   memset(itd, 0, sizeof *itd);
+   memset(itd, 0, sizeof(*itd));
itd->itd_dma = itd_dma;
itd->frame = NO_FRAME;
list_add(>itd_list, >td_list);
@@ -2109,7 +2109,7 @@ sitd_urb_transaction(
}
}
 
-   memset(sitd, 0, sizeof *sitd);
+   memset(sitd, 0, sizeof(*sitd));
sitd->sitd_dma = sitd_dma;
sitd->frame = NO_FRAME;
list_add(>sitd_list, _sched->td_list);
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/