BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
3b24d517
Commit
3b24d517
authored
Jan 17, 2018
by
David Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mt7697q: Remove explicit __inline
Let the compiler decide what to inline
parent
c4344cb5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
io.c
linux_kernel_modules/mt7697q/io.c
+3
-3
queue.c
linux_kernel_modules/mt7697q/queue.c
+8
-8
No files found.
linux_kernel_modules/mt7697q/io.c
View file @
3b24d517
...
...
@@ -21,7 +21,7 @@
#include "io.h"
#include "spi.h"
static
__inline
bool
mt7697io_busy
(
u16
value
)
static
bool
mt7697io_busy
(
u16
value
)
{
return
BF_GET
(
value
,
MT7697_IO_STATUS_REG_BUSY_OFFSET
,
MT7697_IO_STATUS_REG_BUSY_WIDTH
)
==
...
...
@@ -162,14 +162,14 @@ cleanup:
return
ret
;
}
static
__inline
u8
mt7697io_get_s2m_mbox
(
u16
value
)
static
u8
mt7697io_get_s2m_mbox
(
u16
value
)
{
return
BF_GET
(
value
,
MT7697_IO_S2M_MAILBOX_REG_MAILBOX_OFFSET
,
MT7697_IO_S2M_MAILBOX_REG_MAILBOX_WIDTH
);
}
static
__inline
u16
mt7697io_set_s2m_mbox
(
u8
value
)
static
u16
mt7697io_set_s2m_mbox
(
u8
value
)
{
return
BF_DEFINE
(
value
,
MT7697_IO_S2M_MAILBOX_REG_MAILBOX_OFFSET
,
...
...
linux_kernel_modules/mt7697q/queue.c
View file @
3b24d517
...
...
@@ -21,7 +21,7 @@
#include "queue.h"
#include "spi.h"
static
__inline
ssize_t
mt7697q_buf_diff
(
u32
size
,
u32
from
,
u32
to
)
static
ssize_t
mt7697q_buf_diff
(
u32
size
,
u32
from
,
u32
to
)
{
if
(
from
>=
size
)
{
pr_info
(
"%s(): ERROR from(%u) >= size(%u)
\n
"
,
...
...
@@ -38,13 +38,13 @@ static __inline ssize_t mt7697q_buf_diff(u32 size, u32 from, u32 to)
return
(
from
<=
to
)
?
(
to
-
from
)
:
((
size
-
from
)
+
to
);
}
static
__inline
size_t
mt7697q_get_capacity
(
const
struct
mt7697q_spec
*
qs
)
static
size_t
mt7697q_get_capacity
(
const
struct
mt7697q_spec
*
qs
)
{
return
BF_GET
(
qs
->
data
.
flags
,
MT7697_QUEUE_FLAGS_NUM_WORDS_OFFSET
,
MT7697_QUEUE_FLAGS_NUM_WORDS_WIDTH
)
-
1
;
}
static
__inline
size_t
mt7697q_get_num_words
(
const
struct
mt7697q_spec
*
qs
)
static
size_t
mt7697q_get_num_words
(
const
struct
mt7697q_spec
*
qs
)
{
return
mt7697q_buf_diff
(
BF_GET
(
qs
->
data
.
flags
,
MT7697_QUEUE_FLAGS_NUM_WORDS_OFFSET
,
...
...
@@ -325,7 +325,7 @@ cleanup:
return
ret
;
}
__inline
size_t
mt7697q_get_free_words
(
const
struct
mt7697q_spec
*
qs
)
size_t
mt7697q_get_free_words
(
const
struct
mt7697q_spec
*
qs
)
{
return
mt7697q_get_capacity
(
qs
)
-
mt7697q_get_num_words
(
qs
);
}
...
...
@@ -359,7 +359,7 @@ cleanup:
return
ret
;
}
__inline
int
mt7697q_blocked_writer
(
const
struct
mt7697q_spec
*
qs
)
int
mt7697q_blocked_writer
(
const
struct
mt7697q_spec
*
qs
)
{
return
atomic_read
(
&
qs
->
qinfo
->
blocked_writer
);
}
...
...
@@ -484,7 +484,7 @@ cleanup:
return
ret
;
}
__inline
void
mt7697q_unblock_writer
(
void
*
hndl
)
void
mt7697q_unblock_writer
(
void
*
hndl
)
{
struct
mt7697q_spec
*
qs
=
(
struct
mt7697q_spec
*
)
hndl
;
atomic_set
(
&
qs
->
qinfo
->
blocked_writer
,
false
);
...
...
@@ -888,13 +888,13 @@ cleanup:
EXPORT_SYMBOL
(
mt7697q_write
);
__inline
u32
mt7697q_flags_get_in_use
(
u32
flags
)
u32
mt7697q_flags_get_in_use
(
u32
flags
)
{
return
BF_GET
(
flags
,
MT7697_QUEUE_FLAGS_IN_USE_OFFSET
,
MT7697_QUEUE_FLAGS_IN_USE_WIDTH
);
}
__inline
u32
mt7697q_flags_get_dir
(
u32
flags
)
u32
mt7697q_flags_get_dir
(
u32
flags
)
{
return
BF_GET
(
flags
,
MT7697_QUEUE_FLAGS_DIR_OFFSET
,
MT7697_QUEUE_FLAGS_DIR_WIDTH
);
...
...
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