[PATCH net-next v2 1/4] rds: Replace POLLERR with EPOLLERR

Ujwal Kundur posted 4 patches 1 month, 2 weeks ago
[PATCH net-next v2 1/4] rds: Replace POLLERR with EPOLLERR
Posted by Ujwal Kundur 1 month, 2 weeks ago
Both constants are 1<<3, but EPOLLERR uses the correct annotations.

Flagged by Sparse.

Signed-off-by: Ujwal Kundur <ujwal.kundur@gmail.com>
---
 net/rds/af_rds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index 086a13170e09..4a7217fbeab6 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -242,7 +242,7 @@ static __poll_t rds_poll(struct file *file, struct socket *sock,
 	if (rs->rs_snd_bytes < rds_sk_sndbuf(rs))
 		mask |= (EPOLLOUT | EPOLLWRNORM);
 	if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
-		mask |= POLLERR;
+		mask |= EPOLLERR;
 	read_unlock_irqrestore(&rs->rs_recv_lock, flags);
 
 	/* clear state any time we wake a seen-congested socket */
-- 
2.30.2
Re: [PATCH net-next v2 1/4] rds: Replace POLLERR with EPOLLERR
Posted by Allison Henderson 1 month, 1 week ago
On Wed, 2025-08-20 at 23:25 +0530, Ujwal Kundur wrote:
> Both constants are 1<<3, but EPOLLERR uses the correct annotations.
> 
> Flagged by Sparse.
> 
> Signed-off-by: Ujwal Kundur <ujwal.kundur@gmail.com>
> ---
>  net/rds/af_rds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
> index 086a13170e09..4a7217fbeab6 100644
> --- a/net/rds/af_rds.c
> +++ b/net/rds/af_rds.c
> @@ -242,7 +242,7 @@ static __poll_t rds_poll(struct file *file, struct socket *sock,
>  	if (rs->rs_snd_bytes < rds_sk_sndbuf(rs))
>  		mask |= (EPOLLOUT | EPOLLWRNORM);
>  	if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
> -		mask |= POLLERR;
> +		mask |= EPOLLERR;
>  	read_unlock_irqrestore(&rs->rs_recv_lock, flags);
>  
>  	/* clear state any time we wake a seen-congested socket */

This looks better.  Thank you for the clean up!
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>