All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tony@atomide.com, jmkrzyszt@gmail.com, aaro.koskinen@iki.fi,
	vireshk@kernel.org, shiraz.linux.kernel@gmail.com,
	nsekhar@ti.com, brgl@bgdev.pl, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>
Subject: [PATCH 6/6] ARM: omap1: add back omap_set_dma_priority() stub
Date: Thu, 28 Apr 2022 15:31:58 +0200	[thread overview]
Message-ID: <20220428133210.990808-7-arnd@kernel.org> (raw)
In-Reply-To: <20220428133210.990808-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

One of my multiplatform patches went a little too far and removed
a declaration that is needed for compile-testing the omapfb
driver on non-OMAP1 platforms:

  arm-linux-gnueabi-ld: drivers/video/fbdev/omap/omapfb_main.o: in function `omapfb_do_probe':
  omapfb_main.c:(.text+0x41ec): undefined reference to `omap_set_dma_priority'

Add back the inline stub, and in turn hide the definition when
omapfb is disabled, like we do for the usb specific bits.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 52ef8efcb75e ("dma: omap: hide legacy interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/omap-dma.c | 18 ++----------------
 include/linux/omap-dma.h       |  7 +++++++
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap1/omap-dma.c b/arch/arm/mach-omap1/omap-dma.c
index e504f65cdc1b..f7e62de427f3 100644
--- a/arch/arm/mach-omap1/omap-dma.c
+++ b/arch/arm/mach-omap1/omap-dma.c
@@ -99,7 +99,7 @@ static inline void set_gdma_dev(int req, int dev)
 	omap_writel(l, reg);
 }
 
-#ifdef CONFIG_ARCH_OMAP1
+#if IS_ENABLED(CONFIG_FB_OMAP)
 void omap_set_dma_priority(int lch, int dst_port, int priority)
 {
 	unsigned long reg;
@@ -129,22 +129,8 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
 		omap_writel(l, reg);
 	}
 }
-#endif
-
-#ifdef CONFIG_ARCH_OMAP2PLUS
-void omap_set_dma_priority(int lch, int dst_port, int priority)
-{
-	u32 ccr;
-
-	ccr = p->dma_read(CCR, lch);
-	if (priority)
-		ccr |= (1 << 6);
-	else
-		ccr &= ~(1 << 6);
-	p->dma_write(ccr, CCR, lch);
-}
-#endif
 EXPORT_SYMBOL(omap_set_dma_priority);
+#endif
 
 #if IS_ENABLED(CONFIG_USB_OMAP)
 #ifdef CONFIG_ARCH_OMAP15XX
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
index 254b4e10511b..6f6c31e3fb93 100644
--- a/include/linux/omap-dma.h
+++ b/include/linux/omap-dma.h
@@ -294,7 +294,14 @@ struct omap_system_dma_plat_info {
 
 extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
 
+#if defined(CONFIG_ARCH_OMAP1)
 extern void omap_set_dma_priority(int lch, int dst_port, int priority);
+#else
+static inline void omap_set_dma_priority(int lch, int dst_port, int priority)
+{
+}
+#endif
+
 extern int omap_request_dma(int dev_id, const char *dev_name,
 			void (*callback)(int lch, u16 ch_status, void *data),
 			void *data, int *dma_ch);
-- 
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tony@atomide.com, jmkrzyszt@gmail.com, aaro.koskinen@iki.fi,
	vireshk@kernel.org, shiraz.linux.kernel@gmail.com,
	nsekhar@ti.com, brgl@bgdev.pl, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>
Subject: [PATCH 6/6] ARM: omap1: add back omap_set_dma_priority() stub
Date: Thu, 28 Apr 2022 15:31:58 +0200	[thread overview]
Message-ID: <20220428133210.990808-7-arnd@kernel.org> (raw)
In-Reply-To: <20220428133210.990808-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

One of my multiplatform patches went a little too far and removed
a declaration that is needed for compile-testing the omapfb
driver on non-OMAP1 platforms:

  arm-linux-gnueabi-ld: drivers/video/fbdev/omap/omapfb_main.o: in function `omapfb_do_probe':
  omapfb_main.c:(.text+0x41ec): undefined reference to `omap_set_dma_priority'

Add back the inline stub, and in turn hide the definition when
omapfb is disabled, like we do for the usb specific bits.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 52ef8efcb75e ("dma: omap: hide legacy interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/omap-dma.c | 18 ++----------------
 include/linux/omap-dma.h       |  7 +++++++
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap1/omap-dma.c b/arch/arm/mach-omap1/omap-dma.c
index e504f65cdc1b..f7e62de427f3 100644
--- a/arch/arm/mach-omap1/omap-dma.c
+++ b/arch/arm/mach-omap1/omap-dma.c
@@ -99,7 +99,7 @@ static inline void set_gdma_dev(int req, int dev)
 	omap_writel(l, reg);
 }
 
-#ifdef CONFIG_ARCH_OMAP1
+#if IS_ENABLED(CONFIG_FB_OMAP)
 void omap_set_dma_priority(int lch, int dst_port, int priority)
 {
 	unsigned long reg;
@@ -129,22 +129,8 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
 		omap_writel(l, reg);
 	}
 }
-#endif
-
-#ifdef CONFIG_ARCH_OMAP2PLUS
-void omap_set_dma_priority(int lch, int dst_port, int priority)
-{
-	u32 ccr;
-
-	ccr = p->dma_read(CCR, lch);
-	if (priority)
-		ccr |= (1 << 6);
-	else
-		ccr &= ~(1 << 6);
-	p->dma_write(ccr, CCR, lch);
-}
-#endif
 EXPORT_SYMBOL(omap_set_dma_priority);
+#endif
 
 #if IS_ENABLED(CONFIG_USB_OMAP)
 #ifdef CONFIG_ARCH_OMAP15XX
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
index 254b4e10511b..6f6c31e3fb93 100644
--- a/include/linux/omap-dma.h
+++ b/include/linux/omap-dma.h
@@ -294,7 +294,14 @@ struct omap_system_dma_plat_info {
 
 extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
 
+#if defined(CONFIG_ARCH_OMAP1)
 extern void omap_set_dma_priority(int lch, int dst_port, int priority);
+#else
+static inline void omap_set_dma_priority(int lch, int dst_port, int priority)
+{
+}
+#endif
+
 extern int omap_request_dma(int dev_id, const char *dev_name,
 			void (*callback)(int lch, u16 ch_status, void *data),
 			void *data, int *dma_ch);
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-28 13:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 13:31 [PATCH 0/6] ARM: omap/davinci/spear fixes for multiplatform Arnd Bergmann
2022-04-28 13:31 ` Arnd Bergmann
2022-04-28 13:31 ` [PATCH 1/6] ARM: omap2: remove include/mach/ subdirectory Arnd Bergmann
2022-04-28 13:31   ` Arnd Bergmann
2022-04-29  5:33   ` Tony Lindgren
2022-04-29  5:33     ` Tony Lindgren
2022-04-28 13:31 ` [PATCH 2/6] ARM: davinci: " Arnd Bergmann
2022-04-28 13:31   ` Arnd Bergmann
2022-05-02 12:03   ` Bartosz Golaszewski
2022-05-02 12:03     ` Bartosz Golaszewski
2022-04-28 13:31 ` [PATCH 3/6] ARM: spear: " Arnd Bergmann
2022-04-28 13:31   ` Arnd Bergmann
2022-04-29  3:14   ` Viresh Kumar
2022-04-29  3:14     ` Viresh Kumar
2022-04-28 13:31 ` [PATCH 4/6] ARM: omap: fix address space warnings from sparse Arnd Bergmann
2022-04-28 13:31   ` Arnd Bergmann
2022-04-29  5:27   ` Tony Lindgren
2022-04-29  5:27     ` Tony Lindgren
2022-04-28 13:31 ` [PATCH 5/6] ARM: omap2: fix missing declaration warnings Arnd Bergmann
2022-04-28 13:31   ` Arnd Bergmann
2022-04-29  5:32   ` Tony Lindgren
2022-04-29  5:32     ` Tony Lindgren
2022-04-28 13:31 ` Arnd Bergmann [this message]
2022-04-28 13:31   ` [PATCH 6/6] ARM: omap1: add back omap_set_dma_priority() stub Arnd Bergmann
2022-04-29  5:32   ` Tony Lindgren
2022-04-29  5:32     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428133210.990808-7-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=arnd@arndb.de \
    --cc=brgl@bgdev.pl \
    --cc=jmkrzyszt@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nsekhar@ti.com \
    --cc=shiraz.linux.kernel@gmail.com \
    --cc=tony@atomide.com \
    --cc=vireshk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.