* [PATCH] sound/usb/usbaudio.c: remove unneeded casting
@ 2006-12-21 22:31 ` John Daiker
0 siblings, 0 replies; 4+ messages in thread
From: John Daiker @ 2006-12-21 22:31 UTC (permalink / raw)
To: tiwai, alsa-devel, kernel-janitors
From: John Daiker <daikerjohn@gmail.com>
Went rummaging through usbaudio.c and found some castings that aren't
needed as far as I can see. Part of the KernelJanitors TODO list.
Signed-off-by: John Daiker <daikerjohn@gmail.com>
--- linux-2.6.orig/sound/usb/usbaudio.c 2006-12-21 13:19:19.000000000
-0800
+++ linux-2.6/sound/usb/usbaudio.c 2006-12-21 13:23:06.000000000 -0800
@@ -253,7 +253,7 @@
struct urb *urb)
{
unsigned char *cp = urb->transfer_buffer;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 3;
@@ -275,7 +275,7 @@
struct urb *urb)
{
unsigned char *cp = urb->transfer_buffer;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 4;
@@ -313,7 +313,7 @@
struct urb *urb)
{
int i, offs;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
offs = 0;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
@@ -402,7 +402,7 @@
struct snd_pcm_runtime *runtime,
struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 3;
@@ -420,7 +420,7 @@
struct snd_pcm_runtime *runtime,
struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 4;
@@ -537,7 +537,7 @@
unsigned int counts;
unsigned long flags;
int period_elapsed = 0;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
stride = runtime->frame_bits >> 3;
@@ -655,7 +655,7 @@
*/
static void snd_complete_urb(struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
struct snd_usb_substream *subs = ctx->subs;
struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
int err = 0;
@@ -678,7 +678,7 @@
*/
static void snd_complete_sync_urb(struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
struct snd_usb_substream *subs = ctx->subs;
struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
int err = 0;
@@ -1408,7 +1408,7 @@
static int snd_usb_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{
- struct snd_usb_substream *subs = (struct snd_usb_substream
*)substream->runtime->private_data;
+ struct snd_usb_substream *subs = substream->runtime->private_data;
struct audioformat *fmt;
unsigned int channels, rate, format;
int ret, changed;
@@ -1464,7 +1464,7 @@
*/
static int snd_usb_hw_free(struct snd_pcm_substream *substream)
{
- struct snd_usb_substream *subs = (struct snd_usb_substream
*)substream->runtime->private_data;
+ struct snd_usb_substream *subs = substream->runtime->private_data;
subs->cur_audiofmt = NULL;
subs->cur_rate = 0;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread* [KJ] [PATCH] sound/usb/usbaudio.c: remove unneeded casting
@ 2006-12-21 22:31 ` John Daiker
0 siblings, 0 replies; 4+ messages in thread
From: John Daiker @ 2006-12-21 22:31 UTC (permalink / raw)
To: tiwai, alsa-devel, kernel-janitors
From: John Daiker <daikerjohn@gmail.com>
Went rummaging through usbaudio.c and found some castings that aren't
needed as far as I can see. Part of the KernelJanitors TODO list.
Signed-off-by: John Daiker <daikerjohn@gmail.com>
--- linux-2.6.orig/sound/usb/usbaudio.c 2006-12-21 13:19:19.000000000
-0800
+++ linux-2.6/sound/usb/usbaudio.c 2006-12-21 13:23:06.000000000 -0800
@@ -253,7 +253,7 @@
struct urb *urb)
{
unsigned char *cp = urb->transfer_buffer;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 3;
@@ -275,7 +275,7 @@
struct urb *urb)
{
unsigned char *cp = urb->transfer_buffer;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 4;
@@ -313,7 +313,7 @@
struct urb *urb)
{
int i, offs;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
offs = 0;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
@@ -402,7 +402,7 @@
struct snd_pcm_runtime *runtime,
struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 3;
@@ -420,7 +420,7 @@
struct snd_pcm_runtime *runtime,
struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
urb->dev = ctx->subs->dev; /* we need to set this at each time */
urb->iso_frame_desc[0].length = 4;
@@ -537,7 +537,7 @@
unsigned int counts;
unsigned long flags;
int period_elapsed = 0;
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
stride = runtime->frame_bits >> 3;
@@ -655,7 +655,7 @@
*/
static void snd_complete_urb(struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
struct snd_usb_substream *subs = ctx->subs;
struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
int err = 0;
@@ -678,7 +678,7 @@
*/
static void snd_complete_sync_urb(struct urb *urb)
{
- struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
+ struct snd_urb_ctx *ctx = urb->context;
struct snd_usb_substream *subs = ctx->subs;
struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
int err = 0;
@@ -1408,7 +1408,7 @@
static int snd_usb_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{
- struct snd_usb_substream *subs = (struct snd_usb_substream
*)substream->runtime->private_data;
+ struct snd_usb_substream *subs = substream->runtime->private_data;
struct audioformat *fmt;
unsigned int channels, rate, format;
int ret, changed;
@@ -1464,7 +1464,7 @@
*/
static int snd_usb_hw_free(struct snd_pcm_substream *substream)
{
- struct snd_usb_substream *subs = (struct snd_usb_substream
*)substream->runtime->private_data;
+ struct snd_usb_substream *subs = substream->runtime->private_data;
subs->cur_audiofmt = NULL;
subs->cur_rate = 0;
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] sound/usb/usbaudio.c: remove unneeded casting
2006-12-21 22:31 ` [KJ] " John Daiker
@ 2006-12-22 11:46 ` Takashi Iwai
-1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2006-12-22 11:46 UTC (permalink / raw)
To: John Daiker; +Cc: kernel-janitors, alsa-devel
At Thu, 21 Dec 2006 14:31:34 -0800,
John Daiker wrote:
>
> From: John Daiker <daikerjohn@gmail.com>
>
> Went rummaging through usbaudio.c and found some castings that aren't
> needed as far as I can see. Part of the KernelJanitors TODO list.
>
> Signed-off-by: John Daiker <daikerjohn@gmail.com>
The embedded patch is broken due to your MUA.
Could you fix it or use attachments?
thanks,
Takashi
>
> --- linux-2.6.orig/sound/usb/usbaudio.c 2006-12-21 13:19:19.000000000
> -0800
> +++ linux-2.6/sound/usb/usbaudio.c 2006-12-21 13:23:06.000000000 -0800
> @@ -253,7 +253,7 @@
> struct urb *urb)
> {
> unsigned char *cp = urb->transfer_buffer;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 3;
> @@ -275,7 +275,7 @@
> struct urb *urb)
> {
> unsigned char *cp = urb->transfer_buffer;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 4;
> @@ -313,7 +313,7 @@
> struct urb *urb)
> {
> int i, offs;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> offs = 0;
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> @@ -402,7 +402,7 @@
> struct snd_pcm_runtime *runtime,
> struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 3;
> @@ -420,7 +420,7 @@
> struct snd_pcm_runtime *runtime,
> struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 4;
> @@ -537,7 +537,7 @@
> unsigned int counts;
> unsigned long flags;
> int period_elapsed = 0;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> stride = runtime->frame_bits >> 3;
>
> @@ -655,7 +655,7 @@
> */
> static void snd_complete_urb(struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
> struct snd_usb_substream *subs = ctx->subs;
> struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
> int err = 0;
> @@ -678,7 +678,7 @@
> */
> static void snd_complete_sync_urb(struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
> struct snd_usb_substream *subs = ctx->subs;
> struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
> int err = 0;
> @@ -1408,7 +1408,7 @@
> static int snd_usb_hw_params(struct snd_pcm_substream *substream,
> struct snd_pcm_hw_params *hw_params)
> {
> - struct snd_usb_substream *subs = (struct snd_usb_substream
> *)substream->runtime->private_data;
> + struct snd_usb_substream *subs = substream->runtime->private_data;
> struct audioformat *fmt;
> unsigned int channels, rate, format;
> int ret, changed;
> @@ -1464,7 +1464,7 @@
> */
> static int snd_usb_hw_free(struct snd_pcm_substream *substream)
> {
> - struct snd_usb_substream *subs = (struct snd_usb_substream
> *)substream->runtime->private_data;
> + struct snd_usb_substream *subs = substream->runtime->private_data;
>
> subs->cur_audiofmt = NULL;
> subs->cur_rate = 0;
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [KJ] [PATCH] sound/usb/usbaudio.c: remove unneeded casting
@ 2006-12-22 11:46 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2006-12-22 11:46 UTC (permalink / raw)
To: John Daiker; +Cc: kernel-janitors, alsa-devel
At Thu, 21 Dec 2006 14:31:34 -0800,
John Daiker wrote:
>
> From: John Daiker <daikerjohn@gmail.com>
>
> Went rummaging through usbaudio.c and found some castings that aren't
> needed as far as I can see. Part of the KernelJanitors TODO list.
>
> Signed-off-by: John Daiker <daikerjohn@gmail.com>
The embedded patch is broken due to your MUA.
Could you fix it or use attachments?
thanks,
Takashi
>
> --- linux-2.6.orig/sound/usb/usbaudio.c 2006-12-21 13:19:19.000000000
> -0800
> +++ linux-2.6/sound/usb/usbaudio.c 2006-12-21 13:23:06.000000000 -0800
> @@ -253,7 +253,7 @@
> struct urb *urb)
> {
> unsigned char *cp = urb->transfer_buffer;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 3;
> @@ -275,7 +275,7 @@
> struct urb *urb)
> {
> unsigned char *cp = urb->transfer_buffer;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 4;
> @@ -313,7 +313,7 @@
> struct urb *urb)
> {
> int i, offs;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> offs = 0;
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> @@ -402,7 +402,7 @@
> struct snd_pcm_runtime *runtime,
> struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 3;
> @@ -420,7 +420,7 @@
> struct snd_pcm_runtime *runtime,
> struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> urb->dev = ctx->subs->dev; /* we need to set this at each time */
> urb->iso_frame_desc[0].length = 4;
> @@ -537,7 +537,7 @@
> unsigned int counts;
> unsigned long flags;
> int period_elapsed = 0;
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
>
> stride = runtime->frame_bits >> 3;
>
> @@ -655,7 +655,7 @@
> */
> static void snd_complete_urb(struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
> struct snd_usb_substream *subs = ctx->subs;
> struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
> int err = 0;
> @@ -678,7 +678,7 @@
> */
> static void snd_complete_sync_urb(struct urb *urb)
> {
> - struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
> + struct snd_urb_ctx *ctx = urb->context;
> struct snd_usb_substream *subs = ctx->subs;
> struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
> int err = 0;
> @@ -1408,7 +1408,7 @@
> static int snd_usb_hw_params(struct snd_pcm_substream *substream,
> struct snd_pcm_hw_params *hw_params)
> {
> - struct snd_usb_substream *subs = (struct snd_usb_substream
> *)substream->runtime->private_data;
> + struct snd_usb_substream *subs = substream->runtime->private_data;
> struct audioformat *fmt;
> unsigned int channels, rate, format;
> int ret, changed;
> @@ -1464,7 +1464,7 @@
> */
> static int snd_usb_hw_free(struct snd_pcm_substream *substream)
> {
> - struct snd_usb_substream *subs = (struct snd_usb_substream
> *)substream->runtime->private_data;
> + struct snd_usb_substream *subs = substream->runtime->private_data;
>
> subs->cur_audiofmt = NULL;
> subs->cur_rate = 0;
>
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-22 11:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-21 22:31 [PATCH] sound/usb/usbaudio.c: remove unneeded casting John Daiker
2006-12-21 22:31 ` [KJ] " John Daiker
2006-12-22 11:46 ` Takashi Iwai
2006-12-22 11:46 ` [KJ] " Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.