Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
97d6104b
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看板
提交
97d6104b
编写于
5月 16, 2012
作者:
A
Artem Bityutskiy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UBI: rename few functions for consistency
Signed-off-by:
N
Artem Bityutskiy
<
artem.bityutskiy@linux.intel.com
>
上级
e2986827
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
15 addition
and
14 deletion
+15
-14
drivers/mtd/ubi/debug.h
drivers/mtd/ubi/debug.h
+2
-3
drivers/mtd/ubi/io.c
drivers/mtd/ubi/io.c
+11
-9
drivers/mtd/ubi/wl.c
drivers/mtd/ubi/wl.c
+2
-2
未找到文件。
drivers/mtd/ubi/debug.h
浏览文件 @
97d6104b
...
...
@@ -62,9 +62,8 @@ void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx);
void
ubi_dump_sv
(
const
struct
ubi_scan_volume
*
sv
);
void
ubi_dump_seb
(
const
struct
ubi_scan_leb
*
seb
,
int
type
);
void
ubi_dump_mkvol_req
(
const
struct
ubi_mkvol_req
*
req
);
int
ubi_dbg_check_all_ff
(
struct
ubi_device
*
ubi
,
int
pnum
,
int
offset
,
int
len
);
int
ubi_dbg_check_write
(
struct
ubi_device
*
ubi
,
const
void
*
buf
,
int
pnum
,
int
offset
,
int
len
);
int
ubi_self_check_all_ff
(
struct
ubi_device
*
ubi
,
int
pnum
,
int
offset
,
int
len
);
int
ubi_debugging_init_dev
(
struct
ubi_device
*
ubi
);
void
ubi_debugging_exit_dev
(
struct
ubi_device
*
ubi
);
int
ubi_debugfs_init
(
void
);
...
...
drivers/mtd/ubi/io.c
浏览文件 @
97d6104b
...
...
@@ -98,6 +98,8 @@ static int self_check_ec_hdr(const struct ubi_device *ubi, int pnum,
static
int
self_check_peb_vid_hdr
(
const
struct
ubi_device
*
ubi
,
int
pnum
);
static
int
self_check_vid_hdr
(
const
struct
ubi_device
*
ubi
,
int
pnum
,
const
struct
ubi_vid_hdr
*
vid_hdr
);
static
int
self_check_write
(
struct
ubi_device
*
ubi
,
const
void
*
buf
,
int
pnum
,
int
offset
,
int
len
);
/**
* ubi_io_read - read data from a physical eraseblock.
...
...
@@ -254,7 +256,7 @@ int ubi_io_write(struct ubi_device *ubi, const void *buf, int pnum, int offset,
return
err
;
/* The area we are writing to has to contain all 0xFF bytes */
err
=
ubi_
dbg
_check_all_ff
(
ubi
,
pnum
,
offset
,
len
);
err
=
ubi_
self
_check_all_ff
(
ubi
,
pnum
,
offset
,
len
);
if
(
err
)
return
err
;
...
...
@@ -289,7 +291,7 @@ int ubi_io_write(struct ubi_device *ubi, const void *buf, int pnum, int offset,
ubi_assert
(
written
==
len
);
if
(
!
err
)
{
err
=
ubi_dbg
_check_write
(
ubi
,
buf
,
pnum
,
offset
,
len
);
err
=
self
_check_write
(
ubi
,
buf
,
pnum
,
offset
,
len
);
if
(
err
)
return
err
;
...
...
@@ -300,7 +302,7 @@ int ubi_io_write(struct ubi_device *ubi, const void *buf, int pnum, int offset,
offset
+=
len
;
len
=
ubi
->
peb_size
-
offset
;
if
(
len
)
err
=
ubi_
dbg
_check_all_ff
(
ubi
,
pnum
,
offset
,
len
);
err
=
ubi_
self
_check_all_ff
(
ubi
,
pnum
,
offset
,
len
);
}
return
err
;
...
...
@@ -382,7 +384,7 @@ static int do_sync_erase(struct ubi_device *ubi, int pnum)
return
-
EIO
;
}
err
=
ubi_
dbg
_check_all_ff
(
ubi
,
pnum
,
0
,
ubi
->
peb_size
);
err
=
ubi_
self
_check_all_ff
(
ubi
,
pnum
,
0
,
ubi
->
peb_size
);
if
(
err
)
return
err
;
...
...
@@ -1316,7 +1318,7 @@ static int self_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum)
}
/**
*
ubi_dbg
_check_write - make sure write succeeded.
*
self
_check_write - make sure write succeeded.
* @ubi: UBI device description object
* @buf: buffer with data which were written
* @pnum: physical eraseblock number the data were written to
...
...
@@ -1327,7 +1329,7 @@ static int self_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum)
* the original data buffer - the data have to match. Returns zero if the data
* match and a negative error code if not or in case of failure.
*/
int
ubi_dbg
_check_write
(
struct
ubi_device
*
ubi
,
const
void
*
buf
,
int
pnum
,
static
int
self
_check_write
(
struct
ubi_device
*
ubi
,
const
void
*
buf
,
int
pnum
,
int
offset
,
int
len
)
{
int
err
,
i
;
...
...
@@ -1382,7 +1384,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum,
}
/**
* ubi_
dbg
_check_all_ff - check that a region of flash is empty.
* ubi_
self
_check_all_ff - check that a region of flash is empty.
* @ubi: UBI device description object
* @pnum: the physical eraseblock number to check
* @offset: the starting offset within the physical eraseblock to check
...
...
@@ -1392,7 +1394,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum,
* @offset of the physical eraseblock @pnum, and a negative error code if not
* or if an error occurred.
*/
int
ubi_
dbg
_check_all_ff
(
struct
ubi_device
*
ubi
,
int
pnum
,
int
offset
,
int
len
)
int
ubi_
self
_check_all_ff
(
struct
ubi_device
*
ubi
,
int
pnum
,
int
offset
,
int
len
)
{
size_t
read
;
int
err
;
...
...
drivers/mtd/ubi/wl.c
浏览文件 @
97d6104b
...
...
@@ -414,7 +414,7 @@ int ubi_wl_get_peb(struct ubi_device *ubi)
prot_queue_add
(
ubi
,
e
);
spin_unlock
(
&
ubi
->
wl_lock
);
err
=
ubi_
dbg
_check_all_ff
(
ubi
,
e
->
pnum
,
ubi
->
vid_hdr_aloffset
,
err
=
ubi_
self
_check_all_ff
(
ubi
,
e
->
pnum
,
ubi
->
vid_hdr_aloffset
,
ubi
->
peb_size
-
ubi
->
vid_hdr_aloffset
);
if
(
err
)
{
ubi_err
(
"new PEB %d does not contain all 0xFF bytes"
,
e
->
pnum
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录