isdn/capi: correct capi20_manufacturer argument type mismatch
authorTilman Schmidt <tilman@imap.cc>
Sat, 11 Oct 2014 11:46:30 +0000 (13:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Oct 2014 19:05:34 +0000 (15:05 -0400)
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>
drivers/isdn/capi/kcapi.c
include/linux/kernelcapi.h

index c123709acf823829a274db2ca6ced2060bbae341..823f6985b2603198ff7b7ea7c8869db6032ba168 100644 (file)
@@ -1184,7 +1184,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
  * Return value: CAPI result code
  */
 
-int capi20_manufacturer(unsigned int cmd, void __user *data)
+int capi20_manufacturer(unsigned long cmd, void __user *data)
 {
        struct capi_ctr *ctr;
        int retval;
@@ -1259,7 +1259,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
        }
 
        default:
-               printk(KERN_ERR "kcapi: manufacturer command %d unknown.\n",
+               printk(KERN_ERR "kcapi: manufacturer command %lu unknown.\n",
                       cmd);
                break;
 
index 9be37da93680a4d688c339a93135e1afa974f791..e985ba679c4a4b87ce3e5de051c8f1eabdfa45af 100644 (file)
@@ -41,7 +41,7 @@ u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
 u16 capi20_get_version(u32 contr, struct capi_version *verp);
 u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
 u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
-int capi20_manufacturer(unsigned int cmd, void __user *data);
+int capi20_manufacturer(unsigned long cmd, void __user *data);
 
 #define CAPICTR_UP                     0
 #define CAPICTR_DOWN                   1