diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-19 02:40:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:43 -0400 |
commit | ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed (patch) | |
tree | 3123c03b25dd5c0cd24b6ab4fc16731217838157 /drivers | |
parent | 9a2e70572e94e21e7ec4186702d045415422bda0 (diff) |
Use helpers to obtain task pid in printks
The task_struct->pid member is going to be deprecated, so start
using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
the kernel.
The first thing to start with is the pid, printed to dmesg - in
this case we may safely use task_pid_nr(). Besides, printks produce
more (much more) than a half of all the explicit pid usage.
[akpm@linux-foundation.org: git-drm went and changed lots of stuff]
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/nbd.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/cdrom.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_bufs.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_drv.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_fops.c | 7 | ||||
-rw-r--r-- | drivers/char/drm/drm_lock.c | 6 | ||||
-rw-r--r-- | drivers/char/drm/drm_os_linux.h | 2 | ||||
-rw-r--r-- | drivers/char/drm/i810_dma.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/i830_dma.c | 2 | ||||
-rw-r--r-- | drivers/char/sx.c | 2 | ||||
-rw-r--r-- | drivers/char/tty_io.c | 6 | ||||
-rw-r--r-- | drivers/hid/hidraw.c | 4 | ||||
-rw-r--r-- | drivers/md/md.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zoran_driver.c | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/wl.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/devio.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 2 |
19 files changed, 31 insertions, 30 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index cb136a919f2a..ac4a0cb217ab 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -188,7 +188,7 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size, | |||
188 | if (signal_pending(current)) { | 188 | if (signal_pending(current)) { |
189 | siginfo_t info; | 189 | siginfo_t info; |
190 | printk(KERN_WARNING "nbd (pid %d: %s) got signal %d\n", | 190 | printk(KERN_WARNING "nbd (pid %d: %s) got signal %d\n", |
191 | current->pid, current->comm, | 191 | task_pid_nr(current), current->comm, |
192 | dequeue_signal_lock(current, ¤t->blocked, &info)); | 192 | dequeue_signal_lock(current, ¤t->blocked, &info)); |
193 | result = -EINTR; | 193 | result = -EINTR; |
194 | sock_shutdown(lo, !send); | 194 | sock_shutdown(lo, !send); |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index d70745c84250..af0561053167 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -1107,7 +1107,7 @@ int open_for_data(struct cdrom_device_info * cdi) | |||
1107 | is the default case! */ | 1107 | is the default case! */ |
1108 | cdinfo(CD_OPEN, "bummer. wrong media type.\n"); | 1108 | cdinfo(CD_OPEN, "bummer. wrong media type.\n"); |
1109 | cdinfo(CD_WARNING, "pid %d must open device O_NONBLOCK!\n", | 1109 | cdinfo(CD_WARNING, "pid %d must open device O_NONBLOCK!\n", |
1110 | (unsigned int)current->pid); | 1110 | (unsigned int)task_pid_nr(current)); |
1111 | ret=-EMEDIUMTYPE; | 1111 | ret=-EMEDIUMTYPE; |
1112 | goto clean_up_and_return; | 1112 | goto clean_up_and_return; |
1113 | } | 1113 | } |
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index 856774fbe025..d24a6c2c2c24 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c | |||
@@ -1456,7 +1456,7 @@ int drm_freebufs(struct drm_device *dev, void *data, | |||
1456 | buf = dma->buflist[idx]; | 1456 | buf = dma->buflist[idx]; |
1457 | if (buf->file_priv != file_priv) { | 1457 | if (buf->file_priv != file_priv) { |
1458 | DRM_ERROR("Process %d freeing buffer not owned\n", | 1458 | DRM_ERROR("Process %d freeing buffer not owned\n", |
1459 | current->pid); | 1459 | task_pid_nr(current)); |
1460 | return -EINVAL; | 1460 | return -EINVAL; |
1461 | } | 1461 | } |
1462 | drm_free_buffer(dev, buf); | 1462 | drm_free_buffer(dev, buf); |
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index 72668b15e5ce..44a46268b02b 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -463,7 +463,7 @@ int drm_ioctl(struct inode *inode, struct file *filp, | |||
463 | ++file_priv->ioctl_count; | 463 | ++file_priv->ioctl_count; |
464 | 464 | ||
465 | DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", | 465 | DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", |
466 | current->pid, cmd, nr, | 466 | task_pid_nr(current), cmd, nr, |
467 | (long)old_encode_dev(file_priv->head->device), | 467 | (long)old_encode_dev(file_priv->head->device), |
468 | file_priv->authenticated); | 468 | file_priv->authenticated); |
469 | 469 | ||
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index f383fc37190c..3992f73299cc 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c | |||
@@ -234,7 +234,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, | |||
234 | if (!drm_cpu_valid()) | 234 | if (!drm_cpu_valid()) |
235 | return -EINVAL; | 235 | return -EINVAL; |
236 | 236 | ||
237 | DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor); | 237 | DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor); |
238 | 238 | ||
239 | priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES); | 239 | priv = drm_alloc(sizeof(*priv), DRM_MEM_FILES); |
240 | if (!priv) | 240 | if (!priv) |
@@ -244,7 +244,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, | |||
244 | filp->private_data = priv; | 244 | filp->private_data = priv; |
245 | priv->filp = filp; | 245 | priv->filp = filp; |
246 | priv->uid = current->euid; | 246 | priv->uid = current->euid; |
247 | priv->pid = current->pid; | 247 | priv->pid = task_pid_nr(current); |
248 | priv->minor = minor; | 248 | priv->minor = minor; |
249 | priv->head = drm_heads[minor]; | 249 | priv->head = drm_heads[minor]; |
250 | priv->ioctl_count = 0; | 250 | priv->ioctl_count = 0; |
@@ -339,7 +339,8 @@ int drm_release(struct inode *inode, struct file *filp) | |||
339 | */ | 339 | */ |
340 | 340 | ||
341 | DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n", | 341 | DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n", |
342 | current->pid, (long)old_encode_dev(file_priv->head->device), | 342 | task_pid_nr(current), |
343 | (long)old_encode_dev(file_priv->head->device), | ||
343 | dev->open_count); | 344 | dev->open_count); |
344 | 345 | ||
345 | if (dev->driver->reclaim_buffers_locked && dev->lock.hw_lock) { | 346 | if (dev->driver->reclaim_buffers_locked && dev->lock.hw_lock) { |
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c index c6b73e744d67..bea2a7d5b2b2 100644 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c | |||
@@ -58,12 +58,12 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
58 | 58 | ||
59 | if (lock->context == DRM_KERNEL_CONTEXT) { | 59 | if (lock->context == DRM_KERNEL_CONTEXT) { |
60 | DRM_ERROR("Process %d using kernel context %d\n", | 60 | DRM_ERROR("Process %d using kernel context %d\n", |
61 | current->pid, lock->context); | 61 | task_pid_nr(current), lock->context); |
62 | return -EINVAL; | 62 | return -EINVAL; |
63 | } | 63 | } |
64 | 64 | ||
65 | DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n", | 65 | DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n", |
66 | lock->context, current->pid, | 66 | lock->context, task_pid_nr(current), |
67 | dev->lock.hw_lock->lock, lock->flags); | 67 | dev->lock.hw_lock->lock, lock->flags); |
68 | 68 | ||
69 | if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE)) | 69 | if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE)) |
@@ -153,7 +153,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
153 | 153 | ||
154 | if (lock->context == DRM_KERNEL_CONTEXT) { | 154 | if (lock->context == DRM_KERNEL_CONTEXT) { |
155 | DRM_ERROR("Process %d using kernel context %d\n", | 155 | DRM_ERROR("Process %d using kernel context %d\n", |
156 | current->pid, lock->context); | 156 | task_pid_nr(current), lock->context); |
157 | return -EINVAL; | 157 | return -EINVAL; |
158 | } | 158 | } |
159 | 159 | ||
diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h index 114e54e0f61b..76e44ac94fb5 100644 --- a/drivers/char/drm/drm_os_linux.h +++ b/drivers/char/drm/drm_os_linux.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | 8 | ||
9 | /** Current process ID */ | 9 | /** Current process ID */ |
10 | #define DRM_CURRENTPID current->pid | 10 | #define DRM_CURRENTPID task_pid_nr(current) |
11 | #define DRM_SUSER(p) capable(CAP_SYS_ADMIN) | 11 | #define DRM_SUSER(p) capable(CAP_SYS_ADMIN) |
12 | #define DRM_UDELAY(d) udelay(d) | 12 | #define DRM_UDELAY(d) udelay(d) |
13 | /** Read a byte from a MMIO region */ | 13 | /** Read a byte from a MMIO region */ |
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c index 8e841bdee6dc..eb381a7c5bee 100644 --- a/drivers/char/drm/i810_dma.c +++ b/drivers/char/drm/i810_dma.c | |||
@@ -1024,7 +1024,7 @@ static int i810_getbuf(struct drm_device *dev, void *data, | |||
1024 | retcode = i810_dma_get_buffer(dev, d, file_priv); | 1024 | retcode = i810_dma_get_buffer(dev, d, file_priv); |
1025 | 1025 | ||
1026 | DRM_DEBUG("i810_dma: %d returning %d, granted = %d\n", | 1026 | DRM_DEBUG("i810_dma: %d returning %d, granted = %d\n", |
1027 | current->pid, retcode, d->granted); | 1027 | task_pid_nr(current), retcode, d->granted); |
1028 | 1028 | ||
1029 | sarea_priv->last_dispatch = (int)hw_status[5]; | 1029 | sarea_priv->last_dispatch = (int)hw_status[5]; |
1030 | 1030 | ||
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c index 43a1f78712d6..69a363edb0d2 100644 --- a/drivers/char/drm/i830_dma.c +++ b/drivers/char/drm/i830_dma.c | |||
@@ -1409,7 +1409,7 @@ static int i830_getbuf(struct drm_device *dev, void *data, | |||
1409 | retcode = i830_dma_get_buffer(dev, d, file_priv); | 1409 | retcode = i830_dma_get_buffer(dev, d, file_priv); |
1410 | 1410 | ||
1411 | DRM_DEBUG("i830_dma: %d returning %d, granted = %d\n", | 1411 | DRM_DEBUG("i830_dma: %d returning %d, granted = %d\n", |
1412 | current->pid, retcode, d->granted); | 1412 | task_pid_nr(current), retcode, d->granted); |
1413 | 1413 | ||
1414 | sarea_priv->last_dispatch = (int)hw_status[5]; | 1414 | sarea_priv->last_dispatch = (int)hw_status[5]; |
1415 | 1415 | ||
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 85a23283dff5..a6e1c9ba1217 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -1467,7 +1467,7 @@ static int sx_open(struct tty_struct *tty, struct file *filp) | |||
1467 | 1467 | ||
1468 | line = tty->index; | 1468 | line = tty->index; |
1469 | sx_dprintk(SX_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p, " | 1469 | sx_dprintk(SX_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p, " |
1470 | "np=%d)\n", current->pid, line, tty, | 1470 | "np=%d)\n", task_pid_nr(current), line, tty, |
1471 | current->signal->tty, sx_nports); | 1471 | current->signal->tty, sx_nports); |
1472 | 1472 | ||
1473 | if ((line < 0) || (line >= SX_NPORTS) || (line >= sx_nports)) | 1473 | if ((line < 0) || (line >= SX_NPORTS) || (line >= sx_nports)) |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index e40544947135..13a53575a016 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -3530,7 +3530,7 @@ void __do_SAK(struct tty_struct *tty) | |||
3530 | do_each_pid_task(session, PIDTYPE_SID, p) { | 3530 | do_each_pid_task(session, PIDTYPE_SID, p) { |
3531 | printk(KERN_NOTICE "SAK: killed process %d" | 3531 | printk(KERN_NOTICE "SAK: killed process %d" |
3532 | " (%s): task_session_nr(p)==tty->session\n", | 3532 | " (%s): task_session_nr(p)==tty->session\n", |
3533 | p->pid, p->comm); | 3533 | task_pid_nr(p), p->comm); |
3534 | send_sig(SIGKILL, p, 1); | 3534 | send_sig(SIGKILL, p, 1); |
3535 | } while_each_pid_task(session, PIDTYPE_SID, p); | 3535 | } while_each_pid_task(session, PIDTYPE_SID, p); |
3536 | /* Now kill any processes that happen to have the | 3536 | /* Now kill any processes that happen to have the |
@@ -3540,7 +3540,7 @@ void __do_SAK(struct tty_struct *tty) | |||
3540 | if (p->signal->tty == tty) { | 3540 | if (p->signal->tty == tty) { |
3541 | printk(KERN_NOTICE "SAK: killed process %d" | 3541 | printk(KERN_NOTICE "SAK: killed process %d" |
3542 | " (%s): task_session_nr(p)==tty->session\n", | 3542 | " (%s): task_session_nr(p)==tty->session\n", |
3543 | p->pid, p->comm); | 3543 | task_pid_nr(p), p->comm); |
3544 | send_sig(SIGKILL, p, 1); | 3544 | send_sig(SIGKILL, p, 1); |
3545 | continue; | 3545 | continue; |
3546 | } | 3546 | } |
@@ -3560,7 +3560,7 @@ void __do_SAK(struct tty_struct *tty) | |||
3560 | filp->private_data == tty) { | 3560 | filp->private_data == tty) { |
3561 | printk(KERN_NOTICE "SAK: killed process %d" | 3561 | printk(KERN_NOTICE "SAK: killed process %d" |
3562 | " (%s): fd#%d opened to the tty\n", | 3562 | " (%s): fd#%d opened to the tty\n", |
3563 | p->pid, p->comm, i); | 3563 | task_pid_nr(p), p->comm, i); |
3564 | force_sig(SIGKILL, p); | 3564 | force_sig(SIGKILL, p); |
3565 | break; | 3565 | break; |
3566 | } | 3566 | } |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index a702e2f6da7d..1ca6f4635eeb 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -113,13 +113,13 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t | |||
113 | 113 | ||
114 | if (count > HID_MIN_BUFFER_SIZE) { | 114 | if (count > HID_MIN_BUFFER_SIZE) { |
115 | printk(KERN_WARNING "hidraw: pid %d passed too large report\n", | 115 | printk(KERN_WARNING "hidraw: pid %d passed too large report\n", |
116 | current->pid); | 116 | task_pid_nr(current)); |
117 | return -EINVAL; | 117 | return -EINVAL; |
118 | } | 118 | } |
119 | 119 | ||
120 | if (count < 2) { | 120 | if (count < 2) { |
121 | printk(KERN_WARNING "hidraw: pid %d passed too short report\n", | 121 | printk(KERN_WARNING "hidraw: pid %d passed too short report\n", |
122 | current->pid); | 122 | task_pid_nr(current)); |
123 | return -EINVAL; | 123 | return -EINVAL; |
124 | } | 124 | } |
125 | 125 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index c059ae6f37e5..808cd9549456 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -4717,7 +4717,7 @@ mdk_thread_t *md_register_thread(void (*run) (mddev_t *), mddev_t *mddev, | |||
4717 | 4717 | ||
4718 | void md_unregister_thread(mdk_thread_t *thread) | 4718 | void md_unregister_thread(mdk_thread_t *thread) |
4719 | { | 4719 | { |
4720 | dprintk("interrupting MD-thread pid %d\n", thread->tsk->pid); | 4720 | dprintk("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk)); |
4721 | 4721 | ||
4722 | kthread_stop(thread->tsk); | 4722 | kthread_stop(thread->tsk); |
4723 | kfree(thread); | 4723 | kfree(thread); |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 1c14fa2bd411..419e5af78533 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -1285,7 +1285,7 @@ zoran_open (struct inode *inode, | |||
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", | 1287 | dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", |
1288 | ZR_DEVNAME(zr), current->comm, current->pid, zr->user); | 1288 | ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); |
1289 | 1289 | ||
1290 | /* now, create the open()-specific file_ops struct */ | 1290 | /* now, create the open()-specific file_ops struct */ |
1291 | fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); | 1291 | fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); |
@@ -1358,7 +1358,7 @@ zoran_close (struct inode *inode, | |||
1358 | struct zoran *zr = fh->zr; | 1358 | struct zoran *zr = fh->zr; |
1359 | 1359 | ||
1360 | dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", | 1360 | dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", |
1361 | ZR_DEVNAME(zr), current->comm, current->pid, zr->user); | 1361 | ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); |
1362 | 1362 | ||
1363 | /* kernel locks (fs/device.c), so don't do that ourselves | 1363 | /* kernel locks (fs/device.c), so don't do that ourselves |
1364 | * (prevents deadlocks) */ | 1364 | * (prevents deadlocks) */ |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index a4f1bf33164a..6330c8cc72b5 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -1309,7 +1309,7 @@ static int ubi_thread(void *u) | |||
1309 | struct ubi_device *ubi = u; | 1309 | struct ubi_device *ubi = u; |
1310 | 1310 | ||
1311 | ubi_msg("background thread \"%s\" started, PID %d", | 1311 | ubi_msg("background thread \"%s\" started, PID %d", |
1312 | ubi->bgt_name, current->pid); | 1312 | ubi->bgt_name, task_pid_nr(current)); |
1313 | 1313 | ||
1314 | set_freezable(); | 1314 | set_freezable(); |
1315 | for (;;) { | 1315 | for (;;) { |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 40f516d42c5e..d8f5efcfcab9 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
@@ -2920,7 +2920,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i) | |||
2920 | 2920 | ||
2921 | printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor " | 2921 | printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor " |
2922 | "- update software to use iwconfig mode monitor\n", | 2922 | "- update software to use iwconfig mode monitor\n", |
2923 | dev->name, current->pid, current->comm); | 2923 | dev->name, task_pid_nr(current), current->comm); |
2924 | 2924 | ||
2925 | /* Backward compatibility code - this can be removed at some point */ | 2925 | /* Backward compatibility code - this can be removed at some point */ |
2926 | 2926 | ||
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index 7ef0afc3cd68..5f3a0d7b18de 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
@@ -285,7 +285,7 @@ static void sas_discover_domain(struct work_struct *work) | |||
285 | dev = port->port_dev; | 285 | dev = port->port_dev; |
286 | 286 | ||
287 | SAS_DPRINTK("DOING DISCOVERY on port %d, pid:%d\n", port->id, | 287 | SAS_DPRINTK("DOING DISCOVERY on port %d, pid:%d\n", port->id, |
288 | current->pid); | 288 | task_pid_nr(current)); |
289 | 289 | ||
290 | switch (dev->dev_type) { | 290 | switch (dev->dev_type) { |
291 | case SAS_END_DEV: | 291 | case SAS_END_DEV: |
@@ -320,7 +320,7 @@ static void sas_discover_domain(struct work_struct *work) | |||
320 | } | 320 | } |
321 | 321 | ||
322 | SAS_DPRINTK("DONE DISCOVERY on port %d, pid:%d, result:%d\n", port->id, | 322 | SAS_DPRINTK("DONE DISCOVERY on port %d, pid:%d, result:%d\n", port->id, |
323 | current->pid, error); | 323 | task_pid_nr(current), error); |
324 | } | 324 | } |
325 | 325 | ||
326 | static void sas_revalidate_domain(struct work_struct *work) | 326 | static void sas_revalidate_domain(struct work_struct *work) |
@@ -334,12 +334,12 @@ static void sas_revalidate_domain(struct work_struct *work) | |||
334 | &port->disc.pending); | 334 | &port->disc.pending); |
335 | 335 | ||
336 | SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id, | 336 | SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id, |
337 | current->pid); | 337 | task_pid_nr(current)); |
338 | if (port->port_dev) | 338 | if (port->port_dev) |
339 | res = sas_ex_revalidate_domain(port->port_dev); | 339 | res = sas_ex_revalidate_domain(port->port_dev); |
340 | 340 | ||
341 | SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n", | 341 | SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n", |
342 | port->id, current->pid, res); | 342 | port->id, task_pid_nr(current), res); |
343 | } | 343 | } |
344 | 344 | ||
345 | /* ---------- Events ---------- */ | 345 | /* ---------- Events ---------- */ |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index f013b4012c9a..1f4f6d02fe25 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -460,7 +460,7 @@ static int checkintf(struct dev_state *ps, unsigned int ifnum) | |||
460 | return 0; | 460 | return 0; |
461 | /* if not yet claimed, claim it for the driver */ | 461 | /* if not yet claimed, claim it for the driver */ |
462 | dev_warn(&ps->dev->dev, "usbfs: process %d (%s) did not claim interface %u before use\n", | 462 | dev_warn(&ps->dev->dev, "usbfs: process %d (%s) did not claim interface %u before use\n", |
463 | current->pid, current->comm, ifnum); | 463 | task_pid_nr(current), current->comm, ifnum); |
464 | return claimintf(ps, ifnum); | 464 | return claimintf(ps, ifnum); |
465 | } | 465 | } |
466 | 466 | ||
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 73726c570a6e..1d174dcb3ac9 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -4006,7 +4006,7 @@ static int __init fsg_bind(struct usb_gadget *gadget) | |||
4006 | DBG(fsg, "removable=%d, stall=%d, buflen=%u\n", | 4006 | DBG(fsg, "removable=%d, stall=%d, buflen=%u\n", |
4007 | mod_data.removable, mod_data.can_stall, | 4007 | mod_data.removable, mod_data.can_stall, |
4008 | mod_data.buflen); | 4008 | mod_data.buflen); |
4009 | DBG(fsg, "I/O thread pid: %d\n", fsg->thread_task->pid); | 4009 | DBG(fsg, "I/O thread pid: %d\n", task_pid_nr(fsg->thread_task)); |
4010 | 4010 | ||
4011 | set_bit(REGISTERED, &fsg->atomic_bitflags); | 4011 | set_bit(REGISTERED, &fsg->atomic_bitflags); |
4012 | 4012 | ||