Re: [PATCH 2/2] asoc: soc-core: fix coccinelle warnings

Mark Brown
2014-02-24T05:40:16Z

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

On Mon, Feb 24, 2014 at 11:05:14AM +0800, Nenghua Cao wrote:
> On 02/22/2014 10:52 AM, Mark Brown wrote:

> > type changes. What coccinelle was suggesting here was to replace with a
> > simple assingment statement rather than change the argument within the
> > memcpy(), I think this stops the warning showing because of that issue

> I am not familiar with coccinelle. But it isn't reasonable and
> convenient to use simple assignment instead of memcpy() here. So let's
> retain it. I will submit another patch to fix "Assignment of bool to
> 0/1" issue. How do you think about it?

Well, the two should be separate patches anyway but it's totally
reasonable to do an assigment - what it's telling you is that with
modern C "a = b" is valid even if a and b are structs.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]