From: "Arnd Bergmann" <arnd@arndb.de>
To: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
linux-fsdevel@vger.kernel.org, linux-mips@vger.kernel.org,
"open list" <linux-kernel@vger.kernel.org>,
lkft-triage@lists.linaro.org,
"Linux Regressions" <regressions@lists.linux.dev>
Cc: "Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Anders Roxell" <anders.roxell@linaro.org>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Christian Brauner" <brauner@kernel.org>,
"Dan Carpenter" <dan.carpenter@linaro.org>
Subject: Re: mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'?
Date: Thu, 22 May 2025 16:01:53 +0200 [thread overview]
Message-ID: <70d46cd3-80f4-4f5e-b0fc-fa2a6f284404@app.fastmail.com> (raw)
In-Reply-To: <CA+G9fYsZPSJ55FQ9Le9rLQMVHaHyE5kU66xqiPnz6mmfhvPfbQ@mail.gmail.com>
On Thu, May 22, 2025, at 15:22, Naresh Kamboju wrote:
> ## Build log
> net/unix/af_unix.c: In function 'unix_find_bsd':
> net/unix/af_unix.c:1152:21: error: 'SOCK_COREDUMP' undeclared (first
> use in this function); did you mean 'SOCK_RDM'?
> 1152 | if (flags & SOCK_COREDUMP) {
SOCK_COREDUMP should be defined outside of ARCH_HAS_SOCKET_TYPES.
How about reducing the scope of that check like this?
Arnd
diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
index 4724a563c5bf..43a09f0dd3ff 100644
--- a/arch/mips/include/asm/socket.h
+++ b/arch/mips/include/asm/socket.h
@@ -36,15 +36,6 @@ enum sock_type {
SOCK_PACKET = 10,
};
-#define SOCK_MAX (SOCK_PACKET + 1)
-/* Mask which covers at least up to SOCK_MASK-1. The
- * * remaining bits are used as flags. */
-#define SOCK_TYPE_MASK 0xf
-
-/* Flags for socket, socketpair, paccept */
-#define SOCK_CLOEXEC O_CLOEXEC
-#define SOCK_NONBLOCK O_NONBLOCK
-
#define ARCH_HAS_SOCKET_TYPES 1
#endif /* _ASM_SOCKET_H */
diff --git a/include/linux/net.h b/include/linux/net.h
index 139c85d0f2ea..f60fff91e1df 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -70,6 +70,7 @@ enum sock_type {
SOCK_DCCP = 6,
SOCK_PACKET = 10,
};
+#endif /* ARCH_HAS_SOCKET_TYPES */
#define SOCK_MAX (SOCK_PACKET + 1)
/* Mask which covers at least up to SOCK_MASK-1. The
@@ -83,8 +84,6 @@ enum sock_type {
#endif
#define SOCK_COREDUMP O_NOCTTY
-#endif /* ARCH_HAS_SOCKET_TYPES */
-
/**
* enum sock_shutdown_cmd - Shutdown types
* @SHUT_RD: shutdown receptions
next prev parent reply other threads:[~2025-05-22 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 13:22 mips gcc-12 malta_defconfig 'SOCK_COREDUMP' undeclared (first use in this function); did you mean 'SOCK_RDM'? Naresh Kamboju
2025-05-22 14:01 ` Arnd Bergmann [this message]
2025-05-23 9:03 ` Christian Brauner
2025-05-23 12:15 ` Naresh Kamboju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70d46cd3-80f4-4f5e-b0fc-fa2a6f284404@app.fastmail.com \
--to=arnd@arndb.de \
--cc=anders.roxell@linaro.org \
--cc=brauner@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=regressions@lists.linux.dev \
--cc=tsbogend@alpha.franken.de \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).