linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Shiyan <shc_work@mail.ru>,
	kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: [PATCH] serial: sccnxp: replace memcpy with struct assignment
Date: Tue, 1 Oct 2013 19:31:15 +0800	[thread overview]
Message-ID: <20131001113115.GB5525@localhost> (raw)
In-Reply-To: <20131001020847.GA9317@kroah.com>

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",

       reply	other threads:[~2013-10-01 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5244e22f.VLBQtuO7RvNh9dWF%fengguang.wu@intel.com>
     [not found] ` <20131001020847.GA9317@kroah.com>
2013-10-01 11:31   ` Fengguang Wu [this message]
2013-10-03 23:09     ` [PATCH] serial: sccnxp: replace memcpy with struct assignment Greg Kroah-Hartman
2013-10-04  1:53       ` Fengguang Wu

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=20131001113115.GB5525@localhost \
    --to=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shc_work@mail.ru \
    /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).