From patchwork Mon Mar 7 13:19:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Purna Chandra Mandal X-Patchwork-Id: 592946 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 538F2140271 for ; Tue, 8 Mar 2016 00:21:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37672A76E6; Mon, 7 Mar 2016 14:21:28 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CIv7F4w6Ou_8; Mon, 7 Mar 2016 14:21:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81CD6A76EF; Mon, 7 Mar 2016 14:21:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AB522A76D8 for ; Mon, 7 Mar 2016 14:21:22 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M3NkihAhd5tn for ; Mon, 7 Mar 2016 14:21:22 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from email.microchip.com (exsmtp03.microchip.com [198.175.253.49]) by theia.denx.de (Postfix) with ESMTPS id 3ADB3A748A for ; Mon, 7 Mar 2016 14:21:17 +0100 (CET) Received: from mx.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.181.6; Mon, 7 Mar 2016 06:21:14 -0700 Received: by mx.microchip.com (sSMTP sendmail emulation); Mon, 07 Mar 2016 18:49:42 +0530 From: Purna Chandra Mandal To: Date: Mon, 7 Mar 2016 18:49:35 +0530 Message-ID: <1457356777-4350-2-git-send-email-purna.mandal@microchip.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1457356777-4350-1-git-send-email-purna.mandal@microchip.com> References: <1457356777-4350-1-git-send-email-purna.mandal@microchip.com> MIME-Version: 1.0 Cc: Marek Vasut , Purna Chandra Mandal Subject: [U-Boot] [PATCH v2 2/4] gadget: f_mass_storge: fix compilation error for MIPS. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Compiling USB mass storage gadget for MIPS reports redefinition error. ------------------ drivers/usb/gadget/f_mass_storage.c:286:13: error: redefinition of 'set_bit' inline void set_bit(int nr, volatile void *addr) ^ In file included from include/linux/bitops.h:123:0, from include/common.h:20, from drivers/usb/gadget/f_mass_storage.c:245: ./arch/mips/include/asm/bitops.h:328:24: note: previous definition of 'set_bit' was here static __inline__ void set_bit(int nr, volatile void * addr) ^ drivers/usb/gadget/f_mass_storage.c:296:13: error: redefinition of 'clear_bit' inline void clear_bit(int nr, volatile void *addr) ^ In file included from include/linux/bitops.h:123:0, from include/common.h:20, from drivers/usb/gadget/f_mass_storage.c:245: ./arch/mips/include/asm/bitops.h:370:24: note: previous definition of 'clear_bit' was here static __inline__ void clear_bit(int nr, volatile void * addr) ------------- Fixed it by allowing default implementation of set_bit(), clear_bit() for non MIPS. Signed-off-by: Purna Chandra Mandal Acked-by: Lukasz Majewski --- Changes in v2: None drivers/usb/gadget/f_mass_storage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 1ecb92a..8ca02f2 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -283,6 +283,7 @@ static const char fsg_string_interface[] = "Mass Storage"; struct kref {int x; }; struct completion {int x; }; +#if !defined(CONFIG_MIPS) inline void set_bit(int nr, volatile void *addr) { int mask; @@ -302,6 +303,7 @@ inline void clear_bit(int nr, volatile void *addr) mask = 1 << (nr & 0x1f); *a &= ~mask; } +#endif struct fsg_dev; struct fsg_common;