Skip to content

Commit 50802d8

Browse files
committed
m68k: sun3: Fix indentation by 5 or 7 spaces
Indentation should use TABs, not spaces. Fix whitespace in reindented code while at it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/167216dfe9795056b7a69415695772887aca6d80.1696602993.git.geert@linux-m68k.org
1 parent 8851453 commit 50802d8

File tree

3 files changed

+60
-62
lines changed

3 files changed

+60
-62
lines changed

arch/m68k/include/asm/sun3_pgalloc.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page
4141

4242
static inline pgd_t * pgd_alloc(struct mm_struct *mm)
4343
{
44-
pgd_t *new_pgd;
44+
pgd_t *new_pgd;
4545

46-
new_pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
47-
memcpy(new_pgd, swapper_pg_dir, PAGE_SIZE);
48-
memset(new_pgd, 0, (PAGE_OFFSET >> PGDIR_SHIFT));
49-
return new_pgd;
46+
new_pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL);
47+
memcpy(new_pgd, swapper_pg_dir, PAGE_SIZE);
48+
memset(new_pgd, 0, (PAGE_OFFSET >> PGDIR_SHIFT));
49+
return new_pgd;
5050
}
5151

5252
#endif /* SUN3_PGALLOC_H */

arch/m68k/include/asm/tlbflush.h

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -112,53 +112,51 @@ extern unsigned char pmeg_ctx[SUN3_PMEGS_NUM];
112112
sun?) */
113113
static inline void flush_tlb_all(void)
114114
{
115-
unsigned long addr;
116-
unsigned char ctx, oldctx;
117-
118-
oldctx = sun3_get_context();
119-
for(addr = 0x00000000; addr < TASK_SIZE; addr += SUN3_PMEG_SIZE) {
120-
for(ctx = 0; ctx < 8; ctx++) {
121-
sun3_put_context(ctx);
122-
sun3_put_segmap(addr, SUN3_INVALID_PMEG);
123-
}
124-
}
125-
126-
sun3_put_context(oldctx);
127-
/* erase all of the userspace pmeg maps, we've clobbered them
128-
all anyway */
129-
for(addr = 0; addr < SUN3_INVALID_PMEG; addr++) {
130-
if(pmeg_alloc[addr] == 1) {
131-
pmeg_alloc[addr] = 0;
132-
pmeg_ctx[addr] = 0;
133-
pmeg_vaddr[addr] = 0;
134-
}
135-
}
115+
unsigned long addr;
116+
unsigned char ctx, oldctx;
136117

118+
oldctx = sun3_get_context();
119+
for (addr = 0x00000000; addr < TASK_SIZE; addr += SUN3_PMEG_SIZE) {
120+
for (ctx = 0; ctx < 8; ctx++) {
121+
sun3_put_context(ctx);
122+
sun3_put_segmap(addr, SUN3_INVALID_PMEG);
123+
}
124+
}
125+
126+
sun3_put_context(oldctx);
127+
/* erase all of the userspace pmeg maps, we've clobbered them
128+
all anyway */
129+
for (addr = 0; addr < SUN3_INVALID_PMEG; addr++) {
130+
if (pmeg_alloc[addr] == 1) {
131+
pmeg_alloc[addr] = 0;
132+
pmeg_ctx[addr] = 0;
133+
pmeg_vaddr[addr] = 0;
134+
}
135+
}
137136
}
138137

139138
/* Clear user TLB entries within the context named in mm */
140139
static inline void flush_tlb_mm (struct mm_struct *mm)
141140
{
142-
unsigned char oldctx;
143-
unsigned char seg;
144-
unsigned long i;
145-
146-
oldctx = sun3_get_context();
147-
sun3_put_context(mm->context);
141+
unsigned char oldctx;
142+
unsigned char seg;
143+
unsigned long i;
148144

149-
for(i = 0; i < TASK_SIZE; i += SUN3_PMEG_SIZE) {
150-
seg = sun3_get_segmap(i);
151-
if(seg == SUN3_INVALID_PMEG)
152-
continue;
145+
oldctx = sun3_get_context();
146+
sun3_put_context(mm->context);
153147

154-
sun3_put_segmap(i, SUN3_INVALID_PMEG);
155-
pmeg_alloc[seg] = 0;
156-
pmeg_ctx[seg] = 0;
157-
pmeg_vaddr[seg] = 0;
158-
}
148+
for (i = 0; i < TASK_SIZE; i += SUN3_PMEG_SIZE) {
149+
seg = sun3_get_segmap(i);
150+
if (seg == SUN3_INVALID_PMEG)
151+
continue;
159152

160-
sun3_put_context(oldctx);
153+
sun3_put_segmap(i, SUN3_INVALID_PMEG);
154+
pmeg_alloc[seg] = 0;
155+
pmeg_ctx[seg] = 0;
156+
pmeg_vaddr[seg] = 0;
157+
}
161158

159+
sun3_put_context(oldctx);
162160
}
163161

164162
/* Flush a single TLB page. In this case, we're limited to flushing a

arch/m68k/sun3/mmu_emu.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -207,32 +207,32 @@ void __init mmu_emu_init(unsigned long bootmem_end)
207207
context for when they're cleared */
208208
void clear_context(unsigned long context)
209209
{
210-
unsigned char oldctx;
211-
unsigned long i;
210+
unsigned char oldctx;
211+
unsigned long i;
212212

213-
if(context) {
214-
if(!ctx_alloc[context])
215-
panic("%s: context not allocated\n", __func__);
213+
if (context) {
214+
if (!ctx_alloc[context])
215+
panic("%s: context not allocated\n", __func__);
216216

217-
ctx_alloc[context]->context = SUN3_INVALID_CONTEXT;
218-
ctx_alloc[context] = (struct mm_struct *)0;
219-
ctx_avail++;
220-
}
217+
ctx_alloc[context]->context = SUN3_INVALID_CONTEXT;
218+
ctx_alloc[context] = (struct mm_struct *)0;
219+
ctx_avail++;
220+
}
221221

222-
oldctx = sun3_get_context();
222+
oldctx = sun3_get_context();
223223

224-
sun3_put_context(context);
224+
sun3_put_context(context);
225225

226-
for(i = 0; i < SUN3_INVALID_PMEG; i++) {
227-
if((pmeg_ctx[i] == context) && (pmeg_alloc[i] == 1)) {
228-
sun3_put_segmap(pmeg_vaddr[i], SUN3_INVALID_PMEG);
229-
pmeg_ctx[i] = 0;
230-
pmeg_alloc[i] = 0;
231-
pmeg_vaddr[i] = 0;
232-
}
233-
}
226+
for (i = 0; i < SUN3_INVALID_PMEG; i++) {
227+
if ((pmeg_ctx[i] == context) && (pmeg_alloc[i] == 1)) {
228+
sun3_put_segmap(pmeg_vaddr[i], SUN3_INVALID_PMEG);
229+
pmeg_ctx[i] = 0;
230+
pmeg_alloc[i] = 0;
231+
pmeg_vaddr[i] = 0;
232+
}
233+
}
234234

235-
sun3_put_context(oldctx);
235+
sun3_put_context(oldctx);
236236
}
237237

238238
/* gets an empty context. if full, kills the next context listed to

0 commit comments

Comments
 (0)