From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Vaishali Thakkar <vthakkar1994@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH] ASoC: wm5102: Use put_unaligned_be16
Date: Wed, 7 Jan 2015 10:01:03 +0000 [thread overview]
Message-ID: <20150107100103.GR14516@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20141226044457.GA12777@vaishali-Ideapad-Z570>
On Fri, Dec 26, 2014 at 10:14:57AM +0530, Vaishali Thakkar wrote:
> This patch introduces the use of function put_unaligned_be16.
>
> This is done using Coccinelle and semantic patch used is as follows:
>
> @a@
> typedef u16, __be16, uint16_t;
> {u16,__be16,uint16_t} e16;
> identifier tmp;
> expression ptr;
> expression y,e;
> type T;
> @@
>
> - tmp = cpu_to_be16(y);
>
> <+... when != tmp
> (
> - memcpy(ptr, (T)&tmp, \(2\|sizeof(u16)\|sizeof(__be16)\|sizeof(uint16_t)\|sizeof(e16)\));
> + put_unaligned_be16(y,ptr);
> |
> - memcpy(ptr, (T)&tmp, ...);
> + put_unaligned_be16(y,ptr);
> )
> ...+>
> ? tmp = e
>
> @@ type T; identifier a.tmp; @@
>
> - T tmp;
> ...when != tmp
>
> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
CCing patches@opensource.wolfsonmicro.com would be handy though.
Thanks,
Charles
next prev parent reply other threads:[~2015-01-07 10:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-26 4:44 [PATCH] ASoC: wm5102: Use put_unaligned_be16 Vaishali Thakkar
2014-12-28 11:05 ` Vaishali Thakkar
2014-12-29 15:53 ` Mark Brown
2014-12-29 16:30 ` Vaishali Thakkar
2014-12-29 16:57 ` Mark Brown
2014-12-29 17:19 ` Vaishali Thakkar
2015-01-07 10:01 ` Charles Keepax [this message]
2015-01-07 15:24 ` Vaishali Thakkar
2015-01-07 16:47 ` Charles Keepax
2015-01-07 17:45 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2014-12-26 4:39 Vaishali Thakkar
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=20150107100103.GR14516@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=tiwai@suse.de \
--cc=vthakkar1994@gmail.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;
as well as URLs for NNTP newsgroup(s).