Commit 39070cb8a39a84f3379dd8d1dab489e06f3a50a7

Authored by Chris Zankel
1 parent 795ca178c4

xtensa: minor compiler warning fix

Fix two compiler warnings complaining about truncating a value on
a 64-bit host, and about declaring an unused variable that is only
used for a specific configuration.

Signed-off-by: Chris Zankel <chris@zankel.net>

Showing 2 changed files with 5 additions and 2 deletions Side-by-side Diff

arch/xtensa/kernel/entry.S
... ... @@ -1542,7 +1542,7 @@
1542 1542 * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY
1543 1543 */
1544 1544  
1545   - movi a1, -PAGE_OFFSET
  1545 + movi a1, (-PAGE_OFFSET) & 0xffffffff
1546 1546 add a0, a0, a1 # pmdval - PAGE_OFFSET
1547 1547 extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK
1548 1548 xor a0, a0, a1
arch/xtensa/kernel/process.c
... ... @@ -190,9 +190,12 @@
190 190 struct task_struct * p, struct pt_regs * regs)
191 191 {
192 192 struct pt_regs *childregs;
193   - struct thread_info *ti;
194 193 unsigned long tos;
195 194 int user_mode = user_mode(regs);
  195 +
  196 +#if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS)
  197 + struct thread_info *ti;
  198 +#endif
196 199  
197 200 /* Set up new TSS. */
198 201 tos = (unsigned long)task_stack_page(p) + THREAD_SIZE;