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]
Message-ID: <PH7PR11MB5958DF2284FDC67FA7018E9B9BE69@PH7PR11MB5958.namprd11.prod.outlook.com>
Date:   Fri, 16 Dec 2022 05:40:31 +0000
From:   <Tharunkumar.Pasumarthi@...rochip.com>
To:     <andriy.shevchenko@...ux.intel.com>,
        <Kumaravel.Thiagarajan@...rochip.com>
CC:     <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>,
        <gregkh@...uxfoundation.org>, <jirislaby@...nel.org>,
        <ilpo.jarvinen@...ux.intel.com>, <macro@...am.me.uk>,
        <cang1@...e.co.uk>, <colin.i.king@...il.com>,
        <phil.edworthy@...esas.com>, <biju.das.jz@...renesas.com>,
        <geert+renesas@...der.be>, <lukas@...ner.de>,
        <u.kleine-koenig@...gutronix.de>, <wander@...hat.com>,
        <etremblay@...tech-controls.com>, <jk@...abs.org>,
        <UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH v9 tty-next 2/4] serial: 8250_pci1xxxx: Add driver for
 quad-uart support

> From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Sent: Thursday, December 15, 2022 11:13 PM
> To: Kumaravel Thiagarajan - I21417
> <Kumaravel.Thiagarajan@...rochip.com>
> <Tharunkumar.Pasumarthi@...rochip.com>
> Subject: Re: [PATCH v9 tty-next 2/4] serial: 8250_pci1xxxx: Add driver for
> quad-uart support
> 
> > +     ret = serial8250_pci_setup_port(pdev, port, 0, port_idx * 256,
> > + 0);
> 
> Actually isn't 0x100 better (show that there is an offset rather than a value of
> an register)? 

Okay, I will so something like this,
#define PORT_OFFSET 0x100
ret = serial8250_pci_setup_port(pdev, port, 0, PORT_OFFSET * port_idx, 0);
 
> > +     num_vectors = pci_alloc_irq_vectors(pdev, 1, max_vec_reqd,
> PCI_IRQ_ALL_TYPES);
> > +     if (num_vectors < 0) {
> 
> > +             pci_iounmap(pdev, priv->membase);
> 
> Here is inconsistency on how you interpret pci_*() calls when
> pcim_enable_device() has been used. I.e. for IRQ you don't deallocate
> resources explicitly (yes, it's done automatically anyway), but you explicitly
> call pci_iounmap(). Choose a single approach for all of them.

AFAIK call to pci_iounmap cannot be avoided since pci_ioremap_bar is not 'managed' API.
You suggest calling pci_free_irq_vectors (even though it is not mandatory)?

Thanks,
Tharun Kumar P

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ