forked from Mirrors/opensbi
lib: Delete redundant ulong
In `csr_read_allowed` and `csr_write_allowed` macros, has already converted second param to `ulong`. So delete redundant `ulong` where uses csr_read/write_allowed macros. Signed-off-by: Zhang RunMin <runmin.zhang@ingenic.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -167,11 +167,11 @@ int sbi_dbtr_init(struct sbi_scratch *scratch, bool coldboot)
|
||||
goto _probed;
|
||||
|
||||
for (i = 0; i < RV_MAX_TRIGGERS; i++) {
|
||||
csr_write_allowed(CSR_TSELECT, (ulong)&trap, i);
|
||||
csr_write_allowed(CSR_TSELECT, &trap, i);
|
||||
if (trap.cause)
|
||||
break;
|
||||
|
||||
val = csr_read_allowed(CSR_TSELECT, (ulong)&trap);
|
||||
val = csr_read_allowed(CSR_TSELECT, &trap);
|
||||
if (trap.cause)
|
||||
break;
|
||||
|
||||
@@ -182,7 +182,7 @@ int sbi_dbtr_init(struct sbi_scratch *scratch, bool coldboot)
|
||||
if (val != i)
|
||||
break;
|
||||
|
||||
val = csr_read_allowed(CSR_TINFO, (ulong)&trap);
|
||||
val = csr_read_allowed(CSR_TINFO, &trap);
|
||||
if (trap.cause) {
|
||||
/*
|
||||
* If reading tinfo caused an exception, the
|
||||
@@ -190,7 +190,7 @@ int sbi_dbtr_init(struct sbi_scratch *scratch, bool coldboot)
|
||||
* type.
|
||||
*/
|
||||
tdata1 = csr_read_allowed(CSR_TDATA1,
|
||||
(ulong)&trap);
|
||||
&trap);
|
||||
if (trap.cause)
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user