From owner-svn-src-head@freebsd.org Sat Jun 15 21:19:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAFF815D01B1; Sat, 15 Jun 2019 21:19:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31C4A8C7E6; Sat, 15 Jun 2019 21:19:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E72344CC5; Sat, 15 Jun 2019 21:19:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FLJNSo063364; Sat, 15 Jun 2019 21:19:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FLJNG0063363; Sat, 15 Jun 2019 21:19:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152119.x5FLJNG0063363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 21:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349082 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 31C4A8C7E6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 21:19:25 -0000 Author: ian Date: Sat Jun 15 21:19:23 2019 New Revision: 349082 URL: https://svnweb.freebsd.org/changeset/base/349082 Log: Spell unsigned int as u_int and channel as chan; eliminates the need to wrap some long lines. Modified: head/sys/dev/pwm/pwmbus.c Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:54:33 2019 (r349081) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:19:23 2019 (r349082) @@ -101,81 +101,81 @@ pwmbus_detach(device_t dev) } static int -pwmbus_channel_config(device_t bus, int channel, unsigned int period, unsigned int duty) +pwmbus_channel_config(device_t bus, int chan, u_int period, u_int duty) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_CONFIG(sc->dev, channel, period, duty)); + return (PWM_CHANNEL_CONFIG(sc->dev, chan, period, duty)); } static int -pwmbus_channel_get_config(device_t bus, int channel, unsigned int *period, unsigned int *duty) +pwmbus_channel_get_config(device_t bus, int chan, u_int *period, u_int *duty) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_GET_CONFIG(sc->dev, channel, period, duty)); + return (PWM_CHANNEL_GET_CONFIG(sc->dev, chan, period, duty)); } static int -pwmbus_channel_set_flags(device_t bus, int channel, uint32_t flags) +pwmbus_channel_set_flags(device_t bus, int chan, uint32_t flags) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_SET_FLAGS(sc->dev, channel, flags)); + return (PWM_CHANNEL_SET_FLAGS(sc->dev, chan, flags)); } static int -pwmbus_channel_get_flags(device_t bus, int channel, uint32_t *flags) +pwmbus_channel_get_flags(device_t bus, int chan, uint32_t *flags) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_GET_FLAGS(sc->dev, channel, flags)); + return (PWM_CHANNEL_GET_FLAGS(sc->dev, chan, flags)); } static int -pwmbus_channel_enable(device_t bus, int channel, bool enable) +pwmbus_channel_enable(device_t bus, int chan, bool enable) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_ENABLE(sc->dev, channel, enable)); + return (PWM_CHANNEL_ENABLE(sc->dev, chan, enable)); } static int -pwmbus_channel_is_enabled(device_t bus, int channel, bool *enable) +pwmbus_channel_is_enabled(device_t bus, int chan, bool *enable) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_IS_ENABLED(sc->dev, channel, enable)); + return (PWM_CHANNEL_IS_ENABLED(sc->dev, chan, enable)); } static device_method_t pwmbus_methods[] = {