[PATCH] staging: speakup: fix type mismatch warnings

Samuel Thibault samuel.thibault at ens-lyon.org
Fri Mar 11 17:42:36 EST 2016


Hello,

Greg KH, on Fri 11 Mar 2016 14:32:52 -0800, wrote:
> On Thu, Mar 10, 2016 at 08:21:35PM +0000, Okash Khawaja wrote:
> > Compiling speakup driver with sparse produces following warning:
> > 
> > drivers/staging/speakup/serialio.c:22:9: warning: incorrect type in
> > initializer (different base types)
> > drivers/staging/speakup/serialio.c:22:9:    expected unsigned int
> > [unsigned] flags
> > drivers/staging/speakup/serialio.c:22:9:    got restricted upf_t
> > 
> > This patch fixes it.
> > 
> > Signed-off-by: Okash Khawaja <okash.khawaja at gmail.com>

> > @@ -16,7 +17,7 @@ struct old_serial_port {
> >  	unsigned int baud_base;
> >  	unsigned int port;
> >  	unsigned int irq;
> > -	unsigned int flags; /* unused */
> > +	upf_t flags; /* unused */
> 
> I need some agreement from the speakup developers about this, I don't
> know if it's really needed or not...

It is not needed for functionality (upf_t is a typedef for unsigned
long), but in principle the field should be upf_t indeed (because it has
the __bitwise qualifier).

samuel


More information about the Speakup mailing list