All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Jiri Slaby <jslaby@suse.cz>
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, 6 Sep 2012 15:08:10 +0800	[thread overview]
Message-ID: <20120906070810.GA21359@localhost> (raw)
In-Reply-To: <504849B4.4050303@suse.cz>

On Thu, Sep 06, 2012 at 08:59:00AM +0200, Jiri Slaby wrote:
> 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:

It's the tty:tty-next tree.

        git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next

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

Oh I didn't know it's a new bug introduced by commit

        commit 7ba2e769825fef035a943ed74d90379245508764
        Author:     Alan Cox <alan@linux.intel.com>
        AuthorDate: Tue Sep 4 16:34:45 2012 +0100
        Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        CommitDate: Wed Sep 5 13:11:03 2012 -0700

            tty: Split the serial_core helpers for setserial into two

Thanks,
Fengguang

  reply	other threads:[~2012-09-06  7:08 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
2012-09-06  7:08   ` Fengguang Wu [this message]
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=20120906070810.GA21359@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.