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: <CAPDyKFrZdHseZ6udjNSdOG7hwK82G1wT30j39A1KwKBAaY_cMg@mail.gmail.com>
Date: Wed, 15 Nov 2023 16:37:52 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>, Yang Yingliang <yangyingliang@...wei.com>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Mark Brown <broonie@...nel.org>, 
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-mmc@...r.kernel.org, netdev@...r.kernel.org, linux-usb@...r.kernel.org, 
	linux-spi@...r.kernel.org, Dmitry Torokhov <dmitry.torokhov@...il.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH v1 1/1] treewide, spi: Get rid of SPI_MASTER_HALF_DUPLEX

On Mon, 13 Nov 2023 at 12:15, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> The SPI_MASTER_HALF_DUPLEX is the legacy name of a definition
> for a half duplex flag. Since all others had been replaced with
> the respective SPI_CONTROLLER prefix get rid of the last one
> as well. There is no functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Acked-by: Ulf Hansson <ulf.hansson@...aro.org> # For MMC

> ---
>  drivers/input/rmi4/rmi_spi.c             | 2 +-
>  drivers/mmc/host/mmc_spi.c               | 2 +-
>  drivers/net/ethernet/micrel/ks8851_spi.c | 4 ++--
>  drivers/usb/gadget/udc/max3420_udc.c     | 2 +-
>  include/linux/spi/spi.h                  | 2 --
>  5 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_spi.c b/drivers/input/rmi4/rmi_spi.c
> index 852aeb0b2c07..07c866f42296 100644
> --- a/drivers/input/rmi4/rmi_spi.c
> +++ b/drivers/input/rmi4/rmi_spi.c
> @@ -375,7 +375,7 @@ static int rmi_spi_probe(struct spi_device *spi)
>         struct rmi_device_platform_data *spi_pdata = spi->dev.platform_data;
>         int error;
>
> -       if (spi->master->flags & SPI_MASTER_HALF_DUPLEX)
> +       if (spi->master->flags & SPI_CONTROLLER_HALF_DUPLEX)
>                 return -EINVAL;
>
>         rmi_spi = devm_kzalloc(&spi->dev, sizeof(struct rmi_spi_xport),
> diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
> index cc333ad67cac..b0cccef4cfbf 100644
> --- a/drivers/mmc/host/mmc_spi.c
> +++ b/drivers/mmc/host/mmc_spi.c
> @@ -1322,7 +1322,7 @@ static int mmc_spi_probe(struct spi_device *spi)
>         /* We rely on full duplex transfers, mostly to reduce
>          * per-transfer overheads (by making fewer transfers).
>          */
> -       if (spi->master->flags & SPI_MASTER_HALF_DUPLEX)
> +       if (spi->master->flags & SPI_CONTROLLER_HALF_DUPLEX)
>                 return -EINVAL;
>
>         /* MMC and SD specs only seem to care that sampling is on the
> diff --git a/drivers/net/ethernet/micrel/ks8851_spi.c b/drivers/net/ethernet/micrel/ks8851_spi.c
> index 70bc7253454f..7c41623dac90 100644
> --- a/drivers/net/ethernet/micrel/ks8851_spi.c
> +++ b/drivers/net/ethernet/micrel/ks8851_spi.c
> @@ -156,7 +156,7 @@ static void ks8851_rdreg(struct ks8851_net *ks, unsigned int op,
>
>         txb[0] = cpu_to_le16(op | KS_SPIOP_RD);
>
> -       if (kss->spidev->master->flags & SPI_MASTER_HALF_DUPLEX) {
> +       if (kss->spidev->master->flags & SPI_CONTROLLER_HALF_DUPLEX) {
>                 msg = &kss->spi_msg2;
>                 xfer = kss->spi_xfer2;
>
> @@ -180,7 +180,7 @@ static void ks8851_rdreg(struct ks8851_net *ks, unsigned int op,
>         ret = spi_sync(kss->spidev, msg);
>         if (ret < 0)
>                 netdev_err(ks->netdev, "read: spi_sync() failed\n");
> -       else if (kss->spidev->master->flags & SPI_MASTER_HALF_DUPLEX)
> +       else if (kss->spidev->master->flags & SPI_CONTROLLER_HALF_DUPLEX)
>                 memcpy(rxb, trx, rxl);
>         else
>                 memcpy(rxb, trx + 2, rxl);
> diff --git a/drivers/usb/gadget/udc/max3420_udc.c b/drivers/usb/gadget/udc/max3420_udc.c
> index 2d57786d3db7..89e8cf2a2a7d 100644
> --- a/drivers/usb/gadget/udc/max3420_udc.c
> +++ b/drivers/usb/gadget/udc/max3420_udc.c
> @@ -1201,7 +1201,7 @@ static int max3420_probe(struct spi_device *spi)
>         int err, irq;
>         u8 reg[8];
>
> -       if (spi->master->flags & SPI_MASTER_HALF_DUPLEX) {
> +       if (spi->master->flags & SPI_CONTROLLER_HALF_DUPLEX) {
>                 dev_err(&spi->dev, "UDC needs full duplex to work\n");
>                 return -EINVAL;
>         }
> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index 255a0562aea5..7b4baff63c5c 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -1638,8 +1638,6 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer)
>  /* Compatibility layer */
>  #define spi_master                     spi_controller
>
> -#define SPI_MASTER_HALF_DUPLEX         SPI_CONTROLLER_HALF_DUPLEX
> -
>  #define spi_master_get_devdata(_ctlr)  spi_controller_get_devdata(_ctlr)
>  #define spi_master_set_devdata(_ctlr, _data)   \
>         spi_controller_set_devdata(_ctlr, _data)
> --
> 2.43.0.rc1.1.gbec44491f096
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ