Skip to content

Commit

Permalink
staging/easycap: use %p for printing pointers
Browse files Browse the repository at this point in the history
use %p instead of %X
drop casting of pointer to long long int

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent 7ee7142 commit 073f482
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
34 changes: 12 additions & 22 deletions drivers/staging/easycap/easycap_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,14 @@ if (NULL == peasycap) {
return -EFAULT;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
if (NULL == peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device is NULL\n");
return -EFAULT;
} else {
JOM(16, "0x%08lX=peasycap->pusb_device\n",
(long int)peasycap->pusb_device);
JOM(16, "peasycap->pusb_device=%p\n", peasycap->pusb_device);
}
file->private_data = peasycap;
rc = wakeup_device(peasycap->pusb_device);
Expand Down Expand Up @@ -746,7 +745,7 @@ if (NULL == peasycap) {
return -EFAULT;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
if (0 != kill_video_urbs(peasycap)) {
Expand Down Expand Up @@ -785,7 +784,7 @@ if (NULL == peasycap) {
return -EFAULT;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
if (0 != kill_video_urbs(peasycap)) {
Expand Down Expand Up @@ -825,7 +824,7 @@ if (NULL == peasycap) {
return;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return;
}
kd = isdongle(peasycap);
Expand Down Expand Up @@ -1041,7 +1040,7 @@ if (NULL == peasycap) {
return -EFAULT;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
if (NULL == peasycap->pusb_device) {
Expand Down Expand Up @@ -1078,8 +1077,7 @@ if (0 <= kd && DONGLE_MANY > kd) {
return -ERESTARTSYS;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n",
(unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -ERESTARTSYS;
}
Expand Down Expand Up @@ -2622,7 +2620,7 @@ if (NULL == peasycap) {
return;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return;
}
peasycap->vma_many++;
Expand All @@ -2640,7 +2638,7 @@ if (NULL == peasycap) {
return;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return;
}
peasycap->vma_many--;
Expand Down Expand Up @@ -2774,7 +2772,7 @@ if (NULL == peasycap) {
return;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return;
}
if (peasycap->video_eof)
Expand Down Expand Up @@ -3280,15 +3278,7 @@ static int easycap_usb_probe(struct usb_interface *pusb_interface,
SAY("ERROR: Could not allocate peasycap\n");
return -ENOMEM;
}
SAM("allocated 0x%08lX=peasycap\n", (unsigned long int) peasycap);
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
SAM("where 0x%08lX=&peasycap->video_device\n",
(unsigned long int) &peasycap->video_device);
SAM("and 0x%08lX=&peasycap->v4l2_device\n",
(unsigned long int) &peasycap->v4l2_device);
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
SAM("allocated %p=peasycap\n", peasycap);
/*---------------------------------------------------------------------------*/
/*
* PERFORM URGENT INTIALIZATIONS ...
Expand Down Expand Up @@ -4573,7 +4563,7 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
/*---------------------------------------------------------------------------*/
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return;
}
/*---------------------------------------------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/easycap/easycap_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ if (NULL == prt) {
return -EFAULT;
}
if (NULL != prt->dma_area) {
JOT(8, "0x%08lX=prt->dma_area\n", (unsigned long int)prt->dma_area);
JOT(8, "prt->dma_area = %p\n", prt->dma_area);
vfree(prt->dma_area);
prt->dma_area = NULL;
} else
Expand Down
9 changes: 4 additions & 5 deletions drivers/staging/easycap/easycap_sound_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
/*---------------------------------------------------------------------------*/
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
/*---------------------------------------------------------------------------*/
Expand All @@ -377,7 +377,7 @@ if (NULL == peasycap) {
return -EFAULT;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
if (0 != kill_audio_urbs(peasycap)) {
Expand Down Expand Up @@ -424,7 +424,7 @@ if (NULL == peasycap) {
return -EFAULT;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", (unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
return -EFAULT;
}
if (NULL == peasycap->pusb_device) {
Expand Down Expand Up @@ -460,8 +460,7 @@ if (0 <= kd && DONGLE_MANY > kd) {
return -ERESTARTSYS;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n",
(unsigned long int) peasycap);
SAY("ERROR: bad peasycap: %p\n", peasycap);
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
}
Expand Down

0 comments on commit 073f482

Please sign in to comment.