From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754325Ab3JCXJG (ORCPT ); Thu, 3 Oct 2013 19:09:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58950 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753386Ab3JCXJE (ORCPT ); Thu, 3 Oct 2013 19:09:04 -0400 Date: Thu, 3 Oct 2013 16:09:21 -0700 From: Greg Kroah-Hartman To: Fengguang Wu Cc: Alexander Shiyan , kbuild-all@01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: sccnxp: replace memcpy with struct assignment Message-ID: <20131003230921.GA5559@kroah.com> References: <5244e22f.VLBQtuO7RvNh9dWF%fengguang.wu@intel.com> <20131001020847.GA9317@kroah.com> <20131001113115.GB5525@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131001113115.GB5525@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 01, 2013 at 07:31:15PM +0800, Fengguang Wu wrote: > Generated by: coccinelle/misc/memcpy-assign.cocci > > CC: Alexander Shiyan > Signed-off-by: Fengguang Wu > --- > > drivers/tty/serial/sccnxp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-next.orig/drivers/tty/serial/sccnxp.c 2013-10-01 19:27:55.057537955 +0800 > +++ linux-next/drivers/tty/serial/sccnxp.c 2013-10-01 19:28:17.873536923 +0800 > @@ -907,7 +907,7 @@ static int sccnxp_probe(struct platform_ > } > > if (pdata) > - memcpy(&s->pdata, pdata, sizeof(struct sccnxp_pdata)); > + s->pdata = *pdata; I don't think you compiled this, as it breaks the build :(