From nobody Wed Mar 22 22:28:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Phjmc10tmz41P6P; Wed, 22 Mar 2023 22:28:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Phjmc077xz3hpr; Wed, 22 Mar 2023 22:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679524112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UuRuQxC7MkcKxQOqVv5FQ2qSyosSZCyBFLVze6Pr/ig=; b=AeP/cTdFlPBz/8A0Tv9ZdSEHWWdpb7mvuIMCPaDIqRGukA6/e0Zn+a/SHJJRBoNPcLDaIj Raj4zJyMCIrRg+9LOQSq6uufTNyTXXTJtEd3QcT6ml59zj5u5zddU8mDSlOhmYJbQYaWZd 22aii04ah5P1Ku7P3JwsTSBhfl6/ApqwC6p7l/TvRHbrHifxxmoVC1mI2rK9RgKnwPmV8+ 4+fUKFTsMsjeZtSyN2+o8WAc0NSnN7CIOAV56peXP4daMzTyS8MSjFWZoIGGN+ORzF7H8D jDBF31W350j9fHzLFBM0xIHchAMFK/d+wmfgg/N7ZUrp7hFFwpU8hfEmtBFhaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679524112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UuRuQxC7MkcKxQOqVv5FQ2qSyosSZCyBFLVze6Pr/ig=; b=COgsyJU6XctpXBSXrXJmVUySPMLH5pj4uwPPA5pzpmVxYXdowRk4F8HaqaNt+GMl+nUULO F0EYLt/yBNRCLRLoCgmczFj+6x+dxdCcHEPEVUloAvCP2ZGRkF3oYa02Swio9fCO7/cODx RQtSde1LVaFOtkHA4IBB/9zTRKJMbYotnuRIogzM1uEbZ7wX8PUhBC0OMYcqFaNr2vNtvd oh4KiDab+nMc6yKvffhrmii0/sEdr+rvbMPhzlilgUwROVnEvBuH0V04D1GR+Sb6ukj2MI GSRx+ZCZ7ZbTXdeSE2MOljeR84P9lBmJoXjDL18WTp7q5gItGrfji826mVghPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679524112; a=rsa-sha256; cv=none; b=tTVsLm2JE+M1A5G7DL2zvFYeg7PKn5Qnp0Gt96lzQq5Pwgbud5Oj/mRGpCUy8aKSbPastT VBFcmOmFQZJtEw+FCE6nEFYKALZmXoXvPdyf/AVcNS/wnYhRAmpZDFxj7KH5bHWzqdzvBX 8zZblBB42Y8bmo8Sk+gxPdZsVnqrShCegWXD2o059wZT5PQBOO2UEONs9YvhyzYSdCc+cv zMO6/RRarsp3LEmGL2n3T7RY8AZ4LWJAqB4uNxg8Hk1OAcFZlLoLCXuxfP/f3kDOy5Q0fh 8zzDC3cieI4KimSp0xw1+HAc+AMWGef1veLzuKzSuisr+/daUup1WsVdg0m2Rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Phjmb6L8Yz1BLV; Wed, 22 Mar 2023 22:28:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32MMSV2o001701; Wed, 22 Mar 2023 22:28:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32MMSVCA001700; Wed, 22 Mar 2023 22:28:31 GMT (envelope-from git) Date: Wed, 22 Mar 2023 22:28:31 GMT Message-Id: <202303222228.32MMSVCA001700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: df3d0c0d0d04 - stable/12 - Declare packed struct ata_params as 2-byte-aligned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: df3d0c0d0d0440e5fdc3b8fe0696269ca01f6476 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=df3d0c0d0d0440e5fdc3b8fe0696269ca01f6476 commit df3d0c0d0d0440e5fdc3b8fe0696269ca01f6476 Author: Ryan Libby AuthorDate: 2019-12-21 02:44:00 +0000 Commit: John Baldwin CommitDate: 2023-03-22 15:12:16 +0000 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 (cherry picked from commit 36947e1f4deacec2a88bba226e9b46efebe8655e) --- sbin/camcontrol/camcontrol.c | 2 +- sys/sys/ata.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index a91aa4779822..63749da3ae1c 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -2374,7 +2374,7 @@ ataidentify(struct cam_device *device, int retry_count, int timeout) 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) { diff --git a/sys/sys/ata.h b/sys/sys/ata.h index 6aa1695e564f..0187efaacc54 100644 --- a/sys/sys/ata.h +++ b/sys/sys/ata.h @@ -313,7 +313,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