From: Prathu Baronia <prathubaronia2011@gmail.com>
To: Russell King <linux@armlinux.org.uk>,
Isaac Manjarres <isaacmanjarres@google.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Robin Murphy <robin.murphy@arm.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Prathu Baronia <prathubaronia2011@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] amba: move to_amba_device() to use container_of_const
Date: Wed, 26 Apr 2023 20:11:23 +0530 [thread overview]
Message-ID: <20230426144124.19270-1-prathubaronia2011@gmail.com> (raw)
to_amba_device() now properly keeps the const-ness of the dev pointer
passed into it, while as before it could be lost.
Signed-off-by: Prathu Baronia <prathubaronia2011@gmail.com>
---
include/linux/amba/bus.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 5001e14c5c06..c60a6a14638c 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -107,7 +107,7 @@ enum amba_vendor {
extern struct bus_type amba_bustype;
-#define to_amba_device(d) container_of(d, struct amba_device, dev)
+#define to_amba_device(d) container_of_const(d, struct amba_device, dev)
#define amba_get_drvdata(d) dev_get_drvdata(&d->dev)
#define amba_set_drvdata(d,p) dev_set_drvdata(&d->dev, p)
--
2.25.1
reply other threads:[~2023-04-26 14:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230426144124.19270-1-prathubaronia2011@gmail.com \
--to=prathubaronia2011@gmail.com \
--cc=baolu.lu@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=isaacmanjarres@google.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robin.murphy@arm.com \
/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
all inboxes | Powered by JetHome®