Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e319bd62
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e319bd62
编写于
8月 13, 2020
作者:
F
Felipe Balbi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
usb: dwc3: gadget: fix checkpatch warnings
no functional changes Signed-off-by:
N
Felipe Balbi
<
balbi@kernel.org
>
上级
87b923a2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
15 deletion
+17
-15
drivers/usb/dwc3/gadget.c
drivers/usb/dwc3/gadget.c
+17
-15
未找到文件。
drivers/usb/dwc3/gadget.c
浏览文件 @
e319bd62
...
...
@@ -227,7 +227,8 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
* Caller should take care of locking. Issue @cmd with a given @param to @dwc
* and wait for its completion.
*/
int
dwc3_send_gadget_generic_command
(
struct
dwc3
*
dwc
,
unsigned
cmd
,
u32
param
)
int
dwc3_send_gadget_generic_command
(
struct
dwc3
*
dwc
,
unsigned
int
cmd
,
u32
param
)
{
u32
timeout
=
500
;
int
status
=
0
;
...
...
@@ -268,7 +269,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc);
* Caller should handle locking. This function will issue @cmd with given
* @params to @dep and wait for its completion.
*/
int
dwc3_send_gadget_ep_cmd
(
struct
dwc3_ep
*
dep
,
unsigned
cmd
,
int
dwc3_send_gadget_ep_cmd
(
struct
dwc3_ep
*
dep
,
unsigned
int
cmd
,
struct
dwc3_gadget_ep_cmd_params
*
params
)
{
const
struct
usb_endpoint_descriptor
*
desc
=
dep
->
endpoint
.
desc
;
...
...
@@ -564,6 +565,7 @@ static int dwc3_gadget_set_ep_config(struct dwc3_ep *dep, unsigned int action)
/* Burst size is only needed in SuperSpeed mode */
if
(
dwc
->
gadget
.
speed
>=
USB_SPEED_SUPER
)
{
u32
burst
=
dep
->
endpoint
.
maxburst
;
params
.
param0
|=
DWC3_DEPCFG_BURST_SIZE
(
burst
-
1
);
}
...
...
@@ -942,9 +944,10 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep)
}
static
void
__dwc3_prepare_one_trb
(
struct
dwc3_ep
*
dep
,
struct
dwc3_trb
*
trb
,
dma_addr_t
dma
,
unsigned
length
,
unsigned
chain
,
unsigned
node
,
unsigned
stream_id
,
unsigned
short_not_ok
,
unsigned
no_interrupt
,
unsigned
is_last
)
dma_addr_t
dma
,
unsigned
int
length
,
unsigned
int
chain
,
unsigned
int
node
,
unsigned
int
stream_id
,
unsigned
int
short_not_ok
,
unsigned
int
no_interrupt
,
unsigned
int
is_last
)
{
struct
dwc3
*
dwc
=
dep
->
dwc
;
struct
usb_gadget
*
gadget
=
&
dwc
->
gadget
;
...
...
@@ -1060,14 +1063,14 @@ static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb,
*/
static
void
dwc3_prepare_one_trb
(
struct
dwc3_ep
*
dep
,
struct
dwc3_request
*
req
,
unsigned
int
trb_length
,
unsigned
chain
,
unsigned
node
)
unsigned
int
chain
,
unsigned
int
node
)
{
struct
dwc3_trb
*
trb
;
dma_addr_t
dma
;
unsigned
stream_id
=
req
->
request
.
stream_id
;
unsigned
short_not_ok
=
req
->
request
.
short_not_ok
;
unsigned
no_interrupt
=
req
->
request
.
no_interrupt
;
unsigned
is_last
=
req
->
request
.
is_last
;
unsigned
int
stream_id
=
req
->
request
.
stream_id
;
unsigned
int
short_not_ok
=
req
->
request
.
short_not_ok
;
unsigned
int
no_interrupt
=
req
->
request
.
no_interrupt
;
unsigned
int
is_last
=
req
->
request
.
is_last
;
if
(
req
->
request
.
num_sgs
>
0
)
dma
=
sg_dma_address
(
req
->
start_sg
);
...
...
@@ -1109,7 +1112,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,
unsigned
int
maxp
=
usb_endpoint_maxp
(
dep
->
endpoint
.
desc
);
unsigned
int
rem
=
length
%
maxp
;
unsigned
int
trb_length
;
unsigned
chain
=
true
;
unsigned
int
chain
=
true
;
trb_length
=
min_t
(
unsigned
int
,
length
,
sg_dma_len
(
s
));
...
...
@@ -1653,9 +1656,8 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
return
0
;
if
((
dep
->
flags
&
DWC3_EP_PENDING_REQUEST
))
{
if
(
!
(
dep
->
flags
&
DWC3_EP_TRANSFER_STARTED
))
{
if
(
!
(
dep
->
flags
&
DWC3_EP_TRANSFER_STARTED
))
return
__dwc3_gadget_start_isoc
(
dep
);
}
}
}
...
...
@@ -1793,8 +1795,8 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
if
(
value
)
{
struct
dwc3_trb
*
trb
;
unsigned
transfer_in_flight
;
unsigned
started
;
unsigned
int
transfer_in_flight
;
unsigned
int
started
;
if
(
dep
->
number
>
1
)
trb
=
dwc3_ep_prev_trb
(
dep
,
dep
->
trb_enqueue
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录