From patchwork Sat Oct 11 11:46:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tilman Schmidt X-Patchwork-Id: 398842 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7017B140145 for ; Sat, 11 Oct 2014 22:47:45 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752419AbaJKLra (ORCPT ); Sat, 11 Oct 2014 07:47:30 -0400 Received: from gimli.pxnet.com ([89.1.7.7]:50234 "EHLO mail.pxnet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbaJKLrD (ORCPT ); Sat, 11 Oct 2014 07:47:03 -0400 Received: from xenon.ts.pxnet.com (p57A57B2C.dip0.t-ipconnect.de [87.165.123.44]) (user=ts author=<> mech=DIGEST-MD5 bits=0) by mail.pxnet.com (8.13.8/8.13.8) with ESMTP id s9BBkh3W020820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Oct 2014 13:46:45 +0200 Received: by xenon.ts.pxnet.com (Postfix, from userid 1000) id 5CF93140080; Sat, 11 Oct 2014 13:46:30 +0200 (CEST) Message-Id: In-Reply-To: References: From: Tilman Schmidt Subject: [PATCH 06/12] isdn/capi: correct capi20_manufacturer argument type mismatch To: netdev@vger.kernel.org Cc: David Miller , Dave Jones , Hansjoerg Lipp , Karsten Keil , isdn4linux@listserv.isdn4linux.de Date: Sat, 11 Oct 2014 13:46:30 +0200 (CEST) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.pxnet.com [89.1.7.7]); Sat, 11 Oct 2014 13:46:45 +0200 (CEST) X-Scanned-By: MIMEDefang 2.70 on 89.1.7.7 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- Note: The issue about printk(KERN_ERR which checkpatch is complaining about is already present in the original file in this and many other places. Cleaning it up is outside the scope of this patch. drivers/isdn/capi/kcapi.c | 4 ++-- include/linux/kernelcapi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index c123709..823f698 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -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; diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h index 9be37da..e985ba6 100644 --- a/include/linux/kernelcapi.h +++ b/include/linux/kernelcapi.h @@ -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