From patchwork Sun Oct 11 03:30:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 7368491 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D85149F40A for ; Sun, 11 Oct 2015 03:30:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1C84206BC for ; Sun, 11 Oct 2015 03:30:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id B6A5520672 for ; Sun, 11 Oct 2015 03:30:49 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 574F4260664; Sun, 11 Oct 2015 05:30:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id AD3132605F0; Sun, 11 Oct 2015 05:30:40 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4DE1B260600; Sun, 11 Oct 2015 05:30:38 +0200 (CEST) Received: from smtp302.phy.lolipop.jp (smtp302.phy.lolipop.jp [210.157.22.85]) by alsa0.perex.cz (Postfix) with ESMTP id A3BCC2605F0 for ; Sun, 11 Oct 2015 05:30:30 +0200 (CEST) Received: from smtp302.phy.lolipop.lan (HELO smtp302.phy.lolipop.jp) (172.17.1.85) (smtp-auth username m12129643-o-takashi, mechanism plain) by smtp302.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Sun, 11 Oct 2015 12:30:27 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp302.phy.lolipop.jp (LOLIPOP-Fsecure); Sun, 11 Oct 2015 12:30:20 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de Date: Sun, 11 Oct 2015 12:30:14 +0900 Message-Id: <1444534219-31718-2-git-send-email-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444534219-31718-1-git-send-email-o-takashi@sakamocchi.jp> References: <1444534219-31718-1-git-send-email-o-takashi@sakamocchi.jp> Cc: damien@zamaudio.com, robin@gareus.org, alsa-devel@alsa-project.org, ffado-devel@lists.sf.net Subject: [alsa-devel] [PATCH 1/6] firewire-digi00x: use in-kernel representation for the type of 8 bits X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Original code for 'DoubleOhThree' encoding was written with '__u8' type, while the type is usually used to export something to userspace. This commit replaces the type with 'u8'. Signed-off-by: Takashi Sakamoto --- sound/firewire/digi00x/amdtp-dot.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sound/firewire/digi00x/amdtp-dot.c b/sound/firewire/digi00x/amdtp-dot.c index e6731d3..c12ce4d 100644 --- a/sound/firewire/digi00x/amdtp-dot.c +++ b/sound/firewire/digi00x/amdtp-dot.c @@ -21,8 +21,8 @@ * Zammit in 2012, with reverse-engineering for Digi 003 Rack. */ struct dot_state { - __u8 carry; - __u8 idx; + u8 carry; + u8 idx; unsigned int off; }; @@ -47,25 +47,25 @@ struct amdtp_dot { #define BYTE_PER_SAMPLE (4) #define MAGIC_DOT_BYTE (2) #define MAGIC_BYTE_OFF(x) (((x) * BYTE_PER_SAMPLE) + MAGIC_DOT_BYTE) -static const __u8 dot_scrt(const __u8 idx, const unsigned int off) +static const u8 dot_scrt(const u8 idx, const unsigned int off) { /* * the length of the added pattern only depends on the lower nibble * of the last non-zero data */ - static const __u8 len[16] = {0, 1, 3, 5, 7, 9, 11, 13, 14, - 12, 10, 8, 6, 4, 2, 0}; + static const u8 len[16] = {0, 1, 3, 5, 7, 9, 11, 13, 14, + 12, 10, 8, 6, 4, 2, 0}; /* * the lower nibble of the salt. Interleaved sequence. * this is walked backwards according to len[] */ - static const __u8 nib[15] = {0x8, 0x7, 0x9, 0x6, 0xa, 0x5, 0xb, 0x4, - 0xc, 0x3, 0xd, 0x2, 0xe, 0x1, 0xf}; + static const u8 nib[15] = {0x8, 0x7, 0x9, 0x6, 0xa, 0x5, 0xb, 0x4, + 0xc, 0x3, 0xd, 0x2, 0xe, 0x1, 0xf}; /* circular list for the salt's hi nibble. */ - static const __u8 hir[15] = {0x0, 0x6, 0xf, 0x8, 0x7, 0x5, 0x3, 0x4, - 0xc, 0xd, 0xe, 0x1, 0x2, 0xb, 0xa}; + static const u8 hir[15] = {0x0, 0x6, 0xf, 0x8, 0x7, 0x5, 0x3, 0x4, + 0xc, 0xd, 0xe, 0x1, 0x2, 0xb, 0xa}; /* * start offset for upper nibble mapping. @@ -73,12 +73,12 @@ static const __u8 dot_scrt(const __u8 idx, const unsigned int off) * hir[] is not used and - coincidentally - the salt's hi nibble is * 0x09 regardless of the offset. */ - static const __u8 hio[16] = {0, 11, 12, 6, 7, 5, 1, 4, - 3, 0x00, 14, 13, 8, 9, 10, 2}; + static const u8 hio[16] = {0, 11, 12, 6, 7, 5, 1, 4, + 3, 0x00, 14, 13, 8, 9, 10, 2}; - const __u8 ln = idx & 0xf; - const __u8 hn = (idx >> 4) & 0xf; - const __u8 hr = (hn == 0x9) ? 0x9 : hir[(hio[hn] + off) % 15]; + const u8 ln = idx & 0xf; + const u8 hn = (idx >> 4) & 0xf; + const u8 hr = (hn == 0x9) ? 0x9 : hir[(hio[hn] + off) % 15]; if (len[ln] < off) return 0x00; @@ -88,7 +88,7 @@ static const __u8 dot_scrt(const __u8 idx, const unsigned int off) static void dot_encode_step(struct dot_state *state, __be32 *const buffer) { - __u8 * const data = (__u8 *) buffer; + u8 * const data = (u8 *) buffer; if (data[MAGIC_DOT_BYTE] != 0x00) { state->off = 0;