* [PATCH] fs: use correct __poll_t type
@ 2023-05-11 16:46 Min-Hua Chen
2023-05-15 7:37 ` Christian Brauner
0 siblings, 1 reply; 2+ messages in thread
From: Min-Hua Chen @ 2023-05-11 16:46 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner
Cc: Min-Hua Chen, linux-fsdevel, linux-kernel
Fix the following sparse warnings by using __poll_t instead
of unsigned type.
fs/eventpoll.c:541:9: sparse: warning: restricted __poll_t degrades to integer
fs/eventfd.c:67:17: sparse: warning: restricted __poll_t degrades to integer
Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
---
fs/eventfd.c | 2 +-
fs/eventpoll.c | 2 +-
include/linux/eventfd.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 95850a13ce8d..6c06a527747f 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -43,7 +43,7 @@ struct eventfd_ctx {
int id;
};
-__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, unsigned mask)
+__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, __poll_t mask)
{
unsigned long flags;
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 980483455cc0..e0eabaae7402 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -536,7 +536,7 @@ static void ep_poll_safewake(struct eventpoll *ep, struct epitem *epi,
#else
static void ep_poll_safewake(struct eventpoll *ep, struct epitem *epi,
- unsigned pollflags)
+ __poll_t pollflags)
{
wake_up_poll(&ep->poll_wait, EPOLLIN | pollflags);
}
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
index 36a486505b08..98d31cdaca40 100644
--- a/include/linux/eventfd.h
+++ b/include/linux/eventfd.h
@@ -40,7 +40,7 @@ struct file *eventfd_fget(int fd);
struct eventfd_ctx *eventfd_ctx_fdget(int fd);
struct eventfd_ctx *eventfd_ctx_fileget(struct file *file);
__u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n);
-__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, unsigned mask);
+__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, __poll_t mask);
int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
__u64 *cnt);
void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fs: use correct __poll_t type
2023-05-11 16:46 [PATCH] fs: use correct __poll_t type Min-Hua Chen
@ 2023-05-15 7:37 ` Christian Brauner
0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2023-05-15 7:37 UTC (permalink / raw)
To: Min-Hua Chen
Cc: Christian Brauner, linux-fsdevel, linux-kernel, Alexander Viro
On Fri, 12 May 2023 00:46:25 +0800, Min-Hua Chen wrote:
> Fix the following sparse warnings by using __poll_t instead
> of unsigned type.
>
> fs/eventpoll.c:541:9: sparse: warning: restricted __poll_t degrades to integer
> fs/eventfd.c:67:17: sparse: warning: restricted __poll_t degrades to integer
>
>
> [...]
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] fs: use correct __poll_t type
https://git.kernel.org/vfs/vfs/c/1454df87a544
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-15 7:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11 16:46 [PATCH] fs: use correct __poll_t type Min-Hua Chen
2023-05-15 7:37 ` Christian Brauner
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).