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: <5ca95d14-84a7-48af-a5e3-cefc558d2e7f@kernel.org>
Date: Wed, 4 Dec 2024 08:14:42 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Cameron Williams <cang1@...e.co.uk>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Fenghua Yu <fenghua.yu@...el.com>, linux-kernel@...r.kernel.org,
 linux-serial@...r.kernel.org, linux-pci@...r.kernel.org
Cc: Sudip Mukherjee <sudipm.mukherjee@...il.com>,
 Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v1 2/2] serial: 8250_pci: Share WCH IDs with
 parport_serial driver

On 04. 12. 24, 4:09, Andy Shevchenko wrote:
> parport_serial driver uses subset of WCH IDs that are present in 8250_pci.
> Share them via pci_ids.h and switch parport_serial to use defined constants.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>   drivers/parport/parport_serial.c   | 12 ++++++++----
>   drivers/tty/serial/8250/8250_pci.c | 10 ++--------
>   include/linux/pci_ids.h            | 11 +++++++++++
>   3 files changed, 21 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
> index 3644997a8342..24d4f3a3ec3d 100644
> --- a/drivers/parport/parport_serial.c
> +++ b/drivers/parport/parport_serial.c
> @@ -266,10 +266,14 @@ static struct pci_device_id parport_serial_pci_tbl[] = {
>   	{ 0x1409, 0x7168, 0x1409, 0xd079, 0, 0, timedia_9079c },
>   
>   	/* WCH CARDS */
> -	{ 0x4348, 0x5053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p},
> -	{ 0x4348, 0x7053, 0x4348, 0x3253, 0, 0, wch_ch353_2s1p},
> -	{ 0x1c00, 0x3050, 0x1c00, 0x3050, 0, 0, wch_ch382_0s1p},
> -	{ 0x1c00, 0x3250, 0x1c00, 0x3250, 0, 0, wch_ch382_2s1p},
> +	{ PCI_VENDOR_ID_WCHCN, PCI_DEVICE_ID_WCHCN_CH353_1S1P,
> +	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p },
> +	{ PCI_VENDOR_ID_WCHCN, PCI_DEVICE_ID_WCHCN_CH353_2S1P,
> +	  0x4348, 0x3253, 0, 0, wch_ch353_2s1p },
> +	{ PCI_VENDOR_ID_WCHIC, PCI_DEVICE_ID_WCHIC_CH382_0S1P,
> +	  0x1c00, 0x3050, 0, 0, wch_ch382_0s1p },
> +	{ PCI_VENDOR_ID_WCHIC, PCI_DEVICE_ID_WCHIC_CH382_2S1P,
> +	  0x1c00, 0x3250, 0, 0, wch_ch382_2s1p },

I know this is the current pattern in the file. But what about using 
PCI_DEVICE_DATA() for the first and PCI_DEVICE_SUB() + .driver_data for 
the rest? Otherwise it occurs as a load of incomprehensible constants.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ