lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Sep 2016 13:17:29 +0200
From:   Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:     "Ji-Ze Hong (Peter Hong)" <hpeter@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, Arnd Bergmann <arnd@...db.de>,
        Peter Hurley <peter@...leysoftware.com>,
        linux-serial@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        PA20 TOM TSAI 蔡宗佑 
        <tom_tsai@...tek.com.tw>, Peter H <peter_hong@...tek.com.tw>,
        "Ji-Ze Hong (Peter Hong)" <hpeter+linux_kernel@...il.com>
Subject: Re: [PATCH 4/7] serial: 8250_fintek: Rearrange function

On one previous patch you almost rewrote theset_irq_mode function and
added the prototype. It might be a good moment to move the whole
function up.

On Thu, Sep 1, 2016 at 5:39 AM, Ji-Ze Hong (Peter Hong)
<hpeter@...il.com> wrote:
> We change the position of fintek_8250_set_irq_mode() above the
> find_base_port() to eliminate the prototype define.
>
> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@...il.com>
> ---
>  drivers/tty/serial/8250/8250_fintek.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
> index 5625203..921f742 100644
> --- a/drivers/tty/serial/8250/8250_fintek.c
> +++ b/drivers/tty/serial/8250/8250_fintek.c
> @@ -56,9 +56,6 @@ struct fintek_8250 {
>         u8 key;
>  };
>
> -static void fintek_8250_set_irq_mode(struct fintek_8250 *pdata,
> -                                    bool level_mode);
> -
>  static u8 sio_read_reg(struct fintek_8250 *pdata, u8 reg)
>  {
>         outb(reg, pdata->base_port + ADDR_PORT);
> @@ -179,6 +176,14 @@ static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata)
>         }
>  }
>
> +static void fintek_8250_set_irq_mode(struct fintek_8250 *pdata, bool is_level)
> +{
> +       sio_write_reg(pdata, LDN, pdata->index);
> +       sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_SHARE, IRQ_SHARE);
> +       sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_MODE_MASK,
> +                          is_level ? IRQ_LEVEL_LOW : IRQ_EDGE_HIGH);
> +}
> +
>  static int find_base_port(struct fintek_8250 *pdata, u16 io_address,
>                           unsigned int irq)
>  {
> @@ -230,14 +235,6 @@ static int find_base_port(struct fintek_8250 *pdata, u16 io_address,
>         return -ENODEV;
>  }
>
> -static void fintek_8250_set_irq_mode(struct fintek_8250 *pdata, bool is_level)
> -{
> -       sio_write_reg(pdata, LDN, pdata->index);
> -       sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_SHARE, IRQ_SHARE);
> -       sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_MODE_MASK,
> -                          is_level ? IRQ_LEVEL_LOW : IRQ_EDGE_HIGH);
> -}
> -
>  int fintek_8250_probe(struct uart_8250_port *uart)
>  {
>         struct fintek_8250 *pdata;
> --
> 1.9.1
>



-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ