Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword
On Wed, Dec 09, 2015 at 07:32:34PM -0300, Geyslan G. Bem wrote: > Prefer to use __aligned(size) macro instead of > __attribute__((aligned(size))). > > Caught by checkpatch: "WARNING" Not sure about the WARNING here, maybe just remove this line? > > Signed-off-by: Geyslan G. BemAs with previous, missing the changelog, but other than that the patch looks good to me. Acked-by: Peter Senna Tschudin > --- > drivers/usb/host/ehci.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index 945000a..7b2b213 100644 > --- a/drivers/usb/host/ehci.h > +++ b/drivers/usb/host/ehci.h > @@ -324,7 +324,7 @@ struct ehci_qtd { > struct list_headqtd_list; /* sw qtd list */ > struct urb *urb; /* qtd's urb */ > size_t length; /* length of buffer */ > -} __attribute__ ((aligned (32))); > +} __aligned(32); > > /* mask NakCnt+T in qh->hw_alt_next */ > #define QTD_MASK(ehci) cpu_to_hc32(ehci, ~0x1f) > @@ -407,7 +407,7 @@ struct ehci_qh_hw { > __hc32 hw_token; > __hc32 hw_buf[5]; > __hc32 hw_buf_hi[5]; > -} __attribute__ ((aligned(32))); > +} __aligned(32); > > struct ehci_qh { > struct ehci_qh_hw *hw;/* Must come first */ > @@ -535,7 +535,7 @@ struct ehci_itd { > unsignedframe; /* where scheduled */ > unsignedpg; > unsignedindex[8]; /* in urb->iso_frame_desc */ > -} __attribute__ ((aligned (32))); > +} __aligned(32); > > /*-*/ > > @@ -578,7 +578,7 @@ struct ehci_sitd { > struct list_headsitd_list; /* list of stream's sitds */ > unsignedframe; > unsignedindex; > -} __attribute__ ((aligned (32))); > +} __aligned(32); > > /*-*/ > > @@ -598,7 +598,7 @@ struct ehci_fstn { > /* the rest is HCD-private */ > dma_addr_t fstn_dma; > union ehci_shadow fstn_next; /* ptr to periodic q entry */ > -} __attribute__ ((aligned (32))); > +} __aligned(32); > > /*-*/ > > -- > 2.6.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword
2015-12-10 7:01 GMT-03:00 Peter Senna Tschudin: > On Wed, Dec 09, 2015 at 07:32:34PM -0300, Geyslan G. Bem wrote: >> Prefer to use __aligned(size) macro instead of >> __attribute__((aligned(size))). >> >> Caught by checkpatch: "WARNING" > Not sure about the WARNING here, maybe just remove this line? Or just to be changed to "Caught by checkpatch." > >> >> Signed-off-by: Geyslan G. Bem > As with previous, missing the changelog, but other than that the patch > looks good to me. > > Acked-by: Peter Senna Tschudin >> --- >> drivers/usb/host/ehci.h | 10 +- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h >> index 945000a..7b2b213 100644 >> --- a/drivers/usb/host/ehci.h >> +++ b/drivers/usb/host/ehci.h >> @@ -324,7 +324,7 @@ struct ehci_qtd { >> struct list_headqtd_list; /* sw qtd list */ >> struct urb *urb; /* qtd's urb */ >> size_t length; /* length of buffer */ >> -} __attribute__ ((aligned (32))); >> +} __aligned(32); >> >> /* mask NakCnt+T in qh->hw_alt_next */ >> #define QTD_MASK(ehci) cpu_to_hc32(ehci, ~0x1f) >> @@ -407,7 +407,7 @@ struct ehci_qh_hw { >> __hc32 hw_token; >> __hc32 hw_buf[5]; >> __hc32 hw_buf_hi[5]; >> -} __attribute__ ((aligned(32))); >> +} __aligned(32); >> >> struct ehci_qh { >> struct ehci_qh_hw *hw;/* Must come first */ >> @@ -535,7 +535,7 @@ struct ehci_itd { >> unsignedframe; /* where scheduled */ >> unsignedpg; >> unsignedindex[8]; /* in urb->iso_frame_desc */ >> -} __attribute__ ((aligned (32))); >> +} __aligned(32); >> >> >> /*-*/ >> >> @@ -578,7 +578,7 @@ struct ehci_sitd { >> struct list_headsitd_list; /* list of stream's sitds */ >> unsignedframe; >> unsignedindex; >> -} __attribute__ ((aligned (32))); >> +} __aligned(32); >> >> >> /*-*/ >> >> @@ -598,7 +598,7 @@ struct ehci_fstn { >> /* the rest is HCD-private */ >> dma_addr_t fstn_dma; >> union ehci_shadow fstn_next; /* ptr to periodic q entry */ >> -} __attribute__ ((aligned (32))); >> +} __aligned(32); >> >> >> /*-*/ >> >> -- >> 2.6.3 >> -- Regards, Geyslan G. Bem hackingbits.com -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword
Prefer to use __aligned(size) macro instead of __attribute__((aligned(size))). Caught by checkpatch: "WARNING" Signed-off-by: Geyslan G. Bem--- drivers/usb/host/ehci.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 945000a..7b2b213 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -324,7 +324,7 @@ struct ehci_qtd { struct list_headqtd_list; /* sw qtd list */ struct urb *urb; /* qtd's urb */ size_t length; /* length of buffer */ -} __attribute__ ((aligned (32))); +} __aligned(32); /* mask NakCnt+T in qh->hw_alt_next */ #define QTD_MASK(ehci) cpu_to_hc32(ehci, ~0x1f) @@ -407,7 +407,7 @@ struct ehci_qh_hw { __hc32 hw_token; __hc32 hw_buf[5]; __hc32 hw_buf_hi[5]; -} __attribute__ ((aligned(32))); +} __aligned(32); struct ehci_qh { struct ehci_qh_hw *hw;/* Must come first */ @@ -535,7 +535,7 @@ struct ehci_itd { unsignedframe; /* where scheduled */ unsignedpg; unsignedindex[8]; /* in urb->iso_frame_desc */ -} __attribute__ ((aligned (32))); +} __aligned(32); /*-*/ @@ -578,7 +578,7 @@ struct ehci_sitd { struct list_headsitd_list; /* list of stream's sitds */ unsignedframe; unsignedindex; -} __attribute__ ((aligned (32))); +} __aligned(32); /*-*/ @@ -598,7 +598,7 @@ struct ehci_fstn { /* the rest is HCD-private */ dma_addr_t fstn_dma; union ehci_shadow fstn_next; /* ptr to periodic q entry */ -} __attribute__ ((aligned (32))); +} __aligned(32); /*-*/ -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html