Revision 0228ecf6128c92b47eadd2ac270c5574d9150c09 authored by Paul Burton on 01 October 2019, 21:56:37 UTC, committed by Paul Burton on 02 October 2019, 17:08:20 UTC
Commit 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") moved
the inclusion of a bunch of headers by various files in the Octeon
ethernet driver into a common header, but in doing so it changed the
order in which those headers are included.

Prior to the referenced commit drivers/staging/octeon/ethernet.c
included asm/octeon/cvmx-pip.h before asm/octeon/cvmx-ipd.h, which makes
use of the CVMX_PIP_SFT_RST definition pulled in by the former. After
commit 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") we
pull in asm/octeon/cvmx-ipd.h first & builds fail with:

  In file included from drivers/staging/octeon/octeon-ethernet.h:27,
                   from drivers/staging/octeon/ethernet.c:22:
  arch/mips/include/asm/octeon/cvmx-ipd.h: In function 'cvmx_ipd_free_ptr':
  arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: error: storage size of
    'pip_sft_rst' isn't known
      union cvmx_pip_sft_rst pip_sft_rst;
                             ^~~~~~~~~~~
  arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: error: 'CVMX_PIP_SFT_RST'
    undeclared (first use in this function); did you mean 'CVMX_CIU_SOFT_RST'?
      pip_sft_rst.u64 = cvmx_read_csr(CVMX_PIP_SFT_RST);
                                      ^~~~~~~~~~~~~~~~
                                      CVMX_CIU_SOFT_RST
  arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: note: each undeclared
    identifier is reported only once for each function it appears in
  arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: warning: unused variable
    'pip_sft_rst' [-Wunused-variable]
      union cvmx_pip_sft_rst pip_sft_rst;
                             ^~~~~~~~~~~
  make[4]: *** [scripts/Makefile.build:266: drivers/staging/octeon/ethernet.o]
    Error 1
  make[3]: *** [scripts/Makefile.build:509: drivers/staging/octeon] Error 2

Fix this by having asm/octeon/cvmx-ipd.h include the
asm/octeon/cvmx-pip-defs.h header that it is reliant upon, rather than
requiring its users to pull in that header before it.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS")
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: linux-mips@vger.kernel.org
Cc: David S . Miller <davem@davemloft.net>
Cc: Matthew Wilcox <willy@infradead.org>
1 parent d345d9c
History
File Mode Size
bpf
cgroup
configs
debug
dma
events
gcov
irq
livepatch
locking
power
printk
rcu
sched
time
trace
.gitignore -rw-r--r-- 53 bytes
Kconfig.freezer -rw-r--r-- 92 bytes
Kconfig.hz -rw-r--r-- 1.7 KB
Kconfig.locks -rw-r--r-- 4.9 KB
Kconfig.preempt -rw-r--r-- 3.0 KB
Makefile -rw-r--r-- 4.3 KB
acct.c -rw-r--r-- 15.4 KB
async.c -rw-r--r-- 10.2 KB
audit.c -rw-r--r-- 61.4 KB
audit.h -rw-r--r-- 10.4 KB
audit_fsnotify.c -rw-r--r-- 5.6 KB
audit_tree.c -rw-r--r-- 25.7 KB
audit_watch.c -rw-r--r-- 14.1 KB
auditfilter.c -rw-r--r-- 34.0 KB
auditsc.c -rw-r--r-- 69.7 KB
backtracetest.c -rw-r--r-- 1.9 KB
bounds.c -rw-r--r-- 751 bytes
capability.c -rw-r--r-- 14.6 KB
compat.c -rw-r--r-- 10.0 KB
configs.c -rw-r--r-- 2.0 KB
context_tracking.c -rw-r--r-- 6.3 KB
cpu.c -rw-r--r-- 57.4 KB
cpu_pm.c -rw-r--r-- 5.6 KB
crash_core.c -rw-r--r-- 11.4 KB
crash_dump.c -rw-r--r-- 1.3 KB
cred.c -rw-r--r-- 23.3 KB
delayacct.c -rw-r--r-- 4.7 KB
dma.c -rw-r--r-- 3.3 KB
elfcore.c -rw-r--r-- 459 bytes
exec_domain.c -rw-r--r-- 1.1 KB
exit.c -rw-r--r-- 43.0 KB
extable.c -rw-r--r-- 4.3 KB
fail_function.c -rw-r--r-- 6.9 KB
fork.c -rw-r--r-- 69.8 KB
freezer.c -rw-r--r-- 4.5 KB
futex.c -rw-r--r-- 104.3 KB
gen_kheaders.sh -rwxr-xr-x 2.7 KB
groups.c -rw-r--r-- 4.9 KB
hung_task.c -rw-r--r-- 7.3 KB
iomem.c -rw-r--r-- 4.7 KB
irq_work.c -rw-r--r-- 4.7 KB
jump_label.c -rw-r--r-- 20.8 KB
kallsyms.c -rw-r--r-- 17.6 KB
kcmp.c -rw-r--r-- 5.7 KB
kcov.c -rw-r--r-- 11.0 KB
kexec.c -rw-r--r-- 7.9 KB
kexec_core.c -rw-r--r-- 31.1 KB
kexec_elf.c -rw-r--r-- 11.4 KB
kexec_file.c -rw-r--r-- 33.0 KB
kexec_internal.h -rw-r--r-- 924 bytes
kheaders.c -rw-r--r-- 1.6 KB
kmod.c -rw-r--r-- 5.0 KB
kprobes.c -rw-r--r-- 63.3 KB
ksysfs.c -rw-r--r-- 6.3 KB
kthread.c -rw-r--r-- 34.1 KB
latencytop.c -rw-r--r-- 7.2 KB
module-internal.h -rw-r--r-- 782 bytes
module.c -rw-r--r-- 115.5 KB
module_signature.c -rw-r--r-- 1.1 KB
module_signing.c -rw-r--r-- 1.1 KB
notifier.c -rw-r--r-- 16.4 KB
nsproxy.c -rw-r--r-- 6.3 KB
padata.c -rw-r--r-- 26.7 KB
panic.c -rw-r--r-- 17.5 KB
params.c -rw-r--r-- 22.7 KB
pid.c -rw-r--r-- 12.9 KB
pid_namespace.c -rw-r--r-- 11.5 KB
profile.c -rw-r--r-- 14.8 KB
ptrace.c -rw-r--r-- 36.4 KB
range.c -rw-r--r-- 3.0 KB
reboot.c -rw-r--r-- 14.1 KB
relay.c -rw-r--r-- 32.1 KB
resource.c -rw-r--r-- 42.8 KB
rseq.c -rw-r--r-- 9.8 KB
seccomp.c -rw-r--r-- 45.6 KB
signal.c -rw-r--r-- 117.9 KB
smp.c -rw-r--r-- 22.1 KB
smpboot.c -rw-r--r-- 11.7 KB
smpboot.h -rw-r--r-- 640 bytes
softirq.c -rw-r--r-- 17.1 KB
stackleak.c -rw-r--r-- 3.9 KB
stacktrace.c -rw-r--r-- 9.5 KB
stop_machine.c -rw-r--r-- 17.9 KB
sys.c -rw-r--r-- 61.9 KB
sys_ni.c -rw-r--r-- 9.3 KB
sysctl.c -rw-r--r-- 80.4 KB
sysctl_binary.c -rw-r--r-- 50.2 KB
task_work.c -rw-r--r-- 3.1 KB
taskstats.c -rw-r--r-- 15.6 KB
test_kprobes.c -rw-r--r-- 5.9 KB
torture.c -rw-r--r-- 21.0 KB
tracepoint.c -rw-r--r-- 14.9 KB
tsacct.c -rw-r--r-- 4.6 KB
ucount.c -rw-r--r-- 5.5 KB
uid16.c -rw-r--r-- 5.1 KB
uid16.h -rw-r--r-- 442 bytes
umh.c -rw-r--r-- 19.0 KB
up.c -rw-r--r-- 2.3 KB
user-return-notifier.c -rw-r--r-- 1.3 KB
user.c -rw-r--r-- 5.5 KB
user_namespace.c -rw-r--r-- 33.2 KB
utsname.c -rw-r--r-- 3.8 KB
utsname_sysctl.c -rw-r--r-- 3.2 KB
watchdog.c -rw-r--r-- 21.4 KB
watchdog_hld.c -rw-r--r-- 7.7 KB
workqueue.c -rw-r--r-- 163.9 KB
workqueue_internal.h -rw-r--r-- 2.4 KB

back to top