From patchwork Thu Feb 4 16:26:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 376291 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1432454jah; Thu, 4 Feb 2021 08:28:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxardq/837zoGNDXf2fzCCsS0Dd6sn59vUe3Evm4d11fFftX9yZR/X+gg2ixHQXIYWeBqVK X-Received: by 2002:a05:6402:1013:: with SMTP id c19mr8637638edu.298.1612456112223; Thu, 04 Feb 2021 08:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612456112; cv=none; d=google.com; s=arc-20160816; b=PQ7D1BR+uiNsonrn9bDDZo4/trPVU5UFwbpf0syLorWhRAgMteY5QqPkhu0VWmzU/X E/V77aOmrxtlRD6H/9onIYMCPLBNsjTh7lBlvT+5/Fw3/dFLVt6VccX0Y//bAjwSENOy oXJnK1jz9QYIViVCCZAfN2C7cF3BRz+/XPjfMxpn0mW2v1ysgCxWzNMABDm75U8JOKJr +KJyt12AOeiKa4FNqjxL2yYJJFffc9UBh/8agmTWKfN+Dd2vbJWE6Q5Yn4dS69/C+bOw n2liX+WfpIDY8E3a20/rkPNIG7Yj9hw7FmyrvkULW0dTiYvwwbJBBsr4/OlsgdLeUH3p W79A== 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=TZ88ZEz9UpVw0ld1MSnf+UN1HR5fhD2n/rLhIp/7pQbn3DP9giFnQKtzai4rKdq6b+ aJsdaBl2mrXF54fV7EaEwgo6S7eQxSrkP6BftS5vq7fXZ5QU7p30ouj7uwl8Kb9M4XWz rfx3rdiG8KuRY6GEGNa7yNKBYfumQZUFSRkXTbqBEPVWkax7loTdZAA2cxttoBtgBk9Y 3va4WEh2QyWiju3PP2WznIjQ6/Sa974OIrtX4DUEuzy9Do/D+Ju7L3VB2Qx1CFjbQZ1c ispTd09hzh2gcdoECWhx3EaFKF3hB1tKXxJtLsTFq4yXDVSOMmDpqgGehWxQTMDXoBI4 D0rA== 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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 lj18si3400045ejb.161.2021.02.04.08.28.30; Thu, 04 Feb 2021 08:28:32 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S237951AbhBDQ1Y (ORCPT + 7 others); Thu, 4 Feb 2021 11:27:24 -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 Precedence: bulk List-ID: X-Mailing-List: netdev@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(-) -- 2.29.2 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)