@@ -661,12 +661,13 @@ static inline void ep_pm_stay_awake_rcu(struct epitem *epi)
661
661
*
662
662
* Returns: The same integer error code returned by the @sproc callback.
663
663
*/
664
- static int ep_scan_ready_list (struct eventpoll * ep ,
665
- int (* sproc )(struct eventpoll * ,
664
+ static __poll_t ep_scan_ready_list (struct eventpoll * ep ,
665
+ __poll_t (* sproc )(struct eventpoll * ,
666
666
struct list_head * , void * ),
667
667
void * priv , int depth , bool ep_locked )
668
668
{
669
- int error , pwake = 0 ;
669
+ __poll_t res ;
670
+ int pwake = 0 ;
670
671
unsigned long flags ;
671
672
struct epitem * epi , * nepi ;
672
673
LIST_HEAD (txlist );
@@ -695,7 +696,7 @@ static int ep_scan_ready_list(struct eventpoll *ep,
695
696
/*
696
697
* Now call the callback function.
697
698
*/
698
- error = (* sproc )(ep , & txlist , priv );
699
+ res = (* sproc )(ep , & txlist , priv );
699
700
700
701
spin_lock_irqsave (& ep -> lock , flags );
701
702
/*
@@ -748,7 +749,7 @@ static int ep_scan_ready_list(struct eventpoll *ep,
748
749
if (pwake )
749
750
ep_poll_safewake (& ep -> poll_wait );
750
751
751
- return error ;
752
+ return res ;
752
753
}
753
754
754
755
static void epi_rcu_free (struct rcu_head * head )
@@ -865,7 +866,7 @@ static int ep_eventpoll_release(struct inode *inode, struct file *file)
865
866
return 0 ;
866
867
}
867
868
868
- static int ep_read_events_proc (struct eventpoll * ep , struct list_head * head ,
869
+ static __poll_t ep_read_events_proc (struct eventpoll * ep , struct list_head * head ,
869
870
void * priv );
870
871
static void ep_ptable_queue_proc (struct file * file , wait_queue_head_t * whead ,
871
872
poll_table * pt );
@@ -875,7 +876,7 @@ static void ep_ptable_queue_proc(struct file *file, wait_queue_head_t *whead,
875
876
* the ep->mtx so we need to start from depth=1, such that mutex_lock_nested()
876
877
* is correctly annotated.
877
878
*/
878
- static unsigned int ep_item_poll (const struct epitem * epi , poll_table * pt ,
879
+ static __poll_t ep_item_poll (const struct epitem * epi , poll_table * pt ,
879
880
int depth )
880
881
{
881
882
struct eventpoll * ep ;
@@ -895,7 +896,7 @@ static unsigned int ep_item_poll(const struct epitem *epi, poll_table *pt,
895
896
locked ) & epi -> event .events ;
896
897
}
897
898
898
- static int ep_read_events_proc (struct eventpoll * ep , struct list_head * head ,
899
+ static __poll_t ep_read_events_proc (struct eventpoll * ep , struct list_head * head ,
899
900
void * priv )
900
901
{
901
902
struct epitem * epi , * tmp ;
@@ -1415,7 +1416,8 @@ static noinline void ep_destroy_wakeup_source(struct epitem *epi)
1415
1416
static int ep_insert (struct eventpoll * ep , const struct epoll_event * event ,
1416
1417
struct file * tfile , int fd , int full_check )
1417
1418
{
1418
- int error , revents , pwake = 0 ;
1419
+ int error , pwake = 0 ;
1420
+ __poll_t revents ;
1419
1421
unsigned long flags ;
1420
1422
long user_watches ;
1421
1423
struct epitem * epi ;
@@ -1613,11 +1615,11 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi,
1613
1615
return 0 ;
1614
1616
}
1615
1617
1616
- static int ep_send_events_proc (struct eventpoll * ep , struct list_head * head ,
1618
+ static __poll_t ep_send_events_proc (struct eventpoll * ep , struct list_head * head ,
1617
1619
void * priv )
1618
1620
{
1619
1621
struct ep_send_events_data * esed = priv ;
1620
- unsigned int revents ;
1622
+ __poll_t revents ;
1621
1623
struct epitem * epi ;
1622
1624
struct epoll_event __user * uevent ;
1623
1625
struct wakeup_source * ws ;
0 commit comments