From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Applied "spi: add spi_message_init_no_memset to avoid zeroing the spi_message" to the spi tree
Date: Sat, 12 Dec 2015 23:08:05 +0000 [thread overview]
Message-ID: <E1a7tGn-0002s1-7B@finisterre> (raw)
In-Reply-To: <1448632564-2381-2-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
The patch
spi: add spi_message_init_no_memset to avoid zeroing the spi_message
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 49ddedf3bfcb59a562c7db0e50aecd1422e9cdc9 Mon Sep 17 00:00:00 2001
From: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
Date: Fri, 27 Nov 2015 13:56:03 +0000
Subject: [PATCH] spi: add spi_message_init_no_memset to avoid zeroing the
spi_message
In the spi_loopback_test driver there is the need to initialize
a spi_message that is filled with values from a static structure.
Applying spi_message_init to such a prefilled structure results in
all the settings getting reset to zero, which is not what we want.
Copying each field of spi_message separately instead always includes
the risk that some new fields have not been implemented in the copying
code.
So here we introduce a version of spi_message_init called
spi_message_init_no_memset that does not fill the structure
with zero first, but only initializes the relevant list_heads.
Signed-off-by: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
include/linux/spi/spi.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index cce80e6..4c54d47 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -762,10 +762,15 @@ struct spi_message {
void *state;
};
+static inline void spi_message_init_no_memset(struct spi_message *m)
+{
+ INIT_LIST_HEAD(&m->transfers);
+}
+
static inline void spi_message_init(struct spi_message *m)
{
memset(m, 0, sizeof *m);
- INIT_LIST_HEAD(&m->transfers);
+ spi_message_init_no_memset(m);
}
static inline void
--
2.6.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-12-12 23:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 13:56 [PATCH 0/2] spi: spi_loopback_test regression test module kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1448632564-2381-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-11-27 13:56 ` [PATCH 1/2] spi: add spi_message_init_no_memset to avoid zeroing the spi_message kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1448632564-2381-2-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-12-12 23:08 ` Mark Brown [this message]
2015-11-27 13:56 ` [PATCH 2/2] spi: add loopback test driver to allow for spi_master regression tests kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1448632564-2381-3-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-12-12 23:08 ` Applied "spi: add loopback test driver to allow for spi_master regression tests" to the spi tree Mark Brown
2015-11-27 16:17 ` [PATCH] spi: add spi-loopback-test to build framework kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1448641042-4722-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-12-12 23:08 ` Applied "spi: add spi-loopback-test to build framework" to the spi tree Mark Brown
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=E1a7tGn-0002s1-7B@finisterre \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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