diff mbox

[10/13] mtd: nand: pxa3xx: Add inline keyword to enable_int()

Message ID 1375140263-2028-11-git-send-email-ezequiel.garcia@free-electrons.com
State Superseded
Headers show

Commit Message

Ezequiel Garcia July 29, 2013, 11:24 p.m. UTC
Now that we have added ARCH_HAS_DMA conditional the function
enable_int() may be unused. So we declare it as inline
in order to remove the following warning, when the function is not used:

drivers/mtd/nand//pxa3xx_nand.c:343:24: warning: 'enable_int' defined
but not used [-Wunused-function]

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/mtd/nand/pxa3xx_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brian Norris July 30, 2013, 7:47 a.m. UTC | #1
On Mon, Jul 29, 2013 at 4:24 PM, Ezequiel Garcia
<ezequiel.garcia@free-electrons.com> wrote:
> Now that we have added ARCH_HAS_DMA conditional the function
> enable_int() may be unused. So we declare it as inline
> in order to remove the following warning, when the function is not used:

I haven't reviewed the rest too well yet, but I think you want the
'__maybe_unused' qualifier, not 'inline'.

> drivers/mtd/nand//pxa3xx_nand.c:343:24: warning: 'enable_int' defined
> but not used [-Wunused-function]

Brian
Ezequiel Garcia July 30, 2013, 12:53 p.m. UTC | #2
On Tue, Jul 30, 2013 at 12:47:33AM -0700, Brian Norris wrote:
> On Mon, Jul 29, 2013 at 4:24 PM, Ezequiel Garcia
> <ezequiel.garcia@free-electrons.com> wrote:
> > Now that we have added ARCH_HAS_DMA conditional the function
> > enable_int() may be unused. So we declare it as inline
> > in order to remove the following warning, when the function is not used:
> 
> I haven't reviewed the rest too well yet, but I think you want the
> '__maybe_unused' qualifier, not 'inline'.
> 
> > drivers/mtd/nand//pxa3xx_nand.c:343:24: warning: 'enable_int' defined
> > but not used [-Wunused-function]

Mmm, I guess you're right. I did this patch a long time ago, and now I'm
wondering if there is any reason why I haven't used that in the first place.

Anyway... I'll fix and re-post.

Thanks for the feedback!
diff mbox

Patch

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 03346e9..da162dd 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -337,7 +337,7 @@  static void pxa3xx_nand_stop(struct pxa3xx_nand_info *info)
 	nand_writel(info, NDSR, NDSR_MASK);
 }
 
-static void enable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
+static inline void enable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
 {
 	uint32_t ndcr;