diff mbox series

usb: dwc2: Simplify a bitmap declaration

Message ID a2bf604d26dbe9816fdaae0faf4b4837ecacc6d3.1640245180.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Commit db3e8244bd1c46f5a416fd1e6821036ecc59884a
Headers show
Series usb: dwc2: Simplify a bitmap declaration | expand

Commit Message

Christophe JAILLET Dec. 23, 2021, 7:40 a.m. UTC
Use DECLARE_BITMAP() instead of hand writing it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/usb/dwc2/core.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Minas Harutyunyan Jan. 4, 2022, 7:39 a.m. UTC | #1
On 12/23/2021 11:40 AM, Christophe JAILLET wrote:
> Use DECLARE_BITMAP() instead of hand writing it.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>

> ---
>   drivers/usb/dwc2/core.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
> index e2fe64239328..8a63da3ab39d 100644
> --- a/drivers/usb/dwc2/core.h
> +++ b/drivers/usb/dwc2/core.h
> @@ -1154,8 +1154,7 @@ struct dwc2_hsotg {
>   	struct list_head periodic_sched_queued;
>   	struct list_head split_order;
>   	u16 periodic_usecs;
> -	unsigned long hs_periodic_bitmap[
> -		DIV_ROUND_UP(DWC2_HS_SCHEDULE_US, BITS_PER_LONG)];
> +	DECLARE_BITMAP(hs_periodic_bitmap, DWC2_HS_SCHEDULE_US);
>   	u16 periodic_qh_count;
>   	bool new_connection;
>
diff mbox series

Patch

diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index e2fe64239328..8a63da3ab39d 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -1154,8 +1154,7 @@  struct dwc2_hsotg {
 	struct list_head periodic_sched_queued;
 	struct list_head split_order;
 	u16 periodic_usecs;
-	unsigned long hs_periodic_bitmap[
-		DIV_ROUND_UP(DWC2_HS_SCHEDULE_US, BITS_PER_LONG)];
+	DECLARE_BITMAP(hs_periodic_bitmap, DWC2_HS_SCHEDULE_US);
 	u16 periodic_qh_count;
 	bool new_connection;