From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@kernel.org>,
Sasha Levin <sashal@kernel.org>,
linux-i2c@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 3/7] i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
Date: Sat, 7 Oct 2023 20:50:49 -0400 [thread overview]
Message-ID: <20231008005053.3768625-3-sashal@kernel.org> (raw)
In-Reply-To: <20231008005053.3768625-1-sashal@kernel.org>
From: Heiner Kallweit <hkallweit1@gmail.com>
[ Upstream commit b13e59e74ff71a1004e0508107e91e9a84fd7388 ]
I2C_CLASS_DEPRECATED is a flag and not an actual class.
There's nothing speaking against both, parent and child, having
I2C_CLASS_DEPRECATED set. Therefore exclude it from the check.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/i2c/i2c-mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 7ba31f6bf1488..ad5fd357b2bce 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -334,7 +334,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
priv->adap.lock_ops = &i2c_parent_lock_ops;
/* Sanity check on class */
- if (i2c_mux_parent_classes(parent) & class)
+ if (i2c_mux_parent_classes(parent) & class & ~I2C_CLASS_DEPRECATED)
dev_err(&parent->dev,
"Segment %d behind mux can't share classes with ancestors\n",
chan_id);
--
2.40.1
next prev parent reply other threads:[~2023-10-08 1:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-08 0:50 [PATCH AUTOSEL 4.14 1/7] ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone Sasha Levin
2023-10-08 0:50 ` [PATCH AUTOSEL 4.14 2/7] btrfs: initialize start_slot in btrfs_log_prealloc_extents Sasha Levin
2023-10-08 0:50 ` Sasha Levin [this message]
2023-10-08 0:50 ` [PATCH AUTOSEL 4.14 4/7] overlayfs: set ctime when setting mtime and atime Sasha Levin
2023-10-08 0:50 ` [PATCH AUTOSEL 4.14 5/7] gpio: timberdale: Fix potential deadlock on &tgpio->lock Sasha Levin
2023-10-08 0:50 ` [PATCH AUTOSEL 4.14 6/7] ata: libata-eh: Fix compilation warning in ata_eh_link_report() Sasha Levin
2023-10-08 0:50 ` [PATCH AUTOSEL 4.14 7/7] tracing: relax trace_event_eval_update() execution with cond_resched() Sasha Levin
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=20231008005053.3768625-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=stable@vger.kernel.org \
--cc=wsa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox