linux-mips
[Top] [All Lists]

Re: [PATCH] mips/include/asm/mipsregs.h: s/u16/unsigned short/

To: Qais Yousef <qais.yousef@imgtec.com>
Subject: Re: [PATCH] mips/include/asm/mipsregs.h: s/u16/unsigned short/
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 06 Dec 2013 08:32:07 -0800
Cc: linux-mips@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=nptTMQ47E32W3kzuKUvACLjpIaJkmBJfmZuW5GqoiCI=; b=aSxokZK/81mScRL1NsGIpIg/gjbTWkgvR1YWsVmWE3Vtjw2Ev6a+ekx5HZxHipO88Q 8z4UXQADCkinPwzF80zlDoTdXXdtDTzesKix07+49WgNFSRB4byDkNnpuhQIREpOlNKp lj8foEWBf0NhONAV7skbt3s4udEwKcLBS+PPoMCjpMmUgNp37iuPtiRRszURO9d4RTdZ O16NYdKu3jJxWWqPptZX/1P6Khbd3J0gNsWdM1H623sJlNdRnq4avfPp7rH8DvnbFht1 rum7Sj19zUON5icxxZAvyXczGsoNaHum/mwbw6u/kPqPTa7uC+5hKwdX5ZBbRnPIHy9h JUnA==
In-reply-to: <1386321659-30073-1-git-send-email-qais.yousef@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1386321659-30073-1-git-send-email-qais.yousef@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 12/06/2013 01:20 AM, Qais Yousef wrote:
I was getting this error when including this header in my driver:

   arch/mips/include/asm/mipsregs.h:644:33: error: unknown type name ‘u16’

since the use of u16 is not really necessary, convert it to unsigned short.

Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>

NAK.

Just #include <linux/types.h> at the top of asm/mipsregs.h instead.

David Daney


---
  arch/mips/include/asm/mipsregs.h |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index e033141..0a2d6ef 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -641,9 +641,9 @@
   * microMIPS instructions can be 16-bit or 32-bit in length. This
   * returns a 1 if the instruction is 16-bit and a 0 if 32-bit.
   */
-static inline int mm_insn_16bit(u16 insn)
+static inline int mm_insn_16bit(unsigned short insn)
  {
-       u16 opcode = (insn >> 10) & 0x7;
+       unsigned short opcode = (insn >> 10) & 0x7;

        return (opcode >= 1 && opcode <= 3) ? 1 : 0;
  }



<Prev in Thread] Current Thread [Next in Thread>