lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131004015349.GA5624@localhost>
Date:	Fri, 4 Oct 2013 09:53:49 +0800
From:	Fengguang Wu <fengguang.wu@...el.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Alexander Shiyan <shc_work@...l.ru>, kbuild-all@...org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: sccnxp: replace memcpy with struct assignment

On Thu, Oct 03, 2013 at 04:09:21PM -0700, Greg KH wrote:
> On Tue, Oct 01, 2013 at 07:31:15PM +0800, Fengguang Wu wrote:
> > Generated by: coccinelle/misc/memcpy-assign.cocci
> > 
> > CC: Alexander Shiyan <shc_work@...l.ru>
> > Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> > ---
> > 
> >  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 :(

Yeah, sorry! I'll take care next time..

   drivers/tty/serial/sccnxp.c: In function 'sccnxp_probe':
>> drivers/tty/serial/sccnxp.c:910:3: error: assignment of read-only member 'pdata'
      s->pdata = *pdata;                                                           
      ^                 
Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ