Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC Bus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC Bus
Commits
977a7f49
Commit
977a7f49
authored
Feb 07, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: fix checkpatch warnings in kernel files
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
308449f6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
33 deletions
+28
-33
fmc-chardev.c
kernel/fmc-chardev.c
+2
-2
fmc-core.c
kernel/fmc-core.c
+8
-7
fmc-dump.c
kernel/fmc-dump.c
+8
-10
fmc-fakedev.c
kernel/fmc-fakedev.c
+0
-7
fmc-match.c
kernel/fmc-match.c
+1
-1
fmc-sdb.c
kernel/fmc-sdb.c
+6
-3
fmc-trivial.c
kernel/fmc-trivial.c
+1
-1
fmc-write-eeprom.c
kernel/fmc-write-eeprom.c
+2
-2
No files found.
kernel/fmc-chardev.c
View file @
977a7f49
...
...
@@ -15,7 +15,7 @@
#include <linux/miscdevice.h>
#include <linux/spinlock.h>
#include <linux/fmc.h>
#include <
asm
/uaccess.h>
#include <
linux
/uaccess.h>
static
LIST_HEAD
(
fc_devices
);
static
DEFINE_SPINLOCK
(
fc_lock
);
...
...
@@ -96,7 +96,7 @@ static ssize_t fc_write(struct file *f, const char __user *buf, size_t count,
return
count
;
}
static
struct
file_operations
fc_fops
=
{
static
const
struct
file_operations
fc_fops
=
{
.
open
=
fc_open
,
.
release
=
fc_release
,
.
llseek
=
generic_file_llseek
,
...
...
kernel/fmc-core.c
View file @
977a7f49
...
...
@@ -30,7 +30,7 @@ static int fmc_check_version(unsigned long version, const char *name)
static
int
fmc_uevent
(
struct
device
*
dev
,
struct
kobj_uevent_env
*
env
)
{
/
/struct fmc_device *fdev = to_fmc_device(dev);
/
* struct fmc_device *fdev = to_fmc_device(dev); */
/* FIXME: The MODALIAS */
add_uevent_var
(
env
,
"MODALIAS=%s"
,
"fmc"
);
...
...
@@ -68,7 +68,7 @@ static struct bus_type fmc_bus_type = {
};
/* Every device must have a release method: provide a default */
static
void
__fmc_release
(
struct
device
*
dev
){
}
static
void
__fmc_release
(
struct
device
*
dev
)
{
}
/* This is needed as parent for our devices and dir in sysfs */
struct
device
fmc_bus
=
{
...
...
@@ -109,8 +109,9 @@ int fmc_device_register_n(struct fmc_device *fmcs, int n)
if
(
fmc_check_version
(
fmcs
->
version
,
fmcs
->
carrier_name
))
return
-
EINVAL
;
devarray
=
kmalloc
(
n
*
sizeof
(
*
devarray
),
GFP_KERNEL
);
if
(
!
devarray
)
return
-
ENOMEM
;
devarray
=
kmalloc
(
n
*
sizeof
(
*
devarray
),
GFP_KERNEL
);
if
(
!
devarray
)
return
-
ENOMEM
;
/* Make all other checks before continuing, for all devices */
for
(
i
=
0
,
fmc
=
fmcs
;
i
<
n
;
i
++
,
fmc
++
)
{
...
...
@@ -128,11 +129,11 @@ int fmc_device_register_n(struct fmc_device *fmcs, int n)
}
if
(
!
fmc
->
carrier_name
||
!
fmc
->
carrier_data
||
\
!
fmc
->
device_id
)
{
dev_err
(
fmc
->
hwdev
,
"carrier name and data, and dev_id"
"
must all be
set
\n
"
);
dev_err
(
fmc
->
hwdev
,
"
carrier name, data or dev_id not
set
\n
"
);
ret
=
-
EINVAL
;
}
if
(
ret
)
if
(
ret
)
break
;
fmc
->
nr_slots
=
n
;
...
...
kernel/fmc-dump.c
View file @
977a7f49
...
...
@@ -26,7 +26,7 @@ static uint8_t *dump_line(int addr, uint8_t *line, uint8_t *prev)
int
i
;
if
(
!
prev
||
memcmp
(
line
,
prev
,
LINELEN
))
{
pr
intk
(
"%04x: "
,
addr
);
pr
_info
(
"%04x: "
,
addr
);
for
(
i
=
0
;
i
<
LINELEN
;
)
{
printk
(
"%02x"
,
line
[
i
]);
i
++
;
...
...
@@ -36,7 +36,7 @@ static uint8_t *dump_line(int addr, uint8_t *line, uint8_t *prev)
}
/* repeated line */
if
(
line
==
prev
+
LINELEN
)
pr
intk
(
"[...]
\n
"
);
pr
_info
(
"[...]
\n
"
);
return
prev
;
}
...
...
@@ -48,16 +48,15 @@ void fmc_dump_eeprom(struct fmc_device *fmc)
if
(
!
fmc_must_dump_eeprom
)
return
;
pr
intk
(
"FMC: mezzanine %i: %s on %s
\n
"
,
fmc
->
slot_id
,
pr
_info
(
"FMC: mezzanine %i: %s on %s
\n
"
,
fmc
->
slot_id
,
dev_name
(
fmc
->
hwdev
),
fmc
->
carrier_name
);
pr
intk
(
"FMC: dumping eeprom 0x%x (%i) bytes
\n
"
,
fmc
->
eeprom_len
,
pr
_info
(
"FMC: dumping eeprom 0x%x (%i) bytes
\n
"
,
fmc
->
eeprom_len
,
fmc
->
eeprom_len
);
line
=
fmc
->
eeprom
;
prev
=
NULL
;
for
(
i
=
0
;
i
<
fmc
->
eeprom_len
;
i
+=
LINELEN
,
line
+=
LINELEN
)
{
for
(
i
=
0
;
i
<
fmc
->
eeprom_len
;
i
+=
LINELEN
,
line
+=
LINELEN
)
prev
=
dump_line
(
i
,
line
,
prev
);
}
}
void
fmc_dump_sdb
(
struct
fmc_device
*
fmc
)
...
...
@@ -86,15 +85,14 @@ void fmc_dump_sdb(struct fmc_device *fmc)
*
* So, lazily, just dump the top-level array
*/
pr
intk
(
"FMC: mezzanine %i: %s on %s
\n
"
,
fmc
->
slot_id
,
pr
_info
(
"FMC: mezzanine %i: %s on %s
\n
"
,
fmc
->
slot_id
,
dev_name
(
fmc
->
hwdev
),
fmc
->
carrier_name
);
pr
intk
(
"FMC: poor dump of sdb first level:
\n
"
);
pr
_info
(
"FMC: poor dump of sdb first level:
\n
"
);
len
=
fmc
->
sdb
->
len
*
sizeof
(
union
sdb_record
);
line
=
(
void
*
)
fmc
->
sdb
->
record
;
prev
=
NULL
;
for
(
i
=
0
;
i
<
len
;
i
+=
LINELEN
,
line
+=
LINELEN
)
{
for
(
i
=
0
;
i
<
len
;
i
+=
LINELEN
,
line
+=
LINELEN
)
prev
=
dump_line
(
i
,
line
,
prev
);
}
return
;
}
kernel/fmc-fakedev.c
View file @
977a7f49
...
...
@@ -257,13 +257,6 @@ int ff_init(void)
device_unregister
(
&
ff
->
dev
);
return
ret
;
}
//schedule_delayed_work(&ff->work, HZ * 2); /* remove, replug, in 2s */
return
ret
;
}
...
...
kernel/fmc-match.c
View file @
977a7f49
...
...
@@ -75,7 +75,7 @@ int fmc_fill_id_info(struct fmc_device *fmc)
goto
out
;
}
if
(
!
fru_header_cksum_ok
(
h
))
{
dev_warn
(
fmc
->
hwdev
,
"FRU: wrong header checksum
\n
"
);
dev_warn
(
fmc
->
hwdev
,
"FRU: wrong header checksum
\n
"
);
goto
out
;
}
bia
=
fru_get_board_area
(
h
);
...
...
kernel/fmc-sdb.c
View file @
977a7f49
...
...
@@ -104,7 +104,8 @@ static void __fmc_sdb_free(struct sdb_array *arr)
{
int
i
,
n
;
if
(
!
arr
)
return
;
if
(
!
arr
)
return
;
n
=
arr
->
len
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
if
(
IS_ERR
(
arr
->
subtree
[
i
]))
...
...
@@ -165,9 +166,10 @@ static void __fmc_show_sdb_tree(struct fmc_device *fmc, struct sdb_array *arr)
for
(
ap
=
arr
;
ap
;
ap
=
ap
->
parent
)
base
+=
ap
->
baseaddr
;
dev_info
(
fmc
->
hwdev
,
"SDB: "
);
for
(
j
=
0
;
j
<
level
;
j
++
)
printk
(
" "
);
switch
(
r
->
empty
.
record_type
)
{
switch
(
r
->
empty
.
record_type
)
{
case
sdb_type_interconnect
:
printk
(
"%08llx:%08x %.19s
\n
"
,
__be64_to_cpu
(
p
->
vendor_id
),
...
...
@@ -246,7 +248,8 @@ signed long fmc_find_sdb_device(struct sdb_array *tree,
/* found */
last
=
__be64_to_cpu
(
c
->
addr_last
);
first
=
__be64_to_cpu
(
c
->
addr_first
);
if
(
sz
)
*
sz
=
(
typeof
(
*
sz
))(
last
+
1
-
first
);
if
(
sz
)
*
sz
=
(
typeof
(
*
sz
))(
last
+
1
-
first
);
return
first
+
tree
->
baseaddr
;
}
return
res
;
...
...
kernel/fmc-trivial.c
View file @
977a7f49
...
...
@@ -47,7 +47,7 @@ int t_probe(struct fmc_device *fmc)
/* Reprogram, if asked to. ESRCH == no filename specified */
ret
=
-
ESRCH
;
if
(
fmc
->
op
->
reprogram
)
ret
=
fmc
->
op
->
reprogram
(
fmc
,
&
t_drv
,
""
);
ret
=
fmc
->
op
->
reprogram
(
fmc
,
&
t_drv
,
""
);
if
(
ret
==
-
ESRCH
)
ret
=
0
;
if
(
ret
<
0
)
...
...
kernel/fmc-write-eeprom.c
View file @
977a7f49
...
...
@@ -84,9 +84,9 @@ static int fwe_run(struct fmc_device *fmc, const struct firmware *fw, char *s)
char
*
last4
=
s
+
strlen
(
s
)
-
4
;
int
err
;
if
(
!
strcmp
(
last4
,
".bin"
))
if
(
!
strcmp
(
last4
,
".bin"
))
return
fwe_run_bin
(
fmc
,
fw
);
if
(
!
strcmp
(
last4
,
".tlv"
))
{
if
(
!
strcmp
(
last4
,
".tlv"
))
{
err
=
fwe_run_tlv
(
fmc
,
fw
,
0
);
if
(
!
err
)
err
=
fwe_run_tlv
(
fmc
,
fw
,
1
);
...
...
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