Skip to contentSkip to conversation

ipmi: ssif_bmc: Use EPOLLIN instead of POLLIN

PATCH In review Quan Nguyen 2 participants 2 messages Oct 24, 2022 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipmi: ssif_bmc: Use EPOLLIN instead of POLLIN

This fixes the following sparse warning:
sparse warnings: (new ones prefixed by >>)

Quoted 3 lines
Quoted 3 lines

drivers/char/ipmi/ssif_bmc.c:254:22: sparse: sparse: invalid assignment: |=
drivers/char/ipmi/ssif_bmc.c:254:22: sparse: left side has type restricted __poll_t
drivers/char/ipmi/ssif_bmc.c:254:22: sparse: right side has type int

Fixes dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
---
 drivers/char/ipmi/ssif_bmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ssif_bmc.c +1 -1
index a7bb4b99000e..2d8069386398 100644
@@ -251,7 +251,7 @@ static __poll_t ssif_bmc_poll(struct file *file, poll_table *wait)
 	spin_lock_irq(&ssif_bmc->lock);
 	/* The request is available, userspace application can get the request */
 	if (ssif_bmc->request_available)
-		mask |= POLLIN;
+		mask |= EPOLLIN;
 
 	spin_unlock_irq(&ssif_bmc->lock);
 
Signature · 1 line
2.35.1
#1 lore raw
Quoted 5 lines · Quan Nguyen

This fixes the following sparse warning:
sparse warnings: (new ones prefixed by >>)

Quoted 3 lines
Quoted 3 lines

drivers/char/ipmi/ssif_bmc.c:254:22: sparse: sparse: invalid assignment: |=
drivers/char/ipmi/ssif_bmc.c:254:22: sparse: left side has type restricted __poll_t
drivers/char/ipmi/ssif_bmc.c:254:22: sparse: right side has type int

Thanks, you beat me to tracing this down. It's in my for-next queue.

-corey

Quoted 25 lines
Fixes dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
---
 drivers/char/ipmi/ssif_bmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ssif_bmc.c +1 -1
index a7bb4b99000e..2d8069386398 100644
@@ -251,7 +251,7 @@ static __poll_t ssif_bmc_poll(struct file *file, poll_table *wait)
 	spin_lock_irq(&ssif_bmc->lock);
 	/* The request is available, userspace application can get the request */
 	if (ssif_bmc->request_available)
-		mask |= POLLIN;
+		mask |= EPOLLIN;
 
 	spin_unlock_irq(&ssif_bmc->lock);
 
Signature · 1 line
2.35.1