Skip to content

Commit b3d57e1

Browse files
bastien-curutchetkrzk
authored andcommitted
memory: ti-aemif: Remove unnecessary local variables
CS timings are copied to local variables that are then used as is, without any modifications. Remove these unneeded local variables and deal directly with the timings stored in the struct aemif_cs_data. Signed-off-by: Bastien Curutchet <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 1ec0fa9 commit b3d57e1

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

drivers/memory/ti-aemif.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,14 @@ static int aemif_config_abus(struct platform_device *pdev, int csnum)
174174
{
175175
struct aemif_device *aemif = platform_get_drvdata(pdev);
176176
struct aemif_cs_data *data = &aemif->cs_data[csnum];
177-
int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
178177
unsigned offset;
179178
u32 set, val;
180179

181180
offset = A1CR_OFFSET + (data->cs - aemif->cs_offset) * 4;
182181

183-
ta = data->ta;
184-
rhold = data->rhold;
185-
rstrobe = data->rstrobe;
186-
rsetup = data->rsetup;
187-
whold = data->whold;
188-
wstrobe = data->wstrobe;
189-
wsetup = data->wsetup;
190-
191-
set = TA(ta) | RHOLD(rhold) | RSTROBE(rstrobe) | RSETUP(rsetup) |
192-
WHOLD(whold) | WSTROBE(wstrobe) | WSETUP(wsetup);
182+
set = TA(data->ta) |
183+
RHOLD(data->rhold) | RSTROBE(data->rstrobe) | RSETUP(data->rsetup) |
184+
WHOLD(data->whold) | WSTROBE(data->wstrobe) | WSETUP(data->wsetup);
193185

194186
set |= (data->asize & ACR_ASIZE_MASK);
195187
if (data->enable_ew)

0 commit comments

Comments
 (0)