Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

isdn/capi: correct capi20_manufacturer argument type mismatch

Function capi20_manufacturer() is declared with unsigned int cmd
argument but called with unsigned long.
Fix by correcting the function prototype since the actual argument
is part of the user visible API.

Spotted with Coverity.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Tilman Schmidt and committed by
David S. Miller
9ea8aa8d b8324f94

+3 -3
+2 -2
drivers/isdn/capi/kcapi.c
··· 1184 1184 * Return value: CAPI result code 1185 1185 */ 1186 1186 1187 - int capi20_manufacturer(unsigned int cmd, void __user *data) 1187 + int capi20_manufacturer(unsigned long cmd, void __user *data) 1188 1188 { 1189 1189 struct capi_ctr *ctr; 1190 1190 int retval; ··· 1259 1259 } 1260 1260 1261 1261 default: 1262 - printk(KERN_ERR "kcapi: manufacturer command %d unknown.\n", 1262 + printk(KERN_ERR "kcapi: manufacturer command %lu unknown.\n", 1263 1263 cmd); 1264 1264 break; 1265 1265
+1 -1
include/linux/kernelcapi.h
··· 41 41 u16 capi20_get_version(u32 contr, struct capi_version *verp); 42 42 u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]); 43 43 u16 capi20_get_profile(u32 contr, struct capi_profile *profp); 44 - int capi20_manufacturer(unsigned int cmd, void __user *data); 44 + int capi20_manufacturer(unsigned long cmd, void __user *data); 45 45 46 46 #define CAPICTR_UP 0 47 47 #define CAPICTR_DOWN 1