Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1255884pxb; Thu, 4 Feb 2021 08:30:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWKbHTXR+9UsJAG0n7mnh9ihB6PxdFkuZEf576VkC3l03CzWYX0lrDuxKtB6xecHO/gINi X-Received: by 2002:a05:6402:4316:: with SMTP id m22mr8657436edc.64.1612456252950; Thu, 04 Feb 2021 08:30:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612456252; cv=none; d=google.com; s=arc-20160816; b=IZOJGiMUPRgbLgaxZ2ItG+Up/p+sHZqVF/n+UobE2MVhbFixVx4S1Rc/ATWyh1aHrA nQLDN8UVZRYd1NCpUKaupteH4vfxMybho0loFLzEkN5nfg02WlVKAezEfFIzugIFdSWL QuWU4oa9dFsDeIWI6HC7CEL4iGazirbSPe1Pt0b/ZRbPqajnSgapto6mw0idk+46SJMj XStr8u6Gmfnqk5qJhQB2vOUp4x6a54KjJioq+i+KZuFWkn5l/BEO16Dls79+ix40+c3I sTLl9Dhh6dADBCnwZvTrIkdgb+C5ZNBF9jgt8H6XmvONvvareANX6EiR4+lBXRUyzwhD /xvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ryo7af0xG2nXs125ExFQhkhEC58/t7Dg8z9EewH20aY=; b=GJlYiiyiMzg842e0PSaSaj77fkycPxB3QIdctaTn7svehasLBDh1G0FoY3JQNOuQ4p r9gtNR9VtL01XdnG/6x3JofdpUq02khVKK8qIAWCnJZMlXig7ipzjpQgta6la6083Erg 5Rm5IxE0GRETYuVyCnRFfZQ4JHkPY7p2uWYcYCzFaOimnjZzazi2R1mZ8cwTTfufYQNV b4FdN+/x8dPrjZhgoCJxsKeH45JL8kxXr5d1dupkpWkJFvk1MAHRuxzthcMXF4ZkqAac I5j209ZNLkhhjq3OTQDtZhkL8vK4wmV3tNI/VpnfNRYtz1uF75p53D7wbHx4MoytlapG apqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fp0BwtP4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si3362224ejy.280.2021.02.04.08.30.28; Thu, 04 Feb 2021 08:30:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fp0BwtP4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237994AbhBDQ1T (ORCPT + 99 others); Thu, 4 Feb 2021 11:27:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:45622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236785AbhBDQ1K (ORCPT ); Thu, 4 Feb 2021 11:27:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED21B64E4A; Thu, 4 Feb 2021 16:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612455989; bh=PL83UvtavwBPJYlyOtXD6stjJhbK1zHAoMjjJE2KfAE=; h=From:To:Cc:Subject:Date:From; b=fp0BwtP4I+L8etUrHcKT92Oqnxp6B25DLDnCzfuzN3MXxi+HtE1mDtiMikxBzktmN WUPjY8tfD0XLaKpKlJ9QiIQm8NZyRHzT5704uFmpn3bx7vnpaDmz5j/EH7wK2CRl0v 6CohskJ8EUqYpBamGPTouHPDPBQJFx3SKY4EUy4VYkh5RaMEGtj611p4D2h/ITUhY6 IB5j41iI5djK4isGf7zhQw1WqYVBXquGFQABj60pRpZeGd2MNQzFm1jYy7D44EoftW PpI2oyXOeyh9DBNwtyq56Dc8XDLG6JJvC774YKymFNuUPGm7/kM0nFj6yRiRbRYcGc O6e8Ql3OPff5g== From: Arnd Bergmann To: Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Vincent Mailhol , Oliver Hartkopp , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] can: ucan: fix alignment constraints Date: Thu, 4 Feb 2021 17:26:13 +0100 Message-Id: <20210204162625.3099392-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann struct ucan_message_in contains member with 4-byte alignment but is itself marked as unaligned, which triggers a warning: drivers/net/can/usb/ucan.c:249:1: warning: alignment 1 of 'struct ucan_message_in' is less than 4 [-Wpacked-not-aligned] Mark the outer structure to have the same alignment as the inner one. Signed-off-by: Arnd Bergmann --- drivers/net/can/usb/ucan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c index fa403c080871..536c985dad21 100644 --- a/drivers/net/can/usb/ucan.c +++ b/drivers/net/can/usb/ucan.c @@ -246,7 +246,7 @@ struct ucan_message_in { */ struct ucan_tx_complete_entry_t can_tx_complete_msg[0]; } __aligned(0x4) msg; -} __packed; +} __packed __aligned(0x4); /* Macros to calculate message lengths */ #define UCAN_OUT_HDR_SIZE offsetof(struct ucan_message_out, msg) -- 2.29.2