Skip to content

Commit f7c04f1

Browse files
masahir0ygregkh
authored andcommitted
nvmem: remove inline in drivers/nvmem/core.c
These two functions are defined in .c file, but called just once (at least for now). So, the compiler will fold them into their callers even without the "inline" markers. However, this kind of optimization should not be done by hand. It is compiler's judge after all. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2bd6bf0 commit f7c04f1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎drivers/nvmem/core.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,7 @@ void nvmem_cell_put(struct nvmem_cell *cell)
945945
}
946946
EXPORT_SYMBOL_GPL(nvmem_cell_put);
947947

948-
static inline void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell,
949-
void *buf)
948+
static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf)
950949
{
951950
u8 *p, *b;
952951
int i, bit_offset = cell->bit_offset;
@@ -1027,8 +1026,8 @@ void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
10271026
}
10281027
EXPORT_SYMBOL_GPL(nvmem_cell_read);
10291028

1030-
static inline void *nvmem_cell_prepare_write_buffer(struct nvmem_cell *cell,
1031-
u8 *_buf, int len)
1029+
static void *nvmem_cell_prepare_write_buffer(struct nvmem_cell *cell,
1030+
u8 *_buf, int len)
10321031
{
10331032
struct nvmem_device *nvmem = cell->nvmem;
10341033
int i, rc, nbits, bit_offset = cell->bit_offset;

0 commit comments

Comments
 (0)