From patchwork Thu Dec 17 02:15:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: omar ramirez X-Patchwork-Id: 68475 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixrh005715 for ; Fri, 18 Dec 2009 04:46:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763920AbZLQCIs (ORCPT ); Wed, 16 Dec 2009 21:08:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763887AbZLQCIr (ORCPT ); Wed, 16 Dec 2009 21:08:47 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:36702 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758234AbZLQCIq (ORCPT ); Wed, 16 Dec 2009 21:08:46 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id nBH28hZu018251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Dec 2009 20:08:43 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id nBH28gGS013407; Wed, 16 Dec 2009 20:08:43 -0600 (CST) Received: from Matrix (matrix.am.dhcp.ti.com [128.247.75.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id nBH28gZ21608; Wed, 16 Dec 2009 20:08:42 -0600 (CST) Received: by Matrix (Postfix, from userid 1003) id 703011661B0; Wed, 16 Dec 2009 20:16:04 -0600 (CST) From: Omar Ramirez Luna To: linux-omap Cc: Hiroshi Doyu , Ameya Palande , Felipe Contreras , Fernando Guzman , Ernesto Ramos , Omar Ramirez Luna Subject: [PATCHv2 01/18] DSPBRIDGE: Fix compile break for WCD debug mask Date: Wed, 16 Dec 2009 20:15:46 -0600 Message-Id: <1261016163-11091-2-git-send-email-omar.ramirez@ti.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1261016163-11091-1-git-send-email-omar.ramirez@ti.com> References: <1261016163-11091-1-git-send-email-omar.ramirez@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c index bb28cd2..3fb5208 100644 --- a/drivers/dsp/bridge/pmgr/wcd.c +++ b/drivers/dsp/bridge/pmgr/wcd.c @@ -144,46 +144,6 @@ #define MAX_STREAMS 16 #define MAX_BUFS 64 -static inline void __cp_fm_usr(void *to, const void __user *from, - DSP_STATUS *err, unsigned long bytes) -{ - if (DSP_FAILED(*err)) - return; - - if (unlikely(!from)) { - *err = DSP_EPOINTER; - return; - } - - if (unlikely(copy_from_user(to, from, bytes))) { - GT_2trace(WCD_debugMask, GT_7CLASS, - "%s failed, from=0x%08x\n", __func__, from); - *err = DSP_EPOINTER; - } -} -#define cp_fm_usr(to, from, err, n) \ - __cp_fm_usr(to, from, &(err), (n) * sizeof(*(to))) - -static inline void __cp_to_usr(void __user *to, const void *from, - DSP_STATUS *err, unsigned long bytes) -{ - if (DSP_FAILED(*err)) - return; - - if (unlikely(!to)) { - *err = DSP_EPOINTER; - return; - } - - if (unlikely(copy_to_user(to, from, bytes))) { - GT_2trace(WCD_debugMask, GT_7CLASS, - "%s failed, to=0x%08x\n", __func__, to); - *err = DSP_EPOINTER; - } -} -#define cp_to_usr(to, from, err, n) \ - __cp_to_usr(to, from, &(err), (n) * sizeof(*(from))) - /* Device IOCtl function pointer */ struct WCD_Cmd { u32(*fxn)(union Trapped_Args *args); @@ -265,6 +225,46 @@ static struct WCD_Cmd WCD_cmdTable[] = { {CMMWRAP_GetInfo, CMD_CMM_GETINFO_OFFSET} }; +static inline void __cp_fm_usr(void *to, const void __user *from, + DSP_STATUS *err, unsigned long bytes) +{ + if (DSP_FAILED(*err)) + return; + + if (unlikely(!from)) { + *err = DSP_EPOINTER; + return; + } + + if (unlikely(copy_from_user(to, from, bytes))) { + GT_2trace(WCD_debugMask, GT_7CLASS, + "%s failed, from=0x%08x\n", __func__, from); + *err = DSP_EPOINTER; + } +} +#define cp_fm_usr(to, from, err, n) \ + __cp_fm_usr(to, from, &(err), (n) * sizeof(*(to))) + +static inline void __cp_to_usr(void __user *to, const void *from, + DSP_STATUS *err, unsigned long bytes) +{ + if (DSP_FAILED(*err)) + return; + + if (unlikely(!to)) { + *err = DSP_EPOINTER; + return; + } + + if (unlikely(copy_to_user(to, from, bytes))) { + GT_2trace(WCD_debugMask, GT_7CLASS, + "%s failed, to=0x%08x\n", __func__, to); + *err = DSP_EPOINTER; + } +} +#define cp_to_usr(to, from, err, n) \ + __cp_to_usr(to, from, &(err), (n) * sizeof(*(from))) + /* * ======== WCD_CallDevIOCtl ======== * Purpose: