public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: linux-serial@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial_core: fix sizeof(pointer)
Date: Thu, 06 Sep 2012 08:59:00 +0200	[thread overview]
Message-ID: <504849B4.4050303@suse.cz> (raw)
In-Reply-To: <20120906022751.GA16285@localhost>

On 09/06/2012 04:27 AM, Fengguang Wu wrote:
> 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));

Hmm, what tree is this against? I have:

memset(&tmp, 0, sizeof(tmp));

thanks,
-- 
js
suse labs

  reply	other threads:[~2012-09-06  6:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06  2:27 [PATCH] serial_core: fix sizeof(pointer) Fengguang Wu
2012-09-06  6:59 ` Jiri Slaby [this message]
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=504849B4.4050303@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alan@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --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