All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
@ 2022-11-08  9:07 Dario Binacchi
  2022-11-08  9:25 ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 6+ messages in thread
From: Dario Binacchi @ 2022-11-08  9:07 UTC (permalink / raw)
  To: u-boot; +Cc: linux-amarula, michael, Dario Binacchi, Simon Glass, Stefan Roese

This function is only used within this module, so it is no longer
necessary to use EXPORT_SYMBOL_GPL().

This patch parallels the work done in the following patch:
https://lore.kernel.org/linux-mtd/20221018170205.1733958-1-dario.binacchi@amarulasolutions.com

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

 drivers/mtd/nand/core.c  | 3 +--
 include/linux/mtd/nand.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index 99c29670c75e..4b9dd6a92694 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -129,7 +129,7 @@ EXPORT_SYMBOL_GPL(nanddev_isreserved);
  *
  * Return: 0 in case of success, a negative error code otherwise.
  */
-int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
+static int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
 {
 	unsigned int entry;
 
@@ -147,7 +147,6 @@ int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
 
 	return nand->ops->erase(nand, pos);
 }
-EXPORT_SYMBOL_GPL(nanddev_erase);
 
 /**
  * nanddev_mtd_erase() - Generic mtd->_erase() implementation for NAND devices
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 7774c17ad5d5..aeb38dec2e03 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -691,7 +691,6 @@ static inline bool nanddev_io_iter_end(struct nand_device *nand,
 
 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos);
 bool nanddev_isreserved(struct nand_device *nand, const struct nand_pos *pos);
-int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos);
 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos);
 
 /* BBT related functions */
-- 
2.32.0


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

* Re: [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
  2022-11-08  9:07 [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase() Dario Binacchi
@ 2022-11-08  9:25 ` Michael Nazzareno Trimarchi
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-11-08  9:25 UTC (permalink / raw)
  To: Dario Binacchi; +Cc: u-boot, linux-amarula, Simon Glass, Stefan Roese

On Tue, Nov 8, 2022 at 10:07 AM Dario Binacchi
<dario.binacchi@amarulasolutions.com> wrote:
>
> This function is only used within this module, so it is no longer
> necessary to use EXPORT_SYMBOL_GPL().
>
> This patch parallels the work done in the following patch:
> https://lore.kernel.org/linux-mtd/20221018170205.1733958-1-dario.binacchi@amarulasolutions.com
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>

>
> ---
>
>  drivers/mtd/nand/core.c  | 3 +--
>  include/linux/mtd/nand.h | 1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
> index 99c29670c75e..4b9dd6a92694 100644
> --- a/drivers/mtd/nand/core.c
> +++ b/drivers/mtd/nand/core.c
> @@ -129,7 +129,7 @@ EXPORT_SYMBOL_GPL(nanddev_isreserved);
>   *
>   * Return: 0 in case of success, a negative error code otherwise.
>   */
> -int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
> +static int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
>  {
>         unsigned int entry;
>
> @@ -147,7 +147,6 @@ int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
>
>         return nand->ops->erase(nand, pos);
>  }
> -EXPORT_SYMBOL_GPL(nanddev_erase);
>
>  /**
>   * nanddev_mtd_erase() - Generic mtd->_erase() implementation for NAND devices
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index 7774c17ad5d5..aeb38dec2e03 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -691,7 +691,6 @@ static inline bool nanddev_io_iter_end(struct nand_device *nand,
>
>  bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos);
>  bool nanddev_isreserved(struct nand_device *nand, const struct nand_pos *pos);
> -int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos);
>  int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos);
>
>  /* BBT related functions */
> --
> 2.32.0
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

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

* Re: [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
  2022-10-18 17:02 ` Dario Binacchi
@ 2022-11-07 16:23   ` Miquel Raynal
  -1 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2022-11-07 16:23 UTC (permalink / raw)
  To: Dario Binacchi, linux-kernel
  Cc: Miquel Raynal, michael, Amarula patchwork, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd

On Tue, 2022-10-18 at 17:02:05 UTC, Dario Binacchi wrote:
> This function is only used within this module, so it is no longer
> necessary to use EXPORT_SYMBOL_GPL().
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

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

* Re: [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
@ 2022-11-07 16:23   ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2022-11-07 16:23 UTC (permalink / raw)
  To: Dario Binacchi, linux-kernel
  Cc: Miquel Raynal, michael, Amarula patchwork, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd

On Tue, 2022-10-18 at 17:02:05 UTC, Dario Binacchi wrote:
> This function is only used within this module, so it is no longer
> necessary to use EXPORT_SYMBOL_GPL().
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

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

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

* [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
@ 2022-10-18 17:02 ` Dario Binacchi
  0 siblings, 0 replies; 6+ messages in thread
From: Dario Binacchi @ 2022-10-18 17:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: michael, Amarula patchwork, Dario Binacchi, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, linux-mtd

This function is only used within this module, so it is no longer
necessary to use EXPORT_SYMBOL_GPL().

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 drivers/mtd/nand/core.c  | 3 +--
 include/linux/mtd/nand.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index dbd7b06524b3..7737b1a4a177 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -126,7 +126,7 @@ EXPORT_SYMBOL_GPL(nanddev_isreserved);
  *
  * Return: 0 in case of success, a negative error code otherwise.
  */
-int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
+static int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
 {
 	if (nanddev_isbad(nand, pos) || nanddev_isreserved(nand, pos)) {
 		pr_warn("attempt to erase a bad/reserved block @%llx\n",
@@ -136,7 +136,6 @@ int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
 
 	return nand->ops->erase(nand, pos);
 }
-EXPORT_SYMBOL_GPL(nanddev_erase);
 
 /**
  * nanddev_mtd_erase() - Generic mtd->_erase() implementation for NAND devices
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index c3693bb87b4c..b2996dc987ff 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -999,7 +999,6 @@ static inline bool nanddev_io_iter_end(struct nand_device *nand,
 
 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos);
 bool nanddev_isreserved(struct nand_device *nand, const struct nand_pos *pos);
-int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos);
 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos);
 
 /* ECC related functions */
-- 
2.32.0


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

* [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
@ 2022-10-18 17:02 ` Dario Binacchi
  0 siblings, 0 replies; 6+ messages in thread
From: Dario Binacchi @ 2022-10-18 17:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: michael, Amarula patchwork, Dario Binacchi, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, linux-mtd

This function is only used within this module, so it is no longer
necessary to use EXPORT_SYMBOL_GPL().

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 drivers/mtd/nand/core.c  | 3 +--
 include/linux/mtd/nand.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index dbd7b06524b3..7737b1a4a177 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -126,7 +126,7 @@ EXPORT_SYMBOL_GPL(nanddev_isreserved);
  *
  * Return: 0 in case of success, a negative error code otherwise.
  */
-int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
+static int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
 {
 	if (nanddev_isbad(nand, pos) || nanddev_isreserved(nand, pos)) {
 		pr_warn("attempt to erase a bad/reserved block @%llx\n",
@@ -136,7 +136,6 @@ int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos)
 
 	return nand->ops->erase(nand, pos);
 }
-EXPORT_SYMBOL_GPL(nanddev_erase);
 
 /**
  * nanddev_mtd_erase() - Generic mtd->_erase() implementation for NAND devices
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index c3693bb87b4c..b2996dc987ff 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -999,7 +999,6 @@ static inline bool nanddev_io_iter_end(struct nand_device *nand,
 
 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos);
 bool nanddev_isreserved(struct nand_device *nand, const struct nand_pos *pos);
-int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos);
 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos);
 
 /* ECC related functions */
-- 
2.32.0


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

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

end of thread, other threads:[~2022-11-08  9:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08  9:07 [PATCH] mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase() Dario Binacchi
2022-11-08  9:25 ` Michael Nazzareno Trimarchi
  -- strict thread matches above, loose matches on Subject: below --
2022-10-18 17:02 Dario Binacchi
2022-10-18 17:02 ` Dario Binacchi
2022-11-07 16:23 ` Miquel Raynal
2022-11-07 16:23   ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.