[PATCH] aspeed: fix snoop_file_poll()'s return type
Luc Van Oostenryck
luc.vanoostenryck at gmail.com
Thu Nov 21 21:08:23 AEDT 2019
On Thu, Nov 21, 2019 at 02:52:39AM +0000, Joel Stanley wrote:
> On Wed, 20 Nov 2019 at 05:42, Andrew Jeffery <andrew at aj.id.au> wrote:
> >
> > Looks fine to me as POLLIN and EPOLLIN evaluate to the same value despite
> > the type difference.
>
> I assume Luc was using sparse to check:
>
> CHECK ../drivers/soc/aspeed/aspeed-lpc-snoop.c
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:112:19: warning: incorrect
> type in initializer (different base types)
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:112:19: expected
> restricted __poll_t ( *poll )( ... )
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:112:19: got unsigned int (
> * )( ... )
>
> If you fix the return type:
>
> CHECK ../drivers/soc/aspeed/aspeed-lpc-snoop.c
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:106:45: warning: incorrect
> type in return expression (different base types)
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:106:45: expected restricted __poll_t
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:106:45: got int
Yes, but with the change s/POLLIN/EPOLLIN/ this last warning
is not issued.
Cheers,
-- Luc
More information about the Linux-aspeed
mailing list