From: Fengguang Wu <fengguang.wu@intel.com>
To: linux-serial@vger.kernel.org
Cc: Alan Cox <alan@linux.intel.com>, Jiri Slaby <jslaby@suse.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] serial_core: fix sizeof(pointer)
Date: Thu, 6 Sep 2012 10:27:51 +0800 [thread overview]
Message-ID: <20120906022751.GA16285@localhost> (raw)
sizeof when applied to a pointer typed expression gives the
size of the pointer.
Generated by: scripts/coccinelle/misc/noderef.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
cocci-output-38612-39d907-serial_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -640,7 +640,7 @@ static void uart_get_info(struct tty_por
{
struct uart_port *uport = state->uart_port;
- memset(retinfo, 0, sizeof(retinfo));
+ memset(retinfo, 0, sizeof(*retinfo));
retinfo->type = uport->type;
retinfo->line = uport->line;
next reply other threads:[~2012-09-06 2:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 2:27 Fengguang Wu [this message]
2012-09-06 6:59 ` [PATCH] serial_core: fix sizeof(pointer) Jiri Slaby
2012-09-06 7:08 ` Fengguang Wu
2012-09-06 11:48 ` Alan Cox
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=20120906022751.GA16285@localhost \
--to=fengguang.wu@intel.com \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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).