mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jiri Kosina <trivial@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org
Subject: [PATCH 36/36] sound/core: Remove unnecessary casts of private_data
Date: Mon, 12 Jul 2010 13:50:28 -0700	[thread overview]
Message-ID: <2411ee190e0bcb4ba81d1f2e1b5db2e2a53fa1ca.1278967121.git.joe@perches.com> (raw)
In-Reply-To: <cover.1278967120.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/core/oss/mixer_oss.c |   22 +++++++++++-----------
 sound/core/pcm.c           |    3 +--
 sound/core/timer.c         |    4 ++--
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index f50ebf2..86afb13 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -77,7 +77,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
 	struct snd_mixer_oss_file *fmixer;
 
 	if (file->private_data) {
-		fmixer = (struct snd_mixer_oss_file *) file->private_data;
+		fmixer = file->private_data;
 		module_put(fmixer->card->module);
 		snd_card_file_remove(fmixer->card, file);
 		kfree(fmixer);
@@ -368,7 +368,7 @@ static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int
 
 static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
+	return snd_mixer_oss_ioctl1(file->private_data, cmd, arg);
 }
 
 int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
@@ -582,7 +582,7 @@ static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
 				     struct snd_mixer_oss_slot *pslot,
 				     int *left, int *right)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	*left = *right = 100;
 	if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
@@ -691,7 +691,7 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
 				     struct snd_mixer_oss_slot *pslot,
 				     int left, int right)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
 		snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
@@ -740,7 +740,7 @@ static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
 					struct snd_mixer_oss_slot *pslot,
 					int *active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	int left, right;
 	
 	left = right = 1;
@@ -753,7 +753,7 @@ static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
 					   struct snd_mixer_oss_slot *pslot,
 					   int *active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	int left, right;
 	
 	left = right = 1;
@@ -766,7 +766,7 @@ static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
 					struct snd_mixer_oss_slot *pslot,
 					int active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
 	return 0;
@@ -776,7 +776,7 @@ static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
 					   struct snd_mixer_oss_slot *pslot,
 					   int active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
 	return 0;
@@ -813,7 +813,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
 		if (!(mixer->mask_recsrc & (1 << idx)))
 			continue;
 		pslot = &mixer->slots[idx];
-		slot = (struct slot *)pslot->private_data;
+		slot = pslot->private_data;
 		if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
 			continue;
 		if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
@@ -861,7 +861,7 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
 		if (!(mixer->mask_recsrc & (1 << idx)))
 			continue;
 		pslot = &mixer->slots[idx];
-		slot = (struct slot *)pslot->private_data;
+		slot = pslot->private_data;
 		if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
 			continue;
 		if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
@@ -925,7 +925,7 @@ static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *sl
 
 static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
 {
-	struct slot *p = (struct slot *)chn->private_data;
+	struct slot *p = chn->private_data;
 	if (p) {
 		if (p->allocated && p->assigned) {
 			kfree(p->assigned->name);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index cbe815d..de5a0eb 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -358,8 +358,7 @@ static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
 static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
 					     struct snd_info_buffer *buffer)
 {
-	snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
-			       buffer);
+	snd_pcm_proc_info_read(entry->private_data, buffer);
 }
 
 static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 13afb60..5ab1014 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -962,7 +962,7 @@ static int snd_timer_s_start(struct snd_timer * timer)
 	struct snd_timer_system_private *priv;
 	unsigned long njiff;
 
-	priv = (struct snd_timer_system_private *) timer->private_data;
+	priv = timer->private_data;
 	njiff = (priv->last_jiffies = jiffies);
 	if (priv->correction > timer->sticks - 1) {
 		priv->correction -= timer->sticks - 1;
@@ -981,7 +981,7 @@ static int snd_timer_s_stop(struct snd_timer * timer)
 	struct snd_timer_system_private *priv;
 	unsigned long jiff;
 
-	priv = (struct snd_timer_system_private *) timer->private_data;
+	priv = timer->private_data;
 	del_timer(&priv->tlist);
 	jiff = jiffies;
 	if (time_before(jiff, priv->last_expires))
-- 
1.7.1.337.g6068.dirty


      parent reply	other threads:[~2010-07-12 20:52 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12 20:49 [PATCH 00/36] " Joe Perches
2010-07-12 20:49 ` [PATCH 01/36] arch/cris: " Joe Perches
2010-07-30 17:24   ` Jesper Nilsson
2010-07-12 20:49 ` [PATCH 02/36] arch/ia64: " Joe Perches
2010-07-12 20:49 ` [PATCH 03/36] arch/powerpc: " Joe Perches
2010-07-12 20:49 ` [PATCH 04/36] arch/s390: " Joe Perches
2010-07-12 20:49 ` [PATCH 05/36] drivers/bluetooth: " Joe Perches
2010-07-12 21:40   ` Marcel Holtmann
2010-07-12 20:49 ` [PATCH 06/36] drivers/char: " Joe Perches
2010-07-12 20:49 ` [PATCH 07/36] drivers/gpu: " Joe Perches
2010-07-12 20:50 ` [PATCH 08/36] drivers/ieee1394: " Joe Perches
2010-07-13  8:25   ` Stefan Richter
2010-07-12 20:50 ` [PATCH 09/36] drivers/infiniband: " Joe Perches
2010-07-13 18:41   ` Ralph Campbell
2010-07-20 15:24     ` Jiri Kosina
2010-07-12 20:50 ` [PATCH 10/36] drivers/isdn: " Joe Perches
2010-07-13  4:13   ` David Miller
2010-07-12 20:50 ` [PATCH 11/36] drivers/media: " Joe Perches
2010-07-12 23:58   ` Jarod Wilson
2010-07-13  8:13   ` Laurent Pinchart
2010-07-12 20:50 ` [PATCH 12/36] drivers/misc: " Joe Perches
2010-07-12 20:50 ` [PATCH 13/36] drivers/net/caif: " Joe Perches
2010-07-13  4:13   ` David Miller
2010-07-12 20:50 ` [PATCH 14/36] drivers/net/wireless: " Joe Perches
2010-07-12 20:50 ` [PATCH 15/36] drivers/s390: " Joe Perches
2010-07-12 20:50 ` [PATCH 16/36] drivers/sbus: " Joe Perches
2010-07-13  4:18   ` David Miller
2010-07-13  5:04     ` Joe Perches
2010-07-12 20:50 ` [PATCH 17/36] drivers/scsi: " Joe Perches
2010-07-12 20:50 ` [PATCH 18/36] drivers/staging: " Joe Perches
2010-07-12 20:50 ` [PATCH 19/36] drivers/usb/gadget: " Joe Perches
2010-07-12 20:50 ` [PATCH 20/36] drivers/usb/misc: " Joe Perches
2010-07-12 20:50 ` [PATCH 21/36] drivers/usb: " Joe Perches
2010-07-12 20:50 ` [PATCH 22/36] fs/cifs: " Joe Perches
2010-07-15  2:41   ` Steve French
2010-07-12 20:50 ` [PATCH 23/36] fs/coda: " Joe Perches
2010-07-12 20:50 ` [PATCH 24/36] fs/ecryptfs: " Joe Perches
2010-07-12 20:50 ` [PATCH 25/36] fs/ext3: " Joe Perches
2010-07-12 20:50 ` [PATCH 26/36] fs/ext4: " Joe Perches
2010-07-23 12:56   ` Ted Ts'o
2010-07-12 20:50 ` [PATCH 27/36] fs/ocfs2: " Joe Perches
2010-07-12 22:37   ` Joel Becker
2010-07-20 15:20     ` Jiri Kosina
2010-07-12 20:50 ` [PATCH 28/36] fs: " Joe Perches
2010-07-12 20:50 ` [PATCH 29/36] kernel/trace: " Joe Perches
2010-07-22 18:58   ` Steven Rostedt
2010-07-12 20:50 ` [PATCH 30/36] kernel: " Joe Perches
2010-07-12 20:50 ` [PATCH 31/36] net/core: " Joe Perches
2010-07-13  4:14   ` David Miller
2010-07-12 20:50 ` [PATCH 32/36] net/irda: " Joe Perches
2010-07-13  4:14   ` David Miller
2010-07-12 20:50 ` [PATCH 33/36] net/sunrpc: " Joe Perches
2010-07-12 20:50 ` [PATCH 34/36] sound/soc/blackfin: " Joe Perches
2010-07-13 10:45   ` Liam Girdwood
2010-07-13 11:38   ` Mark Brown
2010-07-12 20:50 ` [PATCH 35/36] sound/soc/davinci: " Joe Perches
2010-07-12 20:50 ` Joe Perches [this message]

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=2411ee190e0bcb4ba81d1f2e1b5db2e2a53fa1ca.1278967121.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    --cc=trivial@kernel.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

all inboxes | Powered by JetHome®