mtd: rawnand: meson:: make several functions static
Subsystems (5)
PATCH 1/1 mtd: rawnand: meson:: make several functions static
From: Colin Ian King <[email protected]>
There are several functions that are local to the source and do not need to be in global scope, so make them static.
Cleans up sparse warnings.
--- drivers/mtd/nand/raw/meson_nand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mtd/nand/raw/meson_nand.c +5 -5
@@ -829,14 +829,14 @@ static int meson_nfc_read_oob(struct nand_chip *nand, int page)return meson_nfc_read_page_hwecc (nand,NULL ,1 , page); } -bool meson_nfc_is_buffer_dma_safe (const void *buffer) +static bool meson_nfc_is_buffer_dma_safe (const void *buffer) {if (virt_addr_valid (buffer) && (!object_is_on_stack (buffer)))return true;return false; } -void * +static void *meson_nand_op_get_dma_safe_input_buf (const struct nand_op_instr *instr) {if (WARN_ON (instr->type !=NAND_OP_DATA_IN_INSTR ))
@@ -848,7 +848,7 @@ meson_nand_op_get_dma_safe_input_buf(const struct nand_op_instr *instr)return kzalloc (instr->ctx.data.len,GFP_KERNEL ); } -void +static void meson_nand_op_put_dma_safe_input_buf (const struct nand_op_instr *instr,void *buf) {
@@ -863,7 +863,7 @@ meson_nand_op_put_dma_safe_input_buf(const struct nand_op_instr *instr,kfree (buf); } -void * +static void *meson_nand_op_get_dma_safe_output_buf (const struct nand_op_instr *instr) {if (WARN_ON (instr->type !=NAND_OP_DATA_OUT_INSTR ))
@@ -876,7 +876,7 @@ meson_nand_op_get_dma_safe_output_buf(const struct nand_op_instr *instr) instr->ctx.data.len, GFP_KERNEL); } -void +static void meson_nand_op_put_dma_safe_output_buf (const struct nand_op_instr *instr,const void *buf) {
Signature · 1 line
2.19.1
Liang Yang
maintainerHello Colin,
Quoted 7 lines · Colin King
From: Colin Ian King <[email protected]>
There are several functions that are local to the source and do not need to be in global scope, so make them static.
Cleans up sparse warnings.
ok. thanks
Quoted 46 lines
Signed-off-by Colin Ian King <[email protected]>--- drivers/mtd/nand/raw/meson_nand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/mtd/nand/raw/meson_nand.c +4
-4@@ -829,14 +829,14 @@ static int meson_nfc_read_oob(struct nand_chip *nand, int page)return meson_nfc_read_page_hwecc (nand,NULL ,1 , page); } -bool meson_nfc_is_buffer_dma_safe (const void *buffer) +static bool meson_nfc_is_buffer_dma_safe (const void *buffer) {if (virt_addr_valid (buffer) && (!object_is_on_stack (buffer)))return true;return false; } -void * +static void *meson_nand_op_get_dma_safe_input_buf (const struct nand_op_instr *instr) {if (WARN_ON (instr->type !=NAND_OP_DATA_IN_INSTR ))@@ -848,7 +848,7 @@ meson_nand_op_get_dma_safe_input_buf(const struct nand_op_instr *instr)return kzalloc (instr->ctx.data.len,GFP_KERNEL ); } -void +static void meson_nand_op_put_dma_safe_input_buf (const struct nand_op_instr *instr,void *buf) {@@ -863,7 +863,7 @@ meson_nand_op_put_dma_safe_input_buf(const struct nand_op_instr *instr,kfree (buf); } -void * +static void *meson_nand_op_get_dma_safe_output_buf (const struct nand_op_instr *instr) {if (WARN_ON (instr->type !=NAND_OP_DATA_OUT_INSTR ))
drivers/mtd/nand/raw/meson_nand.c meson_nand_op_get_dma_safe_output_buf(const struct nand_op_instr *instr) · line 882
Quoted 8 lines
drivers/mtd/nand/raw/meson_nand.c +1
-1@@ -876,7 +876,7 @@ meson_nand_op_get_dma_safe_output_buf(const struct nand_op_instr *instr) instr->ctx.data.len, GFP_KERNEL); } -void +static void meson_nand_op_put_dma_safe_output_buf (const struct nand_op_instr *instr,const void *buf) {
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Hi Colin,
Quoted 53 lines · Colin King
From: Colin Ian King <[email protected]>
There are several functions that are local to the source and do not need to be in global scope, so make them static.
Cleans up sparse warnings.
Signed-off-by Colin Ian King <[email protected]>--- drivers/mtd/nand/raw/meson_nand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/mtd/nand/raw/meson_nand.c +4
-4@@ -829,14 +829,14 @@ static int meson_nfc_read_oob(struct nand_chip *nand, int page)return meson_nfc_read_page_hwecc (nand,NULL ,1 , page); } -bool meson_nfc_is_buffer_dma_safe (const void *buffer) +static bool meson_nfc_is_buffer_dma_safe (const void *buffer) {if (virt_addr_valid (buffer) && (!object_is_on_stack (buffer)))return true;return false; } -void * +static void *meson_nand_op_get_dma_safe_input_buf (const struct nand_op_instr *instr) {if (WARN_ON (instr->type !=NAND_OP_DATA_IN_INSTR ))@@ -848,7 +848,7 @@ meson_nand_op_get_dma_safe_input_buf(const struct nand_op_instr *instr)return kzalloc (instr->ctx.data.len,GFP_KERNEL ); } -void +static void meson_nand_op_put_dma_safe_input_buf (const struct nand_op_instr *instr,void *buf) {@@ -863,7 +863,7 @@ meson_nand_op_put_dma_safe_input_buf(const struct nand_op_instr *instr,kfree (buf); } -void * +static void *meson_nand_op_get_dma_safe_output_buf (const struct nand_op_instr *instr) {if (WARN_ON (instr->type !=NAND_OP_DATA_OUT_INSTR ))
drivers/mtd/nand/raw/meson_nand.c meson_nand_op_get_dma_safe_output_buf(const struct nand_op_instr *instr) · line 882
Quoted 8 lines
drivers/mtd/nand/raw/meson_nand.c +1
-1@@ -876,7 +876,7 @@ meson_nand_op_get_dma_safe_output_buf(const struct nand_op_instr *instr) instr->ctx.data.len, GFP_KERNEL); } -void +static void meson_nand_op_put_dma_safe_output_buf (const struct nand_op_instr *instr,const void *buf) {
Looks good to me:
Miquel Raynal
maintainerHi Colin,
Colin King <[email protected]> wrote on Tue, 29 Jan 2019 12:44:29 +0000:
Quoted 8 lines
From: Colin Ian King <[email protected]>
There are several functions that are local to the source and do not need to be in global scope, so make them static.
Cleans up sparse warnings.
Signed-off-by Colin Ian King <[email protected]>
Merged in nand/next with the original commit.
Thanks,
Miquèl