Remove unused variable(s).
Found by: FlexeLint
This commit is contained in:
parent
d1043f6d6a
commit
670966596b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115549
@ -40,7 +40,6 @@
|
||||
#include <dev/syscons/syscons.h>
|
||||
|
||||
static u_char palette[256*3];
|
||||
static int blanked;
|
||||
|
||||
static int
|
||||
fade_saver(video_adapter_t *adp, int blank)
|
||||
@ -50,7 +49,6 @@ fade_saver(video_adapter_t *adp, int blank)
|
||||
int i;
|
||||
|
||||
if (blank) {
|
||||
blanked = TRUE;
|
||||
if (ISPALAVAIL(adp->va_flags)) {
|
||||
if (count <= 0)
|
||||
save_palette(adp, palette);
|
||||
@ -77,7 +75,6 @@ fade_saver(video_adapter_t *adp, int blank)
|
||||
(*vidsw[adp->va_index]->blank_display)(adp,
|
||||
V_DISPLAY_ON);
|
||||
}
|
||||
blanked = FALSE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -88,7 +85,6 @@ fade_init(video_adapter_t *adp)
|
||||
if (!ISPALAVAIL(adp->va_flags)
|
||||
&& (*vidsw[adp->va_index]->blank_display)(adp, V_DISPLAY_ON) != 0)
|
||||
return ENODEV;
|
||||
blanked = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -923,17 +923,11 @@ msdosfs_rename(ap)
|
||||
u_long cn;
|
||||
daddr_t bn;
|
||||
struct denode *fddep; /* from file's parent directory */
|
||||
struct denode *fdep; /* from file or directory */
|
||||
struct denode *tddep; /* to file's parent directory */
|
||||
struct denode *tdep; /* to file or directory */
|
||||
struct msdosfsmount *pmp;
|
||||
struct direntry *dotdotp;
|
||||
struct buf *bp;
|
||||
|
||||
fddep = VTODE(ap->a_fdvp);
|
||||
fdep = VTODE(ap->a_fvp);
|
||||
tddep = VTODE(ap->a_tdvp);
|
||||
tdep = tvp ? VTODE(tvp) : NULL;
|
||||
pmp = fddep->de_pmp;
|
||||
|
||||
pmp = VFSTOMSDOSFS(fdvp->v_mount);
|
||||
|
@ -768,14 +768,11 @@ sendrawgpibfifo(unsigned char device, char *data, int count)
|
||||
{
|
||||
int status;
|
||||
int counter;
|
||||
int fifopos;
|
||||
int sleeptime;
|
||||
|
||||
sleeptime = SLEEP_MIN;
|
||||
counter = 0;
|
||||
|
||||
fifopos = 0;
|
||||
|
||||
status = EWOULDBLOCK;
|
||||
do {
|
||||
/* Wait for fifo to become not full if it is full */
|
||||
@ -810,7 +807,6 @@ sendgpibfifo(unsigned char device, char *data, int count)
|
||||
{
|
||||
int status;
|
||||
int counter;
|
||||
int fifopos;
|
||||
int sleeptime;
|
||||
|
||||
outb(IMR2, 0x30); /* we have to enable DMA (0x30) for turbo488 to work */
|
||||
@ -835,13 +831,10 @@ sendgpibfifo(unsigned char device, char *data, int count)
|
||||
} while (!(inb(ISR2) & 8) && status == EWOULDBLOCK);
|
||||
|
||||
outb(AUXMR, gts); /* Set to Standby (Controller) */
|
||||
fifopos = 0;
|
||||
|
||||
sleeptime = SLEEP_MIN;
|
||||
counter = 0;
|
||||
|
||||
fifopos = 0;
|
||||
|
||||
outb(CMDR, 0x20);
|
||||
outb(CFG, 0x47); /* 16 bit, write, fifo B first, TMOE TIM */
|
||||
outb(CMDR, 0x10); /* RESET fifos */
|
||||
@ -956,7 +949,6 @@ readgpibfifo(unsigned char device, char *data, int count)
|
||||
int status2 = 0;
|
||||
int status1;
|
||||
int counter;
|
||||
int fifopos;
|
||||
unsigned inword;
|
||||
|
||||
outb(IMR2, 0x30); /* we have to enable DMA (0x30) for turbo488 to work */
|
||||
@ -991,7 +983,6 @@ readgpibfifo(unsigned char device, char *data, int count)
|
||||
outb(AUXMR, gts); /* Set to Standby (Controller) */
|
||||
|
||||
counter = 0;
|
||||
fifopos = 0;
|
||||
|
||||
outb(CMDR, 0x04); /* Tell TURBO488 to GO */
|
||||
|
||||
|
@ -93,7 +93,6 @@ static int
|
||||
isavga_probe(device_t dev)
|
||||
{
|
||||
video_adapter_t adp;
|
||||
device_t bus;
|
||||
int error;
|
||||
|
||||
/* No pnp support */
|
||||
@ -103,7 +102,6 @@ isavga_probe(device_t dev)
|
||||
device_set_desc(dev, "Generic ISA VGA");
|
||||
error = vga_probe_unit(device_get_unit(dev), &adp, device_get_flags(dev));
|
||||
if (error == 0) {
|
||||
bus = device_get_parent(dev);
|
||||
bus_set_resource(dev, SYS_RES_IOPORT, 0,
|
||||
adp.va_io_base, adp.va_io_size);
|
||||
bus_set_resource(dev, SYS_RES_MEMORY, 0,
|
||||
@ -122,8 +120,6 @@ static int
|
||||
isavga_attach(device_t dev)
|
||||
{
|
||||
vga_softc_t *sc;
|
||||
struct resource *port;
|
||||
struct resource *mem;
|
||||
int unit;
|
||||
int rid;
|
||||
int error;
|
||||
@ -132,10 +128,10 @@ isavga_attach(device_t dev)
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
rid = 0;
|
||||
port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
|
||||
bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
|
||||
0, ~0, 0, RF_ACTIVE | RF_SHAREABLE);
|
||||
rid = 0;
|
||||
mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
|
||||
bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
|
||||
0, ~0, 0, RF_ACTIVE | RF_SHAREABLE);
|
||||
|
||||
error = vga_attach_unit(unit, sc, device_get_flags(dev));
|
||||
|
@ -215,12 +215,10 @@ ithread_destroy(struct ithd *ithread)
|
||||
{
|
||||
|
||||
struct thread *td;
|
||||
struct proc *p;
|
||||
if (ithread == NULL)
|
||||
return (EINVAL);
|
||||
|
||||
td = ithread->it_td;
|
||||
p = td->td_proc;
|
||||
mtx_lock(&ithread->it_lock);
|
||||
if (!TAILQ_EMPTY(&ithread->it_handlers)) {
|
||||
mtx_unlock(&ithread->it_lock);
|
||||
|
@ -1907,11 +1907,9 @@ thread_suspend_check(int return_instead)
|
||||
{
|
||||
struct thread *td;
|
||||
struct proc *p;
|
||||
struct ksegrp *kg;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
kg = td->td_ksegrp;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
while (P_SHOULDSTOP(p)) {
|
||||
if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) {
|
||||
|
@ -1907,11 +1907,9 @@ thread_suspend_check(int return_instead)
|
||||
{
|
||||
struct thread *td;
|
||||
struct proc *p;
|
||||
struct ksegrp *kg;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
kg = td->td_ksegrp;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
while (P_SHOULDSTOP(p)) {
|
||||
if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) {
|
||||
|
@ -475,9 +475,7 @@ rman_await_resource(struct resource *r, int pri, int timo)
|
||||
static int
|
||||
int_rman_deactivate_resource(struct resource *r)
|
||||
{
|
||||
struct rman *rm;
|
||||
|
||||
rm = r->r_rm;
|
||||
r->r_flags &= ~RF_ACTIVE;
|
||||
if (r->r_flags & RF_WANTED) {
|
||||
r->r_flags &= ~RF_WANTED;
|
||||
|
@ -659,7 +659,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
||||
struct vnode *vp;
|
||||
struct vattr vat;
|
||||
struct mount *mp;
|
||||
int cmode, oflags;
|
||||
int cmode;
|
||||
struct file *nfp;
|
||||
int type, indx, error;
|
||||
struct flock lf;
|
||||
@ -667,7 +667,6 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
||||
|
||||
if ((flags & O_ACCMODE) == O_ACCMODE)
|
||||
return (EINVAL);
|
||||
oflags = flags;
|
||||
flags = FFLAGS(flags);
|
||||
error = falloc(td, &nfp, &indx);
|
||||
if (error)
|
||||
@ -2171,12 +2170,10 @@ fchmod(td, uap)
|
||||
} */ *uap;
|
||||
{
|
||||
struct file *fp;
|
||||
struct vnode *vp;
|
||||
int error;
|
||||
|
||||
if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
|
||||
return (error);
|
||||
vp = fp->f_data;
|
||||
error = setfmode(td, fp->f_data, uap->mode);
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
@ -2315,12 +2312,10 @@ fchown(td, uap)
|
||||
} */ *uap;
|
||||
{
|
||||
struct file *fp;
|
||||
struct vnode *vp;
|
||||
int error;
|
||||
|
||||
if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
|
||||
return (error);
|
||||
vp = fp->f_data;
|
||||
error = setfown(td, fp->f_data, uap->uid, uap->gid);
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
|
@ -659,7 +659,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
||||
struct vnode *vp;
|
||||
struct vattr vat;
|
||||
struct mount *mp;
|
||||
int cmode, oflags;
|
||||
int cmode;
|
||||
struct file *nfp;
|
||||
int type, indx, error;
|
||||
struct flock lf;
|
||||
@ -667,7 +667,6 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
||||
|
||||
if ((flags & O_ACCMODE) == O_ACCMODE)
|
||||
return (EINVAL);
|
||||
oflags = flags;
|
||||
flags = FFLAGS(flags);
|
||||
error = falloc(td, &nfp, &indx);
|
||||
if (error)
|
||||
@ -2171,12 +2170,10 @@ fchmod(td, uap)
|
||||
} */ *uap;
|
||||
{
|
||||
struct file *fp;
|
||||
struct vnode *vp;
|
||||
int error;
|
||||
|
||||
if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
|
||||
return (error);
|
||||
vp = fp->f_data;
|
||||
error = setfmode(td, fp->f_data, uap->mode);
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
@ -2315,12 +2312,10 @@ fchown(td, uap)
|
||||
} */ *uap;
|
||||
{
|
||||
struct file *fp;
|
||||
struct vnode *vp;
|
||||
int error;
|
||||
|
||||
if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
|
||||
return (error);
|
||||
vp = fp->f_data;
|
||||
error = setfown(td, fp->f_data, uap->uid, uap->gid);
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user