* [PATCH] serial: sccnxp: replace memcpy with struct assignment [not found] ` <20131001020847.GA9317@kroah.com> @ 2013-10-01 11:31 ` Fengguang Wu 2013-10-03 23:09 ` Greg Kroah-Hartman 0 siblings, 1 reply; 3+ messages in thread From: Fengguang Wu @ 2013-10-01 11:31 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: Alexander Shiyan, kbuild-all, linux-kernel Generated by: coccinelle/misc/memcpy-assign.cocci CC: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Fengguang Wu <fengguang.wu@intel.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; if (s->pdata.poll_time_us) { dev_info(&pdev->dev, "Using poll mode, resolution %u usecs\n", ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: sccnxp: replace memcpy with struct assignment 2013-10-01 11:31 ` [PATCH] serial: sccnxp: replace memcpy with struct assignment Fengguang Wu @ 2013-10-03 23:09 ` Greg Kroah-Hartman 2013-10-04 1:53 ` Fengguang Wu 0 siblings, 1 reply; 3+ messages in thread From: Greg Kroah-Hartman @ 2013-10-03 23:09 UTC (permalink / raw) To: Fengguang Wu; +Cc: Alexander Shiyan, kbuild-all, linux-kernel 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@mail.ru> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.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 :( ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: sccnxp: replace memcpy with struct assignment 2013-10-03 23:09 ` Greg Kroah-Hartman @ 2013-10-04 1:53 ` Fengguang Wu 0 siblings, 0 replies; 3+ messages in thread From: Fengguang Wu @ 2013-10-04 1:53 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: Alexander Shiyan, kbuild-all, linux-kernel 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@mail.ru> > > Signed-off-by: Fengguang Wu <fengguang.wu@intel.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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-04 1:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5244e22f.VLBQtuO7RvNh9dWF%fengguang.wu@intel.com>
[not found] ` <20131001020847.GA9317@kroah.com>
2013-10-01 11:31 ` [PATCH] serial: sccnxp: replace memcpy with struct assignment Fengguang Wu
2013-10-03 23:09 ` Greg Kroah-Hartman
2013-10-04 1:53 ` Fengguang Wu
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).