All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizefan@huawei.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: stable@vger.kernel.org, linux-serial@vger.kernel.org,
	Stephen Hurd <shurd@broadcom.com>,
	Michael Chan <mchan@broadcom.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	Rui Xiang <rui.xiang@huawei.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 3.4.x-stable] 8250_pci: fix warnings in backport of Broadcom TruManage support
Date: Tue, 16 Sep 2014 18:06:26 +0800	[thread overview]
Message-ID: <54180BA2.9030605@huawei.com> (raw)
In-Reply-To: <1408988000-32987-1-git-send-email-paul.gortmaker@windriver.com>

On 2014/8/26 1:33, Paul Gortmaker wrote:
> commit 7400ce7ee9595432b2a1402b6ffcac9faf38d9ae (v3.4.92-76-g7400ce7ee959)
> was a backport of commit ebebd49a8eab5e9aa1b1f8f1614ccc3c2120f886 upstream
> ("8250/16?50: Add support for Broadcom TruManage redirected serial port")
> 
> However, in the context of 3.4.x kernels, the pci setup code was
> expecting a struct uart_port and not a struct uart_8250_port, leading to
> the following concerning warnings:
> 
> drivers/tty/serial/8250/8250_pci.c: In function ‘pci_brcm_trumanage_setup’:
> drivers/tty/serial/8250/8250_pci.c:1086:2: warning: passing argument 3 of ‘pci_default_setup’ from incompatible pointer type [enabled by default]
>   int ret = pci_default_setup(priv, board, port, idx);
>   ^
> drivers/tty/serial/8250/8250_pci.c:1036:1: note: expected ‘struct uart_port *’ but argument is of type ‘struct uart_8250_port *’
>  pci_default_setup(struct serial_private *priv,
>  ^
> drivers/tty/serial/8250/8250_pci.c: At top level:
> drivers/tty/serial/8250/8250_pci.c:1746:3: warning: initialization from incompatible pointer type [enabled by default]
>    .setup  = pci_brcm_trumanage_setup,
>    ^
> drivers/tty/serial/8250/8250_pci.c:1746:3: warning: (near initialization for ‘pci_serial_quirks[56].setup’) [enabled by default]
> 
> I'd also expect the initialization to not function correctly, and
> perhaps dereference random garbage due to this.  Since the uart_port
> is a field within the uart_8250_port, the adaptation to fix these
> warnings is a straightforward removal of a layer of indirection.
> 
> Cc: Stephen Hurd <shurd@broadcom.com>
> Cc: Michael Chan <mchan@broadcom.com>
> Cc: Ben Hutchings <ben@decadent.org.uk>
> Cc: Rui Xiang <rui.xiang@huawei.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Applied to 3.4. Thanks.

      reply	other threads:[~2014-09-16 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 17:33 [PATCH 3.4.x-stable] 8250_pci: fix warnings in backport of Broadcom TruManage support Paul Gortmaker
2014-09-16 10:06 ` Li Zefan [this message]

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=54180BA2.9030605@huawei.com \
    --to=lizefan@huawei.com \
    --cc=ben@decadent.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=rui.xiang@huawei.com \
    --cc=shurd@broadcom.com \
    --cc=stable@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.