Linux-mtd Archive on lore.kernel.org
 help / Atom feed
* [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static
@ 2019-01-30 10:09 YueHaibing
  2019-01-30 10:34 ` Miquel Raynal
  2019-02-05 19:06 ` Miquel Raynal
  0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2019-01-30 10:09 UTC (permalink / raw)
  To: bbrezillon, miquel.raynal, richard, dwmw2, computersforpeace,
	marek.vasut, mcoquelin.stm32, alexandre.torgue,
	christophe.kerello
  Cc: YueHaibing, linux-mtd, linux-kernel, linux-arm-kernel, linux-stm32

Fixes the following sparse warning:
drivers/mtd/nand/raw/stm32_fmc2_nand.c:1228:6: warning: symbol 'stm32_fmc2_read_data' was not declared. Should it be static?
drivers/mtd/nand/raw/stm32_fmc2_nand.c:1275:6: warning: symbol 'stm32_fmc2_write_data' was not declared. Should it be static?
drivers/mtd/nand/raw/stm32_fmc2_nand.c:1707:32: warning: symbol 'stm32_fmc2_nand_ooblayout_ops' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index e057282..999ca6a 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1225,8 +1225,8 @@ static irqreturn_t stm32_fmc2_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
-			  unsigned int len, bool force_8bit)
+static void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
+				 unsigned int len, bool force_8bit)
 {
 	struct stm32_fmc2_nfc *fmc2 = to_stm32_nfc(chip->controller);
 	void __iomem *io_addr_r = fmc2->data_base[fmc2->cs_sel];
@@ -1272,8 +1272,8 @@ void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
 		stm32_fmc2_set_buswidth_16(fmc2, true);
 }
 
-void stm32_fmc2_write_data(struct nand_chip *chip, const void *buf,
-			   unsigned int len, bool force_8bit)
+static void stm32_fmc2_write_data(struct nand_chip *chip, const void *buf,
+				  unsigned int len, bool force_8bit)
 {
 	struct stm32_fmc2_nfc *fmc2 = to_stm32_nfc(chip->controller);
 	void __iomem *io_addr_w = fmc2->data_base[fmc2->cs_sel];
@@ -1704,7 +1704,7 @@ static int stm32_fmc2_nand_ooblayout_free(struct mtd_info *mtd, int section,
 	return 0;
 }
 
-const struct mtd_ooblayout_ops stm32_fmc2_nand_ooblayout_ops = {
+static const struct mtd_ooblayout_ops stm32_fmc2_nand_ooblayout_ops = {
 	.ecc = stm32_fmc2_nand_ooblayout_ecc,
 	.free = stm32_fmc2_nand_ooblayout_free,
 };
-- 
2.7.0



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static
  2019-01-30 10:09 [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static YueHaibing
@ 2019-01-30 10:34 ` Miquel Raynal
  2019-01-30 10:43   ` YueHaibing
  2019-02-05 19:06 ` Miquel Raynal
  1 sibling, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2019-01-30 10:34 UTC (permalink / raw)
  To: YueHaibing
  Cc: christophe.kerello, alexandre.torgue, bbrezillon, richard,
	linux-kernel, marek.vasut, linux-mtd, mcoquelin.stm32,
	computersforpeace, dwmw2, linux-stm32, linux-arm-kernel

Hi Yue,

YueHaibing <yuehaibing@huawei.com> wrote on Wed, 30 Jan 2019 18:09:08
+0800:

> Fixes the following sparse warning:
> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1228:6: warning: symbol 'stm32_fmc2_read_data' was not declared. Should it be static?
> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1275:6: warning: symbol 'stm32_fmc2_write_data' was not declared. Should it be static?
> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1707:32: warning: symbol 'stm32_fmc2_nand_ooblayout_ops' was not declared. Should it be static?
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index e057282..999ca6a 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -1225,8 +1225,8 @@ static irqreturn_t stm32_fmc2_irq(int irq, void *dev_id)
>  	return IRQ_HANDLED;
>  }
>  
> -void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
> -			  unsigned int len, bool force_8bit)
> +static void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
> +				 unsigned int len, bool force_8bit)
>  {
>  	struct stm32_fmc2_nfc *fmc2 = to_stm32_nfc(chip->controller);
>  	void __iomem *io_addr_r = fmc2->data_base[fmc2->cs_sel];
> @@ -1272,8 +1272,8 @@ void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
>  		stm32_fmc2_set_buswidth_16(fmc2, true);
>  }
>  
> -void stm32_fmc2_write_data(struct nand_chip *chip, const void *buf,
> -			   unsigned int len, bool force_8bit)
> +static void stm32_fmc2_write_data(struct nand_chip *chip, const void *buf,
> +				  unsigned int len, bool force_8bit)
>  {
>  	struct stm32_fmc2_nfc *fmc2 = to_stm32_nfc(chip->controller);
>  	void __iomem *io_addr_w = fmc2->data_base[fmc2->cs_sel];
> @@ -1704,7 +1704,7 @@ static int stm32_fmc2_nand_ooblayout_free(struct mtd_info *mtd, int section,
>  	return 0;
>  }
>  
> -const struct mtd_ooblayout_ops stm32_fmc2_nand_ooblayout_ops = {
> +static const struct mtd_ooblayout_ops stm32_fmc2_nand_ooblayout_ops = {
>  	.ecc = stm32_fmc2_nand_ooblayout_ecc,
>  	.free = stm32_fmc2_nand_ooblayout_free,
>  };

This is nand/next material, so if you don't mind I would like to squash
this fix into the original commit inserting the driver.


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static
  2019-01-30 10:34 ` Miquel Raynal
@ 2019-01-30 10:43   ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-01-30 10:43 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: christophe.kerello, alexandre.torgue, bbrezillon, richard,
	linux-kernel, marek.vasut, linux-mtd, mcoquelin.stm32,
	computersforpeace, dwmw2, linux-stm32, linux-arm-kernel

On 2019/1/30 18:34, Miquel Raynal wrote:
> Hi Yue,
> 
> YueHaibing <yuehaibing@huawei.com> wrote on Wed, 30 Jan 2019 18:09:08
> +0800:
> 
>> Fixes the following sparse warning:
>> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1228:6: warning: symbol 'stm32_fmc2_read_data' was not declared. Should it be static?
>> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1275:6: warning: symbol 'stm32_fmc2_write_data' was not declared. Should it be static?
>> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1707:32: warning: symbol 'stm32_fmc2_nand_ooblayout_ops' was not declared. Should it be static?
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>> index e057282..999ca6a 100644
>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>> @@ -1225,8 +1225,8 @@ static irqreturn_t stm32_fmc2_irq(int irq, void *dev_id)
>>  	return IRQ_HANDLED;
>>  }
>>  
>> -void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
>> -			  unsigned int len, bool force_8bit)
>> +static void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
>> +				 unsigned int len, bool force_8bit)
>>  {
>>  	struct stm32_fmc2_nfc *fmc2 = to_stm32_nfc(chip->controller);
>>  	void __iomem *io_addr_r = fmc2->data_base[fmc2->cs_sel];
>> @@ -1272,8 +1272,8 @@ void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
>>  		stm32_fmc2_set_buswidth_16(fmc2, true);
>>  }
>>  
>> -void stm32_fmc2_write_data(struct nand_chip *chip, const void *buf,
>> -			   unsigned int len, bool force_8bit)
>> +static void stm32_fmc2_write_data(struct nand_chip *chip, const void *buf,
>> +				  unsigned int len, bool force_8bit)
>>  {
>>  	struct stm32_fmc2_nfc *fmc2 = to_stm32_nfc(chip->controller);
>>  	void __iomem *io_addr_w = fmc2->data_base[fmc2->cs_sel];
>> @@ -1704,7 +1704,7 @@ static int stm32_fmc2_nand_ooblayout_free(struct mtd_info *mtd, int section,
>>  	return 0;
>>  }
>>  
>> -const struct mtd_ooblayout_ops stm32_fmc2_nand_ooblayout_ops = {
>> +static const struct mtd_ooblayout_ops stm32_fmc2_nand_ooblayout_ops = {
>>  	.ecc = stm32_fmc2_nand_ooblayout_ecc,
>>  	.free = stm32_fmc2_nand_ooblayout_free,
>>  };
> 
> This is nand/next material, so if you don't mind I would like to squash
> this fix into the original commit inserting the driver.

Sure, ok

> 
> 
> Thanks,
> Miquèl
> 
> .
> 


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static
  2019-01-30 10:09 [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static YueHaibing
  2019-01-30 10:34 ` Miquel Raynal
@ 2019-02-05 19:06 ` Miquel Raynal
  1 sibling, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2019-02-05 19:06 UTC (permalink / raw)
  To: YueHaibing
  Cc: christophe.kerello, alexandre.torgue, bbrezillon, richard,
	linux-kernel, marek.vasut, linux-mtd, mcoquelin.stm32,
	computersforpeace, dwmw2, linux-stm32, linux-arm-kernel

Hi Yue,

YueHaibing <yuehaibing@huawei.com> wrote on Wed, 30 Jan 2019 18:09:08
+0800:

> Fixes the following sparse warning:
> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1228:6: warning: symbol 'stm32_fmc2_read_data' was not declared. Should it be static?
> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1275:6: warning: symbol 'stm32_fmc2_write_data' was not declared. Should it be static?
> drivers/mtd/nand/raw/stm32_fmc2_nand.c:1707:32: warning: symbol 'stm32_fmc2_nand_ooblayout_ops' was not declared. Should it be static?
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---

Merged in nand/next with the original commit.


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 10:09 [PATCH -next] mtd: rawnand: stm32_fmc2: Make some functions static YueHaibing
2019-01-30 10:34 ` Miquel Raynal
2019-01-30 10:43   ` YueHaibing
2019-02-05 19:06 ` Miquel Raynal

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org linux-mtd@archiver.kernel.org
	public-inbox-index linux-mtd


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/ public-inbox