From: jsg Date: Thu, 6 Sep 2018 11:50:53 +0000 (+0000) Subject: fix whitespace X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c7617a357ac4aa3b319e70526e3f3c1c7a8fe30f;p=openbsd fix whitespace --- diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index 390e822e1fe..71f0afc89e8 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.85 2018/04/20 07:27:54 mlarkin Exp $ */ +/* $OpenBSD: pmap.c,v 1.86 2018/09/06 11:50:53 jsg Exp $ */ /* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */ /*- @@ -3540,7 +3540,7 @@ pmap_tlb_shootdown(pmap_t pmap, vaddr_t va, pt_entry_t pte, u_long *cpumaskp) * the IPI, that's okay, because it does the right * thing with it later. */ - if (pmap != pmap_kernel() && + if (pmap != pmap_kernel() && PMAP_ISACTIVE(pmap, ci->ci_cpuid) == 0) { PMAP_INVALIDATE_ASN(pmap, ci->ci_cpuid); continue; diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c index 231951c7262..5f0f9898cf0 100644 --- a/sys/arch/arm/arm/bus_dma.c +++ b/sys/arch/arm/arm/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.38 2018/01/11 15:49:34 visa Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.39 2018/09/06 11:50:54 jsg Exp $ */ /* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */ /*- @@ -258,8 +258,8 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0, for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len == 0) continue; - error = _bus_dmamap_load_buffer(t, map, m->m_data, m->m_len, - NULL, flags, &lastaddr, &seg, first); + error = _bus_dmamap_load_buffer(t, map, m->m_data, m->m_len, + NULL, flags, &lastaddr, &seg, first); first = 0; } if (error == 0) { diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index 2126d709af6..7baddd2f145 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.97 2018/08/10 16:41:35 jsing Exp $ */ +/* $OpenBSD: biosdev.c,v 1.98 2018/09/06 11:50:54 jsg Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -439,7 +439,7 @@ bios_getdisklabel(bios_diskinfo_t *bd, struct disklabel *label) if (start == (u_int)-1) { if (err != NULL) return (err); - return "no OpenBSD partition\n"; + return "no OpenBSD partition\n"; } } diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c index a9525d809de..01395b6fb94 100644 --- a/sys/dev/usb/if_athn_usb.c +++ b/sys/dev/usb/if_athn_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_usb.c,v 1.50 2018/02/05 09:52:03 stsp Exp $ */ +/* $OpenBSD: if_athn_usb.c,v 1.51 2018/09/06 11:50:54 jsg Exp $ */ /*- * Copyright (c) 2011 Damien Bergamini @@ -1144,7 +1144,7 @@ athn_usb_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, void athn_usb_newassoc_cb(struct athn_usb_softc *usc, void *arg) { - struct ieee80211com *ic = &usc->sc_sc.sc_ic; + struct ieee80211com *ic = &usc->sc_sc.sc_ic; struct ieee80211_node *ni = *(void **)arg; struct athn_node *an = (struct athn_node *)ni; int s; @@ -1152,7 +1152,7 @@ athn_usb_newassoc_cb(struct athn_usb_softc *usc, void *arg) if (ic->ic_state != IEEE80211_S_RUN) return; - s = splnet(); + s = splnet(); /* NB: Node may have left before we got scheduled. */ if (an->sta_index != 0) (void)athn_usb_node_set_rates(usc, ni); diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 64937306f00..c57e8ca9a4f 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.142 2018/08/05 14:23:57 beck Exp $ */ +/* $OpenBSD: tty.c,v 1.143 2018/09/06 11:50:54 jsg Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -1610,10 +1610,10 @@ read: /* * Give user character. */ - error = ureadc(c, uio); + error = ureadc(c, uio); if (error) break; - if (uio->uio_resid == 0) + if (uio->uio_resid == 0) break; /* * In canonical mode check for a "break character" diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 718576bf336..b35195b99c0 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.143 2018/09/01 08:20:56 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.144 2018/09/06 11:50:54 jsg Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -2250,7 +2250,7 @@ ieee80211_count_pssta(void *arg, struct ieee80211_node *ni) if (ni->ni_associd == 0 || ni->ni_state == IEEE80211_STA_COLLECT) return; - if (ni->ni_pwrsave == IEEE80211_PS_DOZE) + if (ni->ni_pwrsave == IEEE80211_PS_DOZE) (*pssta)++; } diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index ba9d53f3fd3..f91f6a792b2 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.84 2018/06/21 14:17:23 visa Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.85 2018/09/06 11:50:54 jsg Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -594,15 +594,15 @@ abortit: goto abortit; } if ((ip->i_e2fs_mode & IFMT) == IFDIR) { - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc); - if (!error && tvp) - error = VOP_ACCESS(tvp, VWRITE, tcnp->cn_cred, + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc); + if (!error && tvp) + error = VOP_ACCESS(tvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc); - if (error) { - VOP_UNLOCK(fvp); - error = EACCES; - goto abortit; - } + if (error) { + VOP_UNLOCK(fvp); + error = EACCES; + goto abortit; + } /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ @@ -758,7 +758,7 @@ abortit: * decrement the link count on the parent * of the target directory. */ - if (doingdirectory && !newparent) { + if (doingdirectory && !newparent) { dp->i_e2fs_nlink--; dp->i_flag |= IN_CHANGE; } @@ -966,11 +966,11 @@ ext2fs_mkdir(void *v) panic("ext2fs_mkdir: blksize"); /* XXX should grow with balloc() */ else { error = ext2fs_setsize(ip, VTOI(dvp)->i_e2fs->e2fs_bsize); - if (error) { - dp->i_e2fs_nlink--; - dp->i_flag |= IN_CHANGE; - goto bad; - } + if (error) { + dp->i_e2fs_nlink--; + dp->i_flag |= IN_CHANGE; + goto bad; + } ip->i_flag |= IN_CHANGE; } diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 8d8e0caf939..448edb5a3f2 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_lookup.c,v 1.52 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: ufs_lookup.c,v 1.53 2018/09/06 11:50:54 jsg Exp $ */ /* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */ /* @@ -696,20 +696,20 @@ int ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, struct componentname *cnp, struct buf *newdirbp) { - struct ucred *cr; - struct proc *p; - int newentrysize; - struct inode *dp; - struct buf *bp; - u_int dsize; - struct direct *ep, *nep; + struct ucred *cr; + struct proc *p; + int newentrysize; + struct inode *dp; + struct buf *bp; + u_int dsize; + struct direct *ep, *nep; int error, ret, blkoff, loc, spacefree, flags; - char *dirbuf; + char *dirbuf; - error = 0; - cr = cnp->cn_cred; - p = cnp->cn_proc; - dp = VTOI(dvp); + error = 0; + cr = cnp->cn_cred; + p = cnp->cn_proc; + dp = VTOI(dvp); newentrysize = DIRSIZ(OFSFMT(dp), dirp); if (dp->i_count == 0) { @@ -717,9 +717,9 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, * If dp->i_count is 0, then namei could find no * space in the directory. Here, dp->i_offset will * be on a directory block boundary and we will write the - * new entry into a fresh block. - */ - if (dp->i_offset & (DIRBLKSIZ - 1)) + * new entry into a fresh block. + */ + if (dp->i_offset & (DIRBLKSIZ - 1)) panic("ufs_direnter: newblk"); flags = B_CLRBUF; if (!DOINGSOFTDEP(dvp)) @@ -733,7 +733,7 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, DIP_ASSIGN(dp, size, dp->i_offset + DIRBLKSIZ); dp->i_flag |= IN_CHANGE | IN_UPDATE; uvm_vnp_setsize(dvp, DIP(dp, size)); - dirp->d_reclen = DIRBLKSIZ; + dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & (VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1); memcpy(bp->b_data + blkoff, dirp, newentrysize); @@ -785,22 +785,22 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, return (error); } error = VOP_BWRITE(bp); - ret = UFS_UPDATE(dp, !DOINGSOFTDEP(dvp)); - if (error == 0) - return (ret); - return (error); - } - - /* + ret = UFS_UPDATE(dp, !DOINGSOFTDEP(dvp)); + if (error == 0) + return (ret); + return (error); + } + + /* * If dp->i_count is non-zero, then namei found space for the new * entry in the range dp->i_offset to dp->i_offset + dp->i_count * in the directory. To use this space, we may have to compact * the entries located there, by copying them together towards the * beginning of the block, leaving the free space in one usable * chunk at the end. - */ - - /* + */ + + /* * Increase size of directory if entry eats into new space. * This should never push the size past a new multiple of * DIRBLKSIZE. @@ -812,12 +812,12 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, /* * Get the block containing the space for the new directory entry. */ - if ((error = UFS_BUFATOFF(dp, (off_t)dp->i_offset, &dirbuf, &bp)) + if ((error = UFS_BUFATOFF(dp, (off_t)dp->i_offset, &dirbuf, &bp)) != 0) { - if (DOINGSOFTDEP(dvp) && newdirbp != NULL) - bdwrite(newdirbp); - return (error); - } + if (DOINGSOFTDEP(dvp) && newdirbp != NULL) + bdwrite(newdirbp); + return (error); + } /* * Find space for the new entry. In the simple case, the entry at * offset base will have the space. If it does not, then namei @@ -858,11 +858,11 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, dp->i_offset + ((char *)nep - dirbuf), dp->i_offset + ((char *)ep - dirbuf)); #endif - if (DOINGSOFTDEP(dvp)) - softdep_change_directoryentry_offset(dp, dirbuf, - (caddr_t)nep, (caddr_t)ep, dsize); - else - memmove(ep, nep, dsize); + if (DOINGSOFTDEP(dvp)) + softdep_change_directoryentry_offset(dp, dirbuf, + (caddr_t)nep, (caddr_t)ep, dsize); + else + memmove(ep, nep, dsize); } /* * Here, `ep' points to a directory entry containing `dsize' in-use @@ -898,23 +898,23 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, dp->i_offset & ~(DIRBLKSIZ - 1)); #endif - if (DOINGSOFTDEP(dvp)) { - (void)softdep_setup_directory_add(bp, dp, - dp->i_offset + (caddr_t)ep - dirbuf, + if (DOINGSOFTDEP(dvp)) { + (void)softdep_setup_directory_add(bp, dp, + dp->i_offset + (caddr_t)ep - dirbuf, dirp->d_ino, newdirbp, 0); - bdwrite(bp); - } else { - error = VOP_BWRITE(bp); - } + bdwrite(bp); + } else { + error = VOP_BWRITE(bp); + } dp->i_flag |= IN_CHANGE | IN_UPDATE; - /* - * If all went well, and the directory can be shortened, proceed - * with the truncation. Note that we have to unlock the inode for - * the entry that we just entered, as the truncation may need to - * lock other inodes which can lead to deadlock if we also hold a - * lock on the newly entered node. - */ + /* + * If all went well, and the directory can be shortened, proceed + * with the truncation. Note that we have to unlock the inode for + * the entry that we just entered, as the truncation may need to + * lock other inodes which can lead to deadlock if we also hold a + * lock on the newly entered node. + */ if (error == 0 && dp->i_endoff && dp->i_endoff < DIP(dp, size)) { if (tvp != NULL) @@ -971,10 +971,10 @@ ufs_dirremove(struct vnode *dvp, struct inode *ip, int flags, int isrmdir) */ ep->d_ino = 0; } else { - /* - * Collapse new free space into previous entry. - */ - ep->d_reclen += dp->i_reclen; + /* + * Collapse new free space into previous entry. + */ + ep->d_reclen += dp->i_reclen; } #ifdef UFS_DIRHASH if (dp->i_dirhash != NULL) @@ -982,7 +982,7 @@ ufs_dirremove(struct vnode *dvp, struct inode *ip, int flags, int isrmdir) ((dp->i_offset - dp->i_count) & (DIRBLKSIZ - 1)), dp->i_offset & ~(DIRBLKSIZ - 1)); #endif - if (DOINGSOFTDEP(dvp)) { + if (DOINGSOFTDEP(dvp)) { if (ip) { ip->i_effnlink--; softdep_change_linkcnt(ip, 0); @@ -1029,13 +1029,13 @@ ufs_dirrewrite(struct inode *dp, struct inode *oip, ufsino_t newinum, return (error); ep->d_ino = newinum; if (!OFSFMT(dp)) - ep->d_type = newtype; - oip->i_effnlink--; - if (DOINGSOFTDEP(vdp)) { + ep->d_type = newtype; + oip->i_effnlink--; + if (DOINGSOFTDEP(vdp)) { softdep_change_linkcnt(oip, 0); - softdep_setup_directory_change(bp, dp, oip, newinum, isrmdir); - bdwrite(bp); - } else { + softdep_setup_directory_change(bp, dp, oip, newinum, isrmdir); + bdwrite(bp); + } else { DIP_ADD(oip, nlink, -1); oip->i_flag |= IN_CHANGE; if (DOINGASYNC(vdp)) { @@ -1044,7 +1044,7 @@ ufs_dirrewrite(struct inode *dp, struct inode *oip, ufsino_t newinum, } else { error = VOP_BWRITE(bp); } - } + } dp->i_flag |= IN_CHANGE | IN_UPDATE; return (error); }