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] [day] [month] [year] [list]
Message-ID: <CAHp75VfGZf_aM4+ta10kxaktwvkk9XiV=8ttAg7hcFV-rBtY1g@mail.gmail.com>
Date:   Fri, 4 Nov 2022 14:50:07 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Tharunkumar.Pasumarthi@...rochip.com
Cc:     Kumaravel.Thiagarajan@...rochip.com, gregkh@...uxfoundation.org,
        jirislaby@...nel.org, ilpo.jarvinen@...ux.intel.com,
        u.kleine-koenig@...gutronix.de, johan@...nel.org,
        wander@...hat.com, etremblay@...tech-controls.com,
        macro@...am.me.uk, geert+renesas@...der.be, jk@...abs.org,
        phil.edworthy@...esas.com, lukas@...ner.de,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
        UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v2 tty-next 3/3] 8250: microchip: pci1xxxx: Add power
 management functions to quad-uart driver.

On Fri, Nov 4, 2022 at 12:23 PM <Tharunkumar.Pasumarthi@...rochip.com> wrote:
> > From: Andy Shevchenko <andy.shevchenko@...il.com>
> > Sent: Monday, October 3, 2022 2:57 PM

> > If you have similarities with 8250_pci, probably you need to split it to
> > 8250_pcilib.c and share. (See how 8250_dw /8250_lpss are done in that
> > sense.)
>
> All the functions used in 8250_pci1xxxx.c  that have similarity with 8250_pci use registers
> that are specific to our IP.  The only function that can be moved to common library is the
> setup_port. But, for that the first argument of setup_port must be changed to
> 'struct pci_dev *dev' (priv->dev).  Do you suggest doing this?

So, you can create a common serial8250_setup_port(struct pci_dev *dev,
...) and call it from the static setup_port() inside 8250_pci.c. This
way you won't introduce too many churn.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ