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: <20240423113415.7e81fa1de7f98f91d244b87a@hugovil.com>
Date: Tue, 23 Apr 2024 11:34:15 -0400
From: Hugo Villeneuve <hugo@...ovil.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>, gregkh@...uxfoundation.org,
 jirislaby@...nel.org, peterz@...radead.org, mingo@...nel.org,
 linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, Hugo Villeneuve
 <hvilleneuve@...onoff.com>
Subject: Re: [PATCH v4 3/5] serial: sc16is7xx: split into core and I2C/SPI
 parts (core)

On Tue, 23 Apr 2024 15:11:12 +0200
Geert Uytterhoeven <geert@...ux-m68k.org> wrote:

Hi Geert,

> Hi Andy,
> 
> On Tue, Apr 23, 2024 at 12:37 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Tue, Apr 23, 2024 at 1:01 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > > On Tue, Apr 9, 2024 at 5:48 PM Hugo Villeneuve <hugo@...ovil.com> wrote:
> 
> > > > -config SERIAL_SC16IS7XX
> > > > -       tristate "SC16IS7xx serial support"
> > > > +       tristate "NXP SC16IS7xx UART support"
> > >
> > > Hence this replaces SERIAL_SC16IS7XX_CORE by SERIAL_SC16IS7XX,
> > > so arch/mips/configs/cu1??0-neo_defconfig needs to updated.
> >
> >         select SERIAL_CORE
> > -       depends on (SPI_MASTER && !I2C) || I2C
> > +       select SERIAL_SC16IS7XX_SPI if SPI_MASTER
> > +       select SERIAL_SC16IS7XX_I2C if I2C
> >
> > > So if SPI_MASTER or I2C is enabled, the corresponding SERIAL_SC16IS7XX_*
> > > subdriver can no longer be disabled?  According to
> > > https://lore.kernel.org/all/20240403123501.8ef5c99f65a40ca2c10f635a@hugovil.com/
> > > you did want to support that?
> >
> > I believe it has been taken from one of the IIO drivers as an example.
> 
> Looks like a bad example to follow:
>   1. The driver question now pops up if both I2C and SPI_MASTER
>      are disabled,

True.

V3 originally had this:

>  config SERIAL_SC16IS7XX
>         tristate "SC16IS7xx serial support"
>         select SERIAL_CORE
> -       depends on (SPI_MASTER && !I2C) || I2C
> +       depends on SPI_MASTER || I2C

And Andy commented "Is it?", which I probably misinterpreted as I should
not list them as dependencies.

Reintroducing "depends on SPI_MASTER || I2C" fixes this issue.


>   2. What if SERIAL_SC16IS7XX_CORE is builtin, but I2C and/or
>      SPI_MASTER are modular?

a) SERIAL_SC16IS7XX builtin and I2C modular:
CONFIG_SERIAL_SC16IS7XX=y
CONFIG_SERIAL_SC16IS7XX_I2C=m
CONFIG_SERIAL_SC16IS7XX_SPI=y

SPI_MASTER is only boolean and cannot be modular.

Hugo.


> 
> I believe the only way to fix that is by letting the sub-drivers select the
> core driver, like before.
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 


-- 
Hugo Villeneuve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ