Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
cc71229f
Commit
cc71229f
authored
Mar 19, 2005
by
Thomas Gleixner
Committed by
Thomas Gleixner
May 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] block2mtd: Fix incompatible pointer type
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
50da7f60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
drivers/mtd/devices/block2mtd.c
drivers/mtd/devices/block2mtd.c
+8
-9
No files found.
drivers/mtd/devices/block2mtd.c
View file @
cc71229f
/*
* $Id: block2mtd.c,v 1.2
5 2005/03/07 20:29:05 joern
Exp $
* $Id: block2mtd.c,v 1.2
8 2005/03/19 22:40:44 gleixner
Exp $
*
* block2mtd.c - create an mtd from a block device
*
...
...
@@ -19,7 +19,7 @@
#include <linux/mtd/mtd.h>
#include <linux/buffer_head.h>
#define VERSION "$Revision: 1.2
4
$"
#define VERSION "$Revision: 1.2
8
$"
#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
...
...
@@ -88,7 +88,6 @@ void cache_readahead(struct address_space *mapping, int index)
static
struct
page
*
page_readahead
(
struct
address_space
*
mapping
,
int
index
)
{
filler_t
*
filler
=
(
filler_t
*
)
mapping
->
a_ops
->
readpage
;
//do_page_cache_readahead(mapping, index, XXX, 64);
cache_readahead
(
mapping
,
index
);
return
read_cache_page
(
mapping
,
index
,
filler
,
NULL
);
}
...
...
@@ -369,16 +368,16 @@ static int ustrtoul(const char *cp, char **endp, unsigned int base)
}
static
int
parse_num
32
(
u32
*
num32
,
const
char
*
token
)
static
int
parse_num
(
size_t
*
num
,
const
char
*
token
)
{
char
*
endp
;
unsigned
long
n
;
size_t
n
;
n
=
ustrtoul
(
token
,
&
endp
,
0
);
n
=
(
size_t
)
ustrtoul
(
token
,
&
endp
,
0
);
if
(
*
endp
)
return
-
EINVAL
;
*
num
32
=
n
;
*
num
=
n
;
return
0
;
}
...
...
@@ -421,7 +420,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
char
buf
[
80
+
12
],
*
str
=
buf
;
/* 80 for device, 12 for erase size */
char
*
token
[
2
];
char
*
name
;
u32
erase_size
=
PAGE_SIZE
;
size_t
erase_size
=
PAGE_SIZE
;
int
i
,
ret
;
if
(
strnlen
(
val
,
sizeof
(
buf
))
>=
sizeof
(
buf
))
...
...
@@ -448,7 +447,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
return
0
;
if
(
token
[
1
])
{
ret
=
parse_num
32
(
&
erase_size
,
token
[
1
]);
ret
=
parse_num
(
&
erase_size
,
token
[
1
]);
if
(
ret
)
parse_err
(
"illegal erase size"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment