diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-11 14:34:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-11 14:34:03 -0800 |
commit | a9a08845e9acbd224e4ee466f5c1275ed50054e8 (patch) | |
tree | 415d6e6a82e001c65e6b161539411f54ba5fe8ce /sound | |
parent | ee5daa1361fceb6f482c005bcc9ba8d01b92ea5c (diff) | |
download | blackbird-op-linux-a9a08845e9acbd224e4ee466f5c1275ed50054e8.tar.gz blackbird-op-linux-a9a08845e9acbd224e4ee466f5c1275ed50054e8.zip |
vfs: do bulk POLL* -> EPOLL* replacement
This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:
for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
done
with de-mangling cleanups yet to come.
NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do. But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.
The next patch from Al will sort out the final differences, and we
should be all done.
Scripted-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/compress_offload.c | 10 | ||||
-rw-r--r-- | sound/core/control.c | 2 | ||||
-rw-r--r-- | sound/core/info.c | 4 | ||||
-rw-r--r-- | sound/core/init.c | 2 | ||||
-rw-r--r-- | sound/core/oss/pcm_oss.c | 4 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 14 | ||||
-rw-r--r-- | sound/core/rawmidi.c | 4 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_rw.c | 4 | ||||
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 4 | ||||
-rw-r--r-- | sound/core/timer.c | 4 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_hwdep.c | 2 | ||||
-rw-r--r-- | sound/firewire/dice/dice-hwdep.c | 2 | ||||
-rw-r--r-- | sound/firewire/digi00x/digi00x-hwdep.c | 2 | ||||
-rw-r--r-- | sound/firewire/fireface/ff-hwdep.c | 2 | ||||
-rw-r--r-- | sound/firewire/fireworks/fireworks_hwdep.c | 4 | ||||
-rw-r--r-- | sound/firewire/motu/motu-hwdep.c | 4 | ||||
-rw-r--r-- | sound/firewire/oxfw/oxfw-hwdep.c | 2 | ||||
-rw-r--r-- | sound/firewire/tascam/tascam-hwdep.c | 2 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 2 | ||||
-rw-r--r-- | sound/usb/mixer_quirks.c | 2 | ||||
-rw-r--r-- | sound/usb/usx2y/us122l.c | 4 | ||||
-rw-r--r-- | sound/usb/usx2y/usX2Yhwdep.c | 4 |
22 files changed, 42 insertions, 42 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index a12b9555e910..4563432badba 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -399,9 +399,9 @@ static int snd_compr_mmap(struct file *f, struct vm_area_struct *vma) static __poll_t snd_compr_get_poll(struct snd_compr_stream *stream) { if (stream->direction == SND_COMPRESS_PLAYBACK) - return POLLOUT | POLLWRNORM; + return EPOLLOUT | EPOLLWRNORM; else - return POLLIN | POLLRDNORM; + return EPOLLIN | EPOLLRDNORM; } static __poll_t snd_compr_poll(struct file *f, poll_table *wait) @@ -412,7 +412,7 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait) __poll_t retval = 0; if (snd_BUG_ON(!data)) - return POLLERR; + return EPOLLERR; stream = &data->stream; @@ -421,7 +421,7 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait) switch (stream->runtime->state) { case SNDRV_PCM_STATE_OPEN: case SNDRV_PCM_STATE_XRUN: - retval = snd_compr_get_poll(stream) | POLLERR; + retval = snd_compr_get_poll(stream) | EPOLLERR; goto out; default: break; @@ -447,7 +447,7 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait) retval = snd_compr_get_poll(stream); break; default: - retval = snd_compr_get_poll(stream) | POLLERR; + retval = snd_compr_get_poll(stream) | EPOLLERR; break; } out: diff --git a/sound/core/control.c b/sound/core/control.c index 50fa16022f1f..0b3026d937b1 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1679,7 +1679,7 @@ static __poll_t snd_ctl_poll(struct file *file, poll_table * wait) mask = 0; if (!list_empty(&ctl->events)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; return mask; } diff --git a/sound/core/info.c b/sound/core/info.c index aa86f3f8e056..4b36767af9e1 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -214,9 +214,9 @@ static __poll_t snd_info_entry_poll(struct file *file, poll_table *wait) data->file_private_data, file, wait); if (entry->c.ops->read) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; if (entry->c.ops->write) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; return mask; } diff --git a/sound/core/init.c b/sound/core/init.c index 8753440c3a6e..4fa5dd955740 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -346,7 +346,7 @@ static int snd_disconnect_release(struct inode *inode, struct file *file) static __poll_t snd_disconnect_poll(struct file * file, poll_table * wait) { - return POLLERR | POLLNVAL; + return EPOLLERR | EPOLLNVAL; } static long snd_disconnect_ioctl(struct file *file, diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 3ebba9c7f86e..b044c0a5a674 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2705,7 +2705,7 @@ static __poll_t snd_pcm_oss_poll(struct file *file, poll_table * wait) if (runtime->status->state != SNDRV_PCM_STATE_DRAINING && (runtime->status->state != SNDRV_PCM_STATE_RUNNING || snd_pcm_oss_playback_ready(psubstream))) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; snd_pcm_stream_unlock_irq(psubstream); } if (csubstream != NULL) { @@ -2715,7 +2715,7 @@ static __poll_t snd_pcm_oss_poll(struct file *file, poll_table * wait) snd_pcm_stream_lock_irq(csubstream); if ((ostate = runtime->status->state) != SNDRV_PCM_STATE_RUNNING || snd_pcm_oss_capture_ready(csubstream)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; snd_pcm_stream_unlock_irq(csubstream); if (ostate != SNDRV_PCM_STATE_RUNNING && runtime->oss.trigger) { struct snd_pcm_oss_file ofile; diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 51104df924e1..77ba50ddcf9e 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -3147,7 +3147,7 @@ static __poll_t snd_pcm_playback_poll(struct file *file, poll_table * wait) substream = pcm_file->substream; if (PCM_RUNTIME_CHECK(substream)) - return POLLOUT | POLLWRNORM | POLLERR; + return EPOLLOUT | EPOLLWRNORM | EPOLLERR; runtime = substream->runtime; poll_wait(file, &runtime->sleep, wait); @@ -3159,7 +3159,7 @@ static __poll_t snd_pcm_playback_poll(struct file *file, poll_table * wait) case SNDRV_PCM_STATE_PREPARED: case SNDRV_PCM_STATE_PAUSED: if (avail >= runtime->control->avail_min) { - mask = POLLOUT | POLLWRNORM; + mask = EPOLLOUT | EPOLLWRNORM; break; } /* Fall through */ @@ -3167,7 +3167,7 @@ static __poll_t snd_pcm_playback_poll(struct file *file, poll_table * wait) mask = 0; break; default: - mask = POLLOUT | POLLWRNORM | POLLERR; + mask = EPOLLOUT | EPOLLWRNORM | EPOLLERR; break; } snd_pcm_stream_unlock_irq(substream); @@ -3186,7 +3186,7 @@ static __poll_t snd_pcm_capture_poll(struct file *file, poll_table * wait) substream = pcm_file->substream; if (PCM_RUNTIME_CHECK(substream)) - return POLLIN | POLLRDNORM | POLLERR; + return EPOLLIN | EPOLLRDNORM | EPOLLERR; runtime = substream->runtime; poll_wait(file, &runtime->sleep, wait); @@ -3198,19 +3198,19 @@ static __poll_t snd_pcm_capture_poll(struct file *file, poll_table * wait) case SNDRV_PCM_STATE_PREPARED: case SNDRV_PCM_STATE_PAUSED: if (avail >= runtime->control->avail_min) { - mask = POLLIN | POLLRDNORM; + mask = EPOLLIN | EPOLLRDNORM; break; } mask = 0; break; case SNDRV_PCM_STATE_DRAINING: if (avail > 0) { - mask = POLLIN | POLLRDNORM; + mask = EPOLLIN | EPOLLRDNORM; break; } /* Fall through */ default: - mask = POLLIN | POLLRDNORM | POLLERR; + mask = EPOLLIN | EPOLLRDNORM | EPOLLERR; break; } snd_pcm_stream_unlock_irq(substream); diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index fae21311723f..69616d00481c 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -1385,11 +1385,11 @@ static __poll_t snd_rawmidi_poll(struct file *file, poll_table * wait) mask = 0; if (rfile->input != NULL) { if (snd_rawmidi_ready(rfile->input)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; } if (rfile->output != NULL) { if (snd_rawmidi_ready(rfile->output)) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; } return mask; } diff --git a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c index c538e78ca310..30886f5fb100 100644 --- a/sound/core/seq/oss/seq_oss_rw.c +++ b/sound/core/seq/oss/seq_oss_rw.c @@ -204,13 +204,13 @@ snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wai /* input */ if (dp->readq && is_read_mode(dp->file_mode)) { if (snd_seq_oss_readq_poll(dp->readq, file, wait)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; } /* output */ if (dp->writeq && is_write_mode(dp->file_mode)) { if (snd_seq_kernel_client_write_poll(dp->cseq, file, wait)) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; } return mask; } diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index b611deef81f5..60db32785f62 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -1101,7 +1101,7 @@ static __poll_t snd_seq_poll(struct file *file, poll_table * wait) /* check if data is available in the outqueue */ if (snd_seq_fifo_poll_wait(client->data.user.fifo, file, wait)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; } if (snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT) { @@ -1109,7 +1109,7 @@ static __poll_t snd_seq_poll(struct file *file, poll_table * wait) /* check if data is available in the pool */ if (!snd_seq_write_pool_allocated(client) || snd_seq_pool_poll_wait(client->pool, file, wait)) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; } return mask; diff --git a/sound/core/timer.c b/sound/core/timer.c index da05e314917f..dc87728c5b74 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -2084,9 +2084,9 @@ static __poll_t snd_timer_user_poll(struct file *file, poll_table * wait) mask = 0; spin_lock_irq(&tu->qlock); if (tu->qused) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; if (tu->disconnected) - mask |= POLLERR; + mask |= EPOLLERR; spin_unlock_irq(&tu->qlock); return mask; diff --git a/sound/firewire/bebob/bebob_hwdep.c b/sound/firewire/bebob/bebob_hwdep.c index 83e791810c52..04c321e08c62 100644 --- a/sound/firewire/bebob/bebob_hwdep.c +++ b/sound/firewire/bebob/bebob_hwdep.c @@ -63,7 +63,7 @@ hwdep_poll(struct snd_hwdep *hwdep, struct file *file, poll_table *wait) spin_lock_irq(&bebob->lock); if (bebob->dev_lock_changed) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&bebob->lock); diff --git a/sound/firewire/dice/dice-hwdep.c b/sound/firewire/dice/dice-hwdep.c index 7a8af0f91c96..6498bf6909ba 100644 --- a/sound/firewire/dice/dice-hwdep.c +++ b/sound/firewire/dice/dice-hwdep.c @@ -62,7 +62,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, spin_lock_irq(&dice->lock); if (dice->dev_lock_changed || dice->notification_bits != 0) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&dice->lock); diff --git a/sound/firewire/digi00x/digi00x-hwdep.c b/sound/firewire/digi00x/digi00x-hwdep.c index a084c2a834db..426cd39e0233 100644 --- a/sound/firewire/digi00x/digi00x-hwdep.c +++ b/sound/firewire/digi00x/digi00x-hwdep.c @@ -70,7 +70,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, spin_lock_irq(&dg00x->lock); if (dg00x->dev_lock_changed || dg00x->msg) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&dg00x->lock); diff --git a/sound/firewire/fireface/ff-hwdep.c b/sound/firewire/fireface/ff-hwdep.c index 68e273fa5d23..336c0076ec42 100644 --- a/sound/firewire/fireface/ff-hwdep.c +++ b/sound/firewire/fireface/ff-hwdep.c @@ -62,7 +62,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, spin_lock_irq(&ff->lock); if (ff->dev_lock_changed) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&ff->lock); diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c index e0eff9328ee1..5cac26ab20b7 100644 --- a/sound/firewire/fireworks/fireworks_hwdep.c +++ b/sound/firewire/fireworks/fireworks_hwdep.c @@ -194,12 +194,12 @@ hwdep_poll(struct snd_hwdep *hwdep, struct file *file, poll_table *wait) spin_lock_irq(&efw->lock); if (efw->dev_lock_changed || efw->pull_ptr != efw->push_ptr) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&efw->lock); - return events | POLLOUT; + return events | EPOLLOUT; } static int diff --git a/sound/firewire/motu/motu-hwdep.c b/sound/firewire/motu/motu-hwdep.c index 7b6a086866e7..5f772eab588b 100644 --- a/sound/firewire/motu/motu-hwdep.c +++ b/sound/firewire/motu/motu-hwdep.c @@ -69,12 +69,12 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, spin_lock_irq(&motu->lock); if (motu->dev_lock_changed || motu->msg) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&motu->lock); - return events | POLLOUT; + return events | EPOLLOUT; } static int hwdep_get_info(struct snd_motu *motu, void __user *arg) diff --git a/sound/firewire/oxfw/oxfw-hwdep.c b/sound/firewire/oxfw/oxfw-hwdep.c index 6c1828aff672..50a1c03b42b9 100644 --- a/sound/firewire/oxfw/oxfw-hwdep.c +++ b/sound/firewire/oxfw/oxfw-hwdep.c @@ -62,7 +62,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, spin_lock_irq(&oxfw->lock); if (oxfw->dev_lock_changed) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&oxfw->lock); diff --git a/sound/firewire/tascam/tascam-hwdep.c b/sound/firewire/tascam/tascam-hwdep.c index 37b21647b471..4e4c1e9020e8 100644 --- a/sound/firewire/tascam/tascam-hwdep.c +++ b/sound/firewire/tascam/tascam-hwdep.c @@ -60,7 +60,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, spin_lock_irq(&tscm->lock); if (tscm->dev_lock_changed) - events = POLLIN | POLLRDNORM; + events = EPOLLIN | EPOLLRDNORM; else events = 0; spin_unlock_irq(&tscm->lock); diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 6b57f8aac1b7..8c0f8a9ee0ba 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c @@ -684,7 +684,7 @@ static __poll_t sq_poll(struct file *file, struct poll_table_struct *wait) poll_wait(file, &write_sq.action_queue, wait); if (file->f_mode & FMODE_WRITE) if (write_sq.count < write_sq.max_active || write_sq.block_size - write_sq.rear_size > 0) - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; return mask; } diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 05ccc7fdcc09..56537a156580 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -246,7 +246,7 @@ static __poll_t snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file, struct usb_mixer_interface *mixer = hw->private_data; poll_wait(file, &mixer->rc_waitq, wait); - return mixer->rc_code ? POLLIN | POLLRDNORM : 0; + return mixer->rc_code ? EPOLLIN | EPOLLRDNORM : 0; } static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer) diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index e2be10d17118..ebcab5c5465d 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c @@ -280,7 +280,7 @@ static __poll_t usb_stream_hwdep_poll(struct snd_hwdep *hw, poll_wait(file, &us122l->sk.sleep, wait); - mask = POLLIN | POLLOUT | POLLWRNORM | POLLERR; + mask = EPOLLIN | EPOLLOUT | EPOLLWRNORM | EPOLLERR; if (mutex_trylock(&us122l->mutex)) { struct usb_stream *s = us122l->sk.s; if (s && s->state == usb_stream_ready) { @@ -290,7 +290,7 @@ static __poll_t usb_stream_hwdep_poll(struct snd_hwdep *hw, polled = &us122l->second_periods_polled; if (*polled != s->periods_done) { *polled = s->periods_done; - mask = POLLIN | POLLOUT | POLLWRNORM; + mask = EPOLLIN | EPOLLOUT | EPOLLWRNORM; } else mask = 0; } diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c index 07d15bae75bc..d8bd7c99b48c 100644 --- a/sound/usb/usx2y/usX2Yhwdep.c +++ b/sound/usb/usx2y/usX2Yhwdep.c @@ -92,12 +92,12 @@ static __poll_t snd_us428ctls_poll(struct snd_hwdep *hw, struct file *file, poll struct usX2Ydev *us428 = hw->private_data; struct us428ctls_sharedmem *shm = us428->us428ctls_sharedmem; if (us428->chip_status & USX2Y_STAT_CHIP_HUP) - return POLLHUP; + return EPOLLHUP; poll_wait(file, &us428->us428ctls_wait_queue_head, wait); if (shm != NULL && shm->CtlSnapShotLast != shm->CtlSnapShotRed) - mask |= POLLIN; + mask |= EPOLLIN; return mask; } |