diff mbox

[U-Boot,2/5] x86: ich-spi: Remove unnecessary assignment in ich_init_controller()

Message ID 1502861911-14366-2-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 7d8297892715563a7d9ff6ff90876fd7cbeddd30
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng Aug. 16, 2017, 5:38 a.m. UTC
There is no need to do another assignment to ich7_spi.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/spi/ich.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Stefan Roese Aug. 16, 2017, 6:18 a.m. UTC | #1
On 16.08.2017 07:38, Bin Meng wrote:
> There is no need to do another assignment to ich7_spi.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
> 
>   drivers/spi/ich.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
> index 46dd9a8..909eefc 100644
> --- a/drivers/spi/ich.c
> +++ b/drivers/spi/ich.c
> @@ -126,7 +126,6 @@ static int ich_init_controller(struct udevice *dev,
>   	if (plat->ich_version == ICHV_7) {
>   		struct ich7_spi_regs *ich7_spi = sbase;
>   
> -		ich7_spi = (struct ich7_spi_regs *)sbase;
>   		ctlr->ichspi_lock = readw(&ich7_spi->spis) & SPIS_LOCK;
>   		ctlr->opmenu = offsetof(struct ich7_spi_regs, opmenu);
>   		ctlr->menubytes = sizeof(ich7_spi->opmenu);
> 

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Bin Meng Aug. 24, 2017, 3:17 a.m. UTC | #2
On Wed, Aug 16, 2017 at 2:18 PM, Stefan Roese <sr@denx.de> wrote:
> On 16.08.2017 07:38, Bin Meng wrote:
>>
>> There is no need to do another assignment to ich7_spi.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>   drivers/spi/ich.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
>> index 46dd9a8..909eefc 100644
>> --- a/drivers/spi/ich.c
>> +++ b/drivers/spi/ich.c
>> @@ -126,7 +126,6 @@ static int ich_init_controller(struct udevice *dev,
>>         if (plat->ich_version == ICHV_7) {
>>                 struct ich7_spi_regs *ich7_spi = sbase;
>>   -             ich7_spi = (struct ich7_spi_regs *)sbase;
>>                 ctlr->ichspi_lock = readw(&ich7_spi->spis) & SPIS_LOCK;
>>                 ctlr->opmenu = offsetof(struct ich7_spi_regs, opmenu);
>>                 ctlr->menubytes = sizeof(ich7_spi->opmenu);
>>
>
> Reviewed-by: Stefan Roese <sr@denx.de>

applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 46dd9a8..909eefc 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -126,7 +126,6 @@  static int ich_init_controller(struct udevice *dev,
 	if (plat->ich_version == ICHV_7) {
 		struct ich7_spi_regs *ich7_spi = sbase;
 
-		ich7_spi = (struct ich7_spi_regs *)sbase;
 		ctlr->ichspi_lock = readw(&ich7_spi->spis) & SPIS_LOCK;
 		ctlr->opmenu = offsetof(struct ich7_spi_regs, opmenu);
 		ctlr->menubytes = sizeof(ich7_spi->opmenu);