usb: common: fix all alignment warnings in usb-otg-fsm.c
Subsystems (2)
PATCH 1/1 usb: common: fix all alignment warnings in usb-otg-fsm.c
Hi Peter,
This is my first small contribution to the USB subsystem.
Fixed all "Alignment should match open parenthesis" warnings in usb-otg-fsm.c, as
reported by checkpatch.pl
--- drivers/usb/common/usb-otg-fsm.c | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-)
drivers/usb/common/usb-otg-fsm.c +21 -21
@@ -32,7 +32,7 @@ static int otg_set_protocol(struct otg_fsm *fsm, int protocol)if (fsm->protocol != protocol) {VDBG ("Changing role fsm->protocol= %d; new protocol= %d\n" , - fsm->protocol, protocol); + fsm->protocol, protocol);/* stop old protocol */ if (fsm->protocol ==PROTO_HOST ) ret =otg_start_host (fsm,0 );
@@ -139,14 +139,14 @@ static void otg_hnp_polling_work(struct work_struct *work) *fsm->host_req_flag =0 ;/* Get host request flag from connected USB device */ retval =usb_control_msg (udev, -usb_rcvctrlpipe (udev,0 ), -USB_REQ_GET_STATUS , -USB_DIR_IN |USB_RECIP_DEVICE , -0 , -OTG_STS_SELECTOR , - fsm->host_req_flag, -1 , -USB_CTRL_GET_TIMEOUT ); +usb_rcvctrlpipe (udev,0 ), +USB_REQ_GET_STATUS , +USB_DIR_IN |USB_RECIP_DEVICE , +0 , +OTG_STS_SELECTOR , + fsm->host_req_flag, +1 , +USB_CTRL_GET_TIMEOUT );if (retval !=1 ) {dev_err (&udev->dev,"Get one byte OTG status failed\n" );return ;
@@ -156,7 +156,7 @@ static void otg_hnp_polling_work(struct work_struct *work)if (flag ==0 ) {/* Continue HNP polling */ schedule_delayed_work (&fsm->hnp_polling_work, -msecs_to_jiffies (T_HOST_REQ_POLL )); +msecs_to_jiffies (T_HOST_REQ_POLL ));return ; }else if (flag !=HOST_REQUEST_FLAG ) {dev_err (&udev->dev,"host request flag %d is invalid\n" , flag);
@@ -168,11 +168,11 @@ static void otg_hnp_polling_work(struct work_struct *work)/* Set b_hnp_enable */ if (!fsm->otg->host->b_hnp_enable) { retval =usb_control_msg (udev, -usb_sndctrlpipe (udev,0 ), -USB_REQ_SET_FEATURE ,0 , -USB_DEVICE_B_HNP_ENABLE , -0 ,NULL ,0 , -USB_CTRL_SET_TIMEOUT ); +usb_sndctrlpipe (udev,0 ), +USB_REQ_SET_FEATURE ,0 , +USB_DEVICE_B_HNP_ENABLE , +0 ,NULL ,0 , +USB_CTRL_SET_TIMEOUT );if (retval >=0 ) fsm->otg->host->b_hnp_enable =1 ; }
@@ -199,7 +199,7 @@ static void otg_start_hnp_polling(struct otg_fsm *fsm) }schedule_delayed_work (&fsm->hnp_polling_work, -msecs_to_jiffies (T_HOST_REQ_POLL )); +msecs_to_jiffies (T_HOST_REQ_POLL )); }/* Called when entering a state */
@@ -249,7 +249,7 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)otg_loc_sof (fsm,1 );otg_set_protocol (fsm,PROTO_HOST );usb_bus_start_enum (fsm->otg->host, - fsm->otg->host->otg_port); + fsm->otg->host->otg_port);otg_start_hnp_polling (fsm);break ;case OTG_STATE_A_IDLE :
@@ -349,7 +349,7 @@ int otg_statemachine(struct otg_fsm *fsm)else if (fsm->b_sess_vld && fsm->otg->gadget)otg_set_state (fsm,OTG_STATE_B_PERIPHERAL );else if ((fsm->b_bus_req || fsm->adp_change || fsm->power_up) && - fsm->b_ssend_srp && fsm->b_se0_srp) + fsm->b_ssend_srp && fsm->b_se0_srp)otg_set_state (fsm,OTG_STATE_B_SRP_INIT );break ;case OTG_STATE_B_SRP_INIT :
@@ -383,14 +383,14 @@ int otg_statemachine(struct otg_fsm *fsm)if (fsm->id)otg_set_state (fsm,OTG_STATE_B_IDLE );else if (!fsm->a_bus_drop && (fsm->a_bus_req || - fsm->a_srp_det || fsm->adp_change || fsm->power_up)) + fsm->a_srp_det || fsm->adp_change || fsm->power_up))otg_set_state (fsm,OTG_STATE_A_WAIT_VRISE );break ;case OTG_STATE_A_WAIT_VRISE :if (fsm->a_vbus_vld)otg_set_state (fsm,OTG_STATE_A_WAIT_BCON );else if (fsm->id || fsm->a_bus_drop || - fsm->a_wait_vrise_tmout) + fsm->a_wait_vrise_tmout)otg_set_state (fsm,OTG_STATE_A_WAIT_VFALL );break ;case OTG_STATE_A_WAIT_BCON :
@@ -405,7 +405,7 @@ int otg_statemachine(struct otg_fsm *fsm)if (fsm->id || fsm->a_bus_drop)otg_set_state (fsm,OTG_STATE_A_WAIT_VFALL );else if ((!fsm->a_bus_req || fsm->a_suspend_req_inf) && - fsm->otg->host->b_hnp_enable) + fsm->otg->host->b_hnp_enable)otg_set_state (fsm,OTG_STATE_A_SUSPEND );else if (!fsm->b_conn)otg_set_state (fsm,OTG_STATE_A_WAIT_BCON );
Signature · 1 line
2.51.0
Greg KH
maintainerQuoted 3 lines · Stanisław Maciej Molsa
Hi Peter,
This is my first small contribution to the USB subsystem.
No need for this here.
Quoted 15 lines
Fixed all "Alignment should match open parenthesis" warnings in
usb-otg-fsm.c, as
reported by checkpatch.plSigned-off-by Stanisław Maciej Molsa <[email protected]>--- drivers/usb/common/usb-otg-fsm.c | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-)drivers/usb/common/usb-otg-fsm.c +0
-0
drivers/usb/common/usb-otg-fsm.c static int otg_set_protocol(struct otg_fsm *fsm, int protocol) · line 35
Quoted 5 lines
drivers/usb/common/usb-otg-fsm.c +1
-1@@ -32,7 +32,7 @@ static int otg_set_protocol(struct otg_fsm *fsm, int protocol)if (fsm->protocol != protocol) {VDBG ("Changing role fsm->protocol= %d; new protocol= %d\n" , - fsm->protocol, protocol); + fsm->protocol, protocol);
Please do not do coding style changes EXCEPT in subsystems that specifically ask for them to be done in (like drivers/staging/), otherwise there will be nothing but constant churn in the kernel tree.
thanks,
greg k-h