Received: by 10.213.65.68 with SMTP id h4csp505050imn; Tue, 13 Mar 2018 11:09:00 -0700 (PDT) X-Google-Smtp-Source: AG47ELsq8fJDlqtTE4Y4LT77b8BBoNX4XMaYvfBcxwBcaoNd1ih/88ZAjZ/QaEkzzAdrPW7Zq1U1 X-Received: by 2002:a17:902:7102:: with SMTP id a2-v6mr565805pll.87.1520964540008; Tue, 13 Mar 2018 11:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520964539; cv=none; d=google.com; s=arc-20160816; b=jVAaf8p8+73/iBtO63ptkV1qctdWS5TvZVOq9/9++H+0+3+TNAXfi/5vyIL7PHkU6m xeNWD1IuxfQEqp6DYA/NxRmKCixD6sho0ocF09FEwSjLSXip6dzWKljG0u3kFE/KciQj GyS9LVPWDNZGEx5dj2iULgkOC4aeMotmPkeezm32HYcypEtFtuA4W6gnQ1xo/Bp7DMYL efeG8fYj7H56PXHrrno2KH305m4OzrijPOHsxOHeuARb0LJB4JKcm4ZpigZwU0ptPdDb t4utQhb3VdmQhJ/CJAvMFulSynalsY37ZZe1+GLJR9fu9UoIZeExXRQpImu7ZqXGXcb8 hsng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vIXa3/kYJbT/iXqbIpVmktbIV+OKZhLeNYMYgJZ4Sqk=; b=kp4liJHwxCFUwvqWTMn4BItj9IugKZP15HqzwPrQRBmG+1hZwAqmi8kK7wASJ/PjtX l7yLhe+zkzna7WHMRUbEQUe54rxLuNXR3373Uu3Rz72wuVDk7pAd51vXbZ1AFEEWDaGf cQWkdkRhQfNgKOZQn2zszJ1dMM3/3PrOTfco9rfCyNjJPy1hZqfCfFwxl60HYL33PLQS w3sp7Ob+eDOG0g6xYV32/jCGwQO4F8tPqyyNxcoEvVrpYoZ7rPR631oJlHBdr6qTZOsa lq8/16GFtaIXfIQmLji5wXyGGs6GB5CpZlYaFnwcsvOwY0uksteV2kJZOx3N1PsOa9mG 4z3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=QM9GWgbQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c62si511638pfg.240.2018.03.13.11.08.42; Tue, 13 Mar 2018 11:08:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=QM9GWgbQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbeCMSFt (ORCPT + 99 others); Tue, 13 Mar 2018 14:05:49 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:41730 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753052AbeCMSFm (ORCPT ); Tue, 13 Mar 2018 14:05:42 -0400 Received: from CookieMonster.cookiemonster.local (unknown [149.254.234.209]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 9004F21468; Tue, 13 Mar 2018 19:03:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1520964207; bh=9Lq9YOC+0P5IzYFmHH4Kjpd8Oi+3/NoT4HLjX9YgP6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=QM9GWgbQfPZsLMdnqqs23D85mTiTnQr2iJJMBh4DtvMu78RO+HZN+xxm6Xb5ecCtB NzHujX9xhH9SUwdSmN42K7gD33ZajHLLtAOpqCBYIKHmFF3jZcJlOn7aEapbMHGaf9 sWwFp0wFxudhB51bSpCA9WcY19NQbNGqgPrEGAbc= From: Kieran Bingham To: Laurent Pinchart , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 02/11] media: vsp1: Remove packed attributes from aligned structures Date: Tue, 13 Mar 2018 19:05:18 +0100 Message-Id: <30abb41033b9670c06a54ff484d61d25d3c6e5cd.1520963956.git-series.kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The use of the packed attribute can cause a performance penalty for all accesses to the struct members, as the compiler will assume that the structure has the potential to have an unaligned base. These structures are all correctly aligned and contain no holes, thus the attribute is redundant and negatively impacts performance, so we remove the attributes entirely. Signed-off-by: Kieran Bingham --- v2 - Remove attributes entirely drivers/media/platform/vsp1/vsp1_dl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_dl.c b/drivers/media/platform/vsp1/vsp1_dl.c index 37e2c984fbf3..85795b55a357 100644 --- a/drivers/media/platform/vsp1/vsp1_dl.c +++ b/drivers/media/platform/vsp1/vsp1_dl.c @@ -29,19 +29,19 @@ struct vsp1_dl_header_list { u32 num_bytes; u32 addr; -} __attribute__((__packed__)); +}; struct vsp1_dl_header { u32 num_lists; struct vsp1_dl_header_list lists[8]; u32 next_header; u32 flags; -} __attribute__((__packed__)); +}; struct vsp1_dl_entry { u32 addr; u32 data; -} __attribute__((__packed__)); +}; /** * struct vsp1_dl_body - Display list body -- git-series 0.9.1