linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] i2c: bpmp-tegra: Ignore unknown I2C_M flags
@ 2021-01-12 10:22 Mikko Perttunen
  2021-01-17 11:20 ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Mikko Perttunen @ 2021-01-12 10:22 UTC (permalink / raw)
  To: thierry.reding, jonathanh
  Cc: talho, linux-i2c, linux-tegra, linux-kernel, Mikko Perttunen, stable

In order to not to start returning errors when new I2C_M flags are
added, change behavior to just ignore all flags that we don't know
about. This includes the I2C_M_DMA_SAFE flag that already exists.

Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
v3:
- Ignore all unknown flags instead of just I2C_M_DMA_SAFE
---
 drivers/i2c/busses/i2c-tegra-bpmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-tegra-bpmp.c b/drivers/i2c/busses/i2c-tegra-bpmp.c
index ec7a7e917edd..c0c7d01473f2 100644
--- a/drivers/i2c/busses/i2c-tegra-bpmp.c
+++ b/drivers/i2c/busses/i2c-tegra-bpmp.c
@@ -80,7 +80,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
 		flags &= ~I2C_M_RECV_LEN;
 	}
 
-	return (flags != 0) ? -EINVAL : 0;
+	return 0;
 }
 
 /**
-- 
2.30.0


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

* Re: [PATCH v3] i2c: bpmp-tegra: Ignore unknown I2C_M flags
  2021-01-12 10:22 [PATCH v3] i2c: bpmp-tegra: Ignore unknown I2C_M flags Mikko Perttunen
@ 2021-01-17 11:20 ` Wolfram Sang
  2021-01-18 11:22   ` Mikko Perttunen
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2021-01-17 11:20 UTC (permalink / raw)
  To: Mikko Perttunen
  Cc: thierry.reding, jonathanh, talho, linux-i2c, linux-tegra,
	linux-kernel, stable

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

On Tue, Jan 12, 2021 at 12:22:25PM +0200, Mikko Perttunen wrote:
> In order to not to start returning errors when new I2C_M flags are
> added, change behavior to just ignore all flags that we don't know
> about. This includes the I2C_M_DMA_SAFE flag that already exists.
> 
> Cc: stable@vger.kernel.org # v4.19+
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>

Applied to for-current, thanks! I added also this sentence from v2 to
the description to justify stable: "but causes -EINVAL to be returned
for valid transactions."

Also, this driver has no dedicated maintainer. Is there someone up for
this task? There is probably little to do and it will speed up patch
acceptance because I pick patches once the driver maintainer is happy.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v3] i2c: bpmp-tegra: Ignore unknown I2C_M flags
  2021-01-17 11:20 ` Wolfram Sang
@ 2021-01-18 11:22   ` Mikko Perttunen
  2021-01-18 11:34     ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Mikko Perttunen @ 2021-01-18 11:22 UTC (permalink / raw)
  To: Wolfram Sang, Mikko Perttunen
  Cc: thierry.reding, jonathanh, talho, linux-i2c, linux-tegra,
	linux-kernel, stable

On 1/17/21 1:20 PM, Wolfram Sang wrote:
> On Tue, Jan 12, 2021 at 12:22:25PM +0200, Mikko Perttunen wrote:
>> In order to not to start returning errors when new I2C_M flags are
>> added, change behavior to just ignore all flags that we don't know
>> about. This includes the I2C_M_DMA_SAFE flag that already exists.
>>
>> Cc: stable@vger.kernel.org # v4.19+
>> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
> 
> Applied to for-current, thanks! I added also this sentence from v2 to
> the description to justify stable: "but causes -EINVAL to be returned
> for valid transactions."

Thanks!

> 
> Also, this driver has no dedicated maintainer. Is there someone up for
> this task? There is probably little to do and it will speed up patch
> acceptance because I pick patches once the driver maintainer is happy.
> 

I think it falls under the 'TEGRA ARCHITECTURE SUPPORT' wildcard 
(Thierry and Jon). Do we need a more specific maintainer entry?

If it's helpful to Thierry and Jon, I guess I could pick it up.

Mikko

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

* Re: [PATCH v3] i2c: bpmp-tegra: Ignore unknown I2C_M flags
  2021-01-18 11:22   ` Mikko Perttunen
@ 2021-01-18 11:34     ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2021-01-18 11:34 UTC (permalink / raw)
  To: Mikko Perttunen
  Cc: Mikko Perttunen, thierry.reding, jonathanh, talho, linux-i2c,
	linux-tegra, linux-kernel, stable

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


> > Also, this driver has no dedicated maintainer. Is there someone up for
> > this task? There is probably little to do and it will speed up patch
> > acceptance because I pick patches once the driver maintainer is happy.
> > 
> 
> I think it falls under the 'TEGRA ARCHITECTURE SUPPORT' wildcard (Thierry
> and Jon). Do we need a more specific maintainer entry?
> 
> If it's helpful to Thierry and Jon, I guess I could pick it up.

I am fine with both. I'd just like a line

	"F:	drivers/i2c/busses/i2c-tegra-bpmp.c"

somewhere in MAINTAINERS. If that's in Tegra architecture, also good.
However, i2c-tegra.c already has a dedicated entry and spreading the
work avoids bottlenecks, so I think it might be the better option. But
I'll leave it to you guys. In any case, thanks for volunteering!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-01-18 11:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 10:22 [PATCH v3] i2c: bpmp-tegra: Ignore unknown I2C_M flags Mikko Perttunen
2021-01-17 11:20 ` Wolfram Sang
2021-01-18 11:22   ` Mikko Perttunen
2021-01-18 11:34     ` Wolfram Sang

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).