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
e5aca378
Commit
e5aca378
authored
Feb 21, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel code: constify where possible (suggested by Emilio)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
209af450
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
13 deletions
+15
-13
fmc-dump.c
kernel/fmc-dump.c
+6
-5
fmc-sdb.c
kernel/fmc-sdb.c
+4
-3
fmc-sdb.h
kernel/include/linux/fmc-sdb.h
+1
-1
fmc.h
kernel/include/linux/fmc.h
+3
-3
ipmi-fru.h
kernel/include/linux/ipmi-fru.h
+1
-1
No files found.
kernel/fmc-dump.c
View file @
e5aca378
...
...
@@ -21,7 +21,8 @@ module_param_named(dump_sdb, fmc_must_dump_sdb, int, 0644);
#define LINELEN 16
/* Dumping 8k takes oh so much: avoid duplicate lines */
static
uint8_t
*
dump_line
(
int
addr
,
uint8_t
*
line
,
uint8_t
*
prev
)
static
const
uint8_t
*
dump_line
(
int
addr
,
const
uint8_t
*
line
,
const
uint8_t
*
prev
)
{
int
i
;
...
...
@@ -40,9 +41,9 @@ static uint8_t *dump_line(int addr, uint8_t *line, uint8_t *prev)
return
prev
;
}
void
fmc_dump_eeprom
(
struct
fmc_device
*
fmc
)
void
fmc_dump_eeprom
(
const
struct
fmc_device
*
fmc
)
{
uint8_t
*
line
,
*
prev
;
const
uint8_t
*
line
,
*
prev
;
int
i
;
if
(
!
fmc_must_dump_eeprom
)
...
...
@@ -59,9 +60,9 @@ void fmc_dump_eeprom(struct fmc_device *fmc)
prev
=
dump_line
(
i
,
line
,
prev
);
}
void
fmc_dump_sdb
(
struct
fmc_device
*
fmc
)
void
fmc_dump_sdb
(
const
struct
fmc_device
*
fmc
)
{
uint8_t
*
line
,
*
prev
;
const
uint8_t
*
line
,
*
prev
;
int
i
,
len
;
if
(
!
fmc
->
sdb
)
...
...
kernel/fmc-sdb.c
View file @
e5aca378
...
...
@@ -149,10 +149,11 @@ int fmc_reprogram(struct fmc_device *fmc, struct fmc_driver *d, char *gw,
}
EXPORT_SYMBOL
(
fmc_reprogram
);
static
void
__fmc_show_sdb_tree
(
struct
fmc_device
*
fmc
,
struct
sdb_array
*
arr
)
static
void
__fmc_show_sdb_tree
(
const
struct
fmc_device
*
fmc
,
const
struct
sdb_array
*
arr
)
{
int
i
,
j
,
n
=
arr
->
len
,
level
=
arr
->
level
;
struct
sdb_array
*
ap
;
const
struct
sdb_array
*
ap
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
unsigned
long
base
;
...
...
@@ -210,7 +211,7 @@ static void __fmc_show_sdb_tree(struct fmc_device *fmc, struct sdb_array *arr)
}
}
void
fmc_show_sdb_tree
(
struct
fmc_device
*
fmc
)
void
fmc_show_sdb_tree
(
const
struct
fmc_device
*
fmc
)
{
if
(
!
fmc
->
sdb
)
return
;
...
...
kernel/include/linux/fmc-sdb.h
View file @
e5aca378
...
...
@@ -30,7 +30,7 @@ struct sdb_array {
};
extern
int
fmc_scan_sdb_tree
(
struct
fmc_device
*
fmc
,
unsigned
long
address
);
extern
void
fmc_show_sdb_tree
(
struct
fmc_device
*
fmc
);
extern
void
fmc_show_sdb_tree
(
const
struct
fmc_device
*
fmc
);
extern
signed
long
fmc_find_sdb_device
(
struct
sdb_array
*
tree
,
uint64_t
vendor
,
uint32_t
device
,
unsigned
long
*
sz
);
extern
int
fmc_free_sdb_tree
(
struct
fmc_device
*
fmc
);
kernel/include/linux/fmc.h
View file @
e5aca378
...
...
@@ -207,7 +207,7 @@ static inline void fmc_writel(struct fmc_device *fmc, uint32_t val, int off)
}
/* pci-like naming */
static
inline
void
*
fmc_get_drvdata
(
struct
fmc_device
*
fmc
)
static
inline
void
*
fmc_get_drvdata
(
const
struct
fmc_device
*
fmc
)
{
return
dev_get_drvdata
(
&
fmc
->
dev
);
}
...
...
@@ -231,7 +231,7 @@ extern void fmc_device_unregister_n(struct fmc_device *fmc, int n);
extern
int
fmc_match
(
struct
device
*
dev
,
struct
device_driver
*
drv
);
extern
int
fmc_fill_id_info
(
struct
fmc_device
*
fmc
);
extern
void
fmc_free_id_info
(
struct
fmc_device
*
fmc
);
extern
void
fmc_dump_eeprom
(
struct
fmc_device
*
fmc
);
extern
void
fmc_dump_sdb
(
struct
fmc_device
*
fmc
);
extern
void
fmc_dump_eeprom
(
const
struct
fmc_device
*
fmc
);
extern
void
fmc_dump_sdb
(
const
struct
fmc_device
*
fmc
);
#endif
/* __LINUX_FMC_H__ */
kernel/include/linux/ipmi-fru.h
View file @
e5aca378
...
...
@@ -77,7 +77,7 @@ enum fru_type {
* some helpers
*/
static
inline
struct
fru_board_info_area
*
fru_get_board_area
(
struct
fru_common_header
*
header
)
const
struct
fru_common_header
*
header
)
{
/* we know for sure that the header is 8 bytes in size */
return
(
struct
fru_board_info_area
*
)(
header
+
header
->
board_area_off
);
...
...
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