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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230308145551.3240-1-sensor1010@163.com>
Date:   Wed,  8 Mar 2023 22:55:51 +0800
From:   Lizhe <sensor1010@....com>
To:     fancer.lancer@...il.com, broonie@...nel.org
Cc:     linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Lizhe <sensor1010@....com>
Subject: [PATCH v1] drivers/spi-dw-core.c : remove redundant function spi_controller_set_devdata

in spi_alloc_master() already exists master_controller_set_devdata()
called, add the struct dw_spi is passed to the spi_alloc_master() as
the second parameter.

Signed-off-by: Lizhe <sensor1010@....com>
---
 drivers/spi/spi-dw-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
index c3bfb6c84cab..ad776c7eb66c 100644
--- a/drivers/spi/spi-dw-core.c
+++ b/drivers/spi/spi-dw-core.c
@@ -892,7 +892,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 	if (!dws)
 		return -EINVAL;
 
-	master = spi_alloc_master(dev, 0);
+	master = spi_alloc_master(dev, sizeof(*dws));
 	if (!master)
 		return -ENOMEM;
 
@@ -901,8 +901,6 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 	dws->master = master;
 	dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR);
 
-	spi_controller_set_devdata(master, dws);
-
 	/* Basic HW init */
 	dw_spi_hw_init(dev, dws);
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ