From owner-svn-src-head@freebsd.org Sat Dec 21 02:44:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7F0C1EC773; Sat, 21 Dec 2019 02:44:01 +0000 (UTC) (envelope-from rlibby@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 47fqgj4VYcz3GQw; Sat, 21 Dec 2019 02:44:01 +0000 (UTC) (envelope-from rlibby@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 952BA8A5F; Sat, 21 Dec 2019 02:44:01 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBL2i1Ro088424; Sat, 21 Dec 2019 02:44:01 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBL2i1RF088422; Sat, 21 Dec 2019 02:44:01 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201912210244.xBL2i1RF088422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sat, 21 Dec 2019 02:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355972 - in head: sbin/camcontrol sys/sys X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head: sbin/camcontrol sys/sys X-SVN-Commit-Revision: 355972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 21 Dec 2019 02:44:01 -0000 Author: rlibby Date: Sat Dec 21 02:44:00 2019 New Revision: 355972 URL: https://svnweb.freebsd.org/changeset/base/355972 Log: Declare packed struct ata_params as 2-byte-aligned This avoids gcc9 warning about unaligned access to the structure when casting to uint16_t pointer type. Submitted by: imp Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22888 Modified: head/sbin/camcontrol/camcontrol.c head/sys/sys/ata.h Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sat Dec 21 02:43:49 2019 (r355971) +++ head/sbin/camcontrol/camcontrol.c Sat Dec 21 02:44:00 2019 (r355972) @@ -2355,7 +2355,7 @@ ataidentify(struct cam_device *device, int retry_count if (arglist & CAM_ARG_VERBOSE) { printf("%s%d: Raw identify data:\n", device->device_name, device->dev_unit_num); - dump_data((void*)ident_buf, sizeof(struct ata_params)); + dump_data((uint16_t *)ident_buf, sizeof(struct ata_params)); } if (ident_buf->support.command1 & ATA_SUPPORT_PROTECTED) { Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Sat Dec 21 02:43:49 2019 (r355971) +++ head/sys/sys/ata.h Sat Dec 21 02:44:00 2019 (r355972) @@ -311,7 +311,7 @@ struct ata_params { /*223*/ u_int16_t transport_minor; u_int16_t reserved224[31]; /*255*/ u_int16_t integrity; -} __packed; +} __packed __aligned(2); /* ATA Dataset Management */ #define ATA_DSM_BLK_SIZE 512