linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2+: remove unneeded variable "errata" in configure_dma_errata()
@ 2020-05-06  6:19 Jason Yan
  2020-05-06  8:29 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Yan @ 2020-05-06  6:19 UTC (permalink / raw)
  To: tony, linux, peter.ujfalusi, linux-omap, linux-arm-kernel, linux-kernel
  Cc: Jason Yan

Fix the following coccicheck warning:

arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return
"0" on line 161

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 arch/arm/mach-omap2/dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index 8cc109cc242a..ef5022bc91a2 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -79,8 +79,6 @@ static const struct omap_dma_reg reg_map[] = {
 
 static unsigned configure_dma_errata(void)
 {
-	unsigned errata = 0;
-
 	/*
 	 * Errata applicable for OMAP2430ES1.0 and all omap2420
 	 *
@@ -158,7 +156,7 @@ static unsigned configure_dma_errata(void)
 	if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
 		SET_DMA_ERRATA(DMA_ROMCODE_BUG);
 
-	return errata;
+	return 0;
 }
 
 static const struct dma_slave_map omap24xx_sdma_dt_map[] = {
-- 
2.21.1


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

* Re: [PATCH] ARM: OMAP2+: remove unneeded variable "errata" in configure_dma_errata()
  2020-05-06  6:19 [PATCH] ARM: OMAP2+: remove unneeded variable "errata" in configure_dma_errata() Jason Yan
@ 2020-05-06  8:29 ` Russell King - ARM Linux admin
  2020-05-06  8:43   ` Jason Yan
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2020-05-06  8:29 UTC (permalink / raw)
  To: Jason Yan
  Cc: tony, peter.ujfalusi, linux-omap, linux-arm-kernel, linux-kernel

On Wed, May 06, 2020 at 02:19:00PM +0800, Jason Yan wrote:
> Fix the following coccicheck warning:
> 
> arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return
> "0" on line 161

NAK.  Look closer at what the code is doing, thanks.

This warning is basically incorrect.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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

* Re: [PATCH] ARM: OMAP2+: remove unneeded variable "errata" in configure_dma_errata()
  2020-05-06  8:29 ` Russell King - ARM Linux admin
@ 2020-05-06  8:43   ` Jason Yan
  2020-05-20  7:08     ` Peter Ujfalusi
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Yan @ 2020-05-06  8:43 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: tony, peter.ujfalusi, linux-omap, linux-arm-kernel, linux-kernel



在 2020/5/6 16:29, Russell King - ARM Linux admin 写道:
> On Wed, May 06, 2020 at 02:19:00PM +0800, Jason Yan wrote:
>> Fix the following coccicheck warning:
>>
>> arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return
>> "0" on line 161
> 
> NAK.  Look closer at what the code is doing, thanks.
> 
> This warning is basically incorrect.
> 

OK, the macro SET_DMA_ERRATA is using this variable.


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

* Re: [PATCH] ARM: OMAP2+: remove unneeded variable "errata" in configure_dma_errata()
  2020-05-06  8:43   ` Jason Yan
@ 2020-05-20  7:08     ` Peter Ujfalusi
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2020-05-20  7:08 UTC (permalink / raw)
  To: Jason Yan, Russell King - ARM Linux admin
  Cc: tony, linux-omap, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]



On 06/05/2020 11.43, Jason Yan wrote:
> 
> 
> 在 2020/5/6 16:29, Russell King - ARM Linux admin 写道:
>> On Wed, May 06, 2020 at 02:19:00PM +0800, Jason Yan wrote:
>>> Fix the following coccicheck warning:
>>>
>>> arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return
>>> "0" on line 161
>>
>> NAK.  Look closer at what the code is doing, thanks.
>>
>> This warning is basically incorrect.
>>
> 
> OK, the macro SET_DMA_ERRATA is using this variable.

How can a patch from you can be trusted if you did not even try to
compile-test?
Please try to _test_ your changes before sending, or add a disclaimer
that it might not even compile.

Thanks,
- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 1783 bytes --]

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

end of thread, other threads:[~2020-05-20  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06  6:19 [PATCH] ARM: OMAP2+: remove unneeded variable "errata" in configure_dma_errata() Jason Yan
2020-05-06  8:29 ` Russell King - ARM Linux admin
2020-05-06  8:43   ` Jason Yan
2020-05-20  7:08     ` Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).