From owner-svn-src-stable@freebsd.org Wed Sep 7 19:21:54 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44321BCFFD1; Wed, 7 Sep 2016 19:21:54 +0000 (UTC) (envelope-from dim@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 mx1.freebsd.org (Postfix) with ESMTPS id EB499C54; Wed, 7 Sep 2016 19:21:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u87JLrdr036707; Wed, 7 Sep 2016 19:21:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u87JLrbK036706; Wed, 7 Sep 2016 19:21:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609071921.u87JLrbK036706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 7 Sep 2016 19:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r305557 - in stable: 10/sys/dev/usb/serial 11/sys/dev/usb/serial 9/sys/dev/usb/serial X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 19:21:54 -0000 Author: dim Date: Wed Sep 7 19:21:52 2016 New Revision: 305557 URL: https://svnweb.freebsd.org/changeset/base/305557 Log: MFC r305388: With clang 3.9.0, compiling uplcom results in the following warnings: sys/dev/usb/serial/uplcom.c:543:29: error: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 192 to -64 [-Werror,-Wconstant-conversion] if (uplcom_pl2303_do(udev, UT_READ_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x8484, 0, 1) ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~ sys/dev/usb/usb.h:179:53: note: expanded from macro 'UT_READ_VENDOR_DEVICE' #define UT_READ_VENDOR_DEVICE (UT_READ | UT_VENDOR | UT_DEVICE) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ This is because UT_READ is 0x80, so the int8_t argument is wrapped to a negative value. Fix this by using uint8_t instead. Reviewed by: imp, hselasky Differential Revision: https://reviews.freebsd.org/D7776 Modified: stable/11/sys/dev/usb/serial/uplcom.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/usb/serial/uplcom.c stable/9/sys/dev/usb/serial/uplcom.c Directory Properties: stable/10/ (props changed) stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/11/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uplcom.c Wed Sep 7 19:17:03 2016 (r305556) +++ stable/11/sys/dev/usb/serial/uplcom.c Wed Sep 7 19:21:52 2016 (r305557) @@ -166,7 +166,7 @@ struct uplcom_softc { /* prototypes */ static usb_error_t uplcom_reset(struct uplcom_softc *, struct usb_device *); -static usb_error_t uplcom_pl2303_do(struct usb_device *, int8_t, uint8_t, +static usb_error_t uplcom_pl2303_do(struct usb_device *, uint8_t, uint8_t, uint16_t, uint16_t, uint16_t); static int uplcom_pl2303_init(struct usb_device *, uint8_t); static void uplcom_free(struct ucom_softc *); @@ -514,7 +514,7 @@ uplcom_reset(struct uplcom_softc *sc, st } static usb_error_t -uplcom_pl2303_do(struct usb_device *udev, int8_t req_type, uint8_t request, +uplcom_pl2303_do(struct usb_device *udev, uint8_t req_type, uint8_t request, uint16_t value, uint16_t index, uint16_t length) { struct usb_device_request req;