public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-dvb@linuxtv.org
Subject: [linux-dvb] [patch 1/5] mt312: Cleanup buffer variables of read/write functions
Date: Sat, 12 Apr 2008 17:04:46 +0200	[thread overview]
Message-ID: <20080412150445.783923284@gentoo.org> (raw)
In-Reply-To: 20080412150444.987445669@gentoo.org

[-- Attachment #1: 01_mt312-var-types.diff --]
[-- Type: text/plain, Size: 1996 bytes --]

Change type of buffer variables from void* to u8* to save some casts.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===================================================================
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -58,7 +58,7 @@ static int debug;
 #define MT312_PLL_CLK		10000000UL	/* 10 MHz */
 
 static int mt312_read(struct mt312_state *state, const enum mt312_reg_addr reg,
-		      void *buf, const size_t count)
+		      u8 *buf, const size_t count)
 {
 	int ret;
 	struct i2c_msg msg[2];
@@ -84,7 +84,7 @@ static int mt312_read(struct mt312_state
 		int i;
 		dprintk("R(%d):", reg & 0x7f);
 		for (i = 0; i < count; i++)
-			printk(" %02x", ((const u8 *) buf)[i]);
+			printk(" %02x", buf[i]);
 		printk("\n");
 	}
 
@@ -92,7 +92,7 @@ static int mt312_read(struct mt312_state
 }
 
 static int mt312_write(struct mt312_state *state, const enum mt312_reg_addr reg,
-		       const void *src, const size_t count)
+		       const u8 *src, const size_t count)
 {
 	int ret;
 	u8 buf[count + 1];
@@ -102,7 +102,7 @@ static int mt312_write(struct mt312_stat
 		int i;
 		dprintk("W(%d):", reg & 0x7f);
 		for (i = 0; i < count; i++)
-			printk(" %02x", ((const u8 *) src)[i]);
+			printk(" %02x", src[i]);
 		printk("\n");
 	}
 
@@ -463,7 +463,7 @@ static int mt312_read_snr(struct dvb_fro
 	int ret;
 	u8 buf[2];
 
-	ret = mt312_read(state, M_SNR_H, &buf, sizeof(buf));
+	ret = mt312_read(state, M_SNR_H, buf, sizeof(buf));
 	if (ret < 0)
 		return ret;
 
@@ -478,7 +478,7 @@ static int mt312_read_ucblocks(struct dv
 	int ret;
 	u8 buf[2];
 
-	ret = mt312_read(state, RS_UBC_H, &buf, sizeof(buf));
+	ret = mt312_read(state, RS_UBC_H, buf, sizeof(buf));
 	if (ret < 0)
 		return ret;
 

-- 

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

  reply	other threads:[~2008-04-12 15:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12 15:04 [linux-dvb] [patch 0/5] mt312: Add support for zl10313 demod Matthias Schwarzott
2008-04-12 15:04 ` Matthias Schwarzott [this message]
2008-04-12 15:04 ` [linux-dvb] [patch 2/5] mt312: Fix diseqc Matthias Schwarzott
2008-04-12 15:04 ` [linux-dvb] [patch 3/5] mt312: Supports different xtal frequencies Matthias Schwarzott
2008-04-12 15:04 ` [linux-dvb] [patch 4/5] mt312: Add support for zl10313 demod Matthias Schwarzott
2008-04-12 15:04 ` [linux-dvb] [patch 5/5] mt312: add attach-time setting to invert lnb-voltage Matthias Schwarzott
2008-04-12 15:37 ` [linux-dvb] [patch 0/5] mt312: Add support for zl10313 demod Matthias Schwarzott
2008-04-26 16:39   ` Jan Louw
     [not found]   ` <000a01c8a7b7$5cc2c060$0500000a@Core2Duo>
2008-04-27  3:51     ` Matthias Schwarzott
2008-04-27  8:57       ` Jan D. Louw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080412150445.783923284@gentoo.org \
    --to=zzam@gentoo.org \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox