Received: by 2002:a05:6512:3a82:0:0:0:0 with SMTP id q2csp534449lfu; Mon, 25 Apr 2022 04:10:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy0F4h4OZ9BBA8H0I+I/nuWapvA6hRhruCOrRN8RS/jTHUbgtaWlw1xl+tvtmF0Q5mHdyn X-Received: by 2002:a50:f1c5:0:b0:425:dd04:b7a9 with SMTP id y5-20020a50f1c5000000b00425dd04b7a9mr7536248edl.388.1650885049395; Mon, 25 Apr 2022 04:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650885049; cv=none; d=google.com; s=arc-20160816; b=V07XAzIyr6LIUqA8NATgaiNq12dhR2JDTnQycVR5Bns4iiD129nmzU2OOp67ygn50U gjMsj4QHO+YvmRPIxKnw1IvbMucl2ufaNuHe9iVLgXvGuPniwBYew40iK2QUi9LgOQmH mYvs4BqcFwRh+yhrbGvyHbr2YpcqBl3BhkU89oG1dcTWuUmQXOZRUSCsHyL8HNwJ3Q9Y Kupa8oYD5P7+ikoUy+v4TgvQXR357JkkXywhSwFv7pa39jAjKAL8KAQRjDfXvXq/u66b roeMiskYo6mtAmL6Wm3sBHPhInrEydm8yxJBBuqtyQbZsRfUQoXcl7kLycfibGotd7zd Jp1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Z5YuVtU3yeCHJFHuOFw1Fh1OHZ3/W3ElUfaHLr4h05s=; b=x8ok6qIka9alS2wqKXRyUlafzounsRpXItcHpGtTnPN6EpVvxoTc6adSivNSQaPnTL sPoR0P3HqFIfGPbWlXVWqK5kyBqzdKGQa2KeztfIUfFKCsf4LHX+w7RGk4RQzdaeu/0g VVX5sSeCfdxmUA4f3RBLKmBD0LHe267VvuHevmnJSarIU9oMqcqzXY0Rg0FNLcX6qW3A nqiWKKHU5jeseasbBi3YVVwZmW5bhnyjaskPrAncOfzXswBl5R2M3ajR/0Z0XSDVm2bn T5bNBERX3qnjHcKUIKcyjbC87kXyvRBzUTUhMS8JVCQ0tBkIuF0t7GA3nk7pp5CkxUUG g6SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=l4OG3GyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p12-20020a05640243cc00b004259973f361si8719538edc.388.2022.04.25.04.10.24; Mon, 25 Apr 2022 04:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=l4OG3GyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238549AbiDYKGK (ORCPT + 99 others); Mon, 25 Apr 2022 06:06:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240786AbiDYKFo (ORCPT ); Mon, 25 Apr 2022 06:05:44 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19E1D1F608 for ; Mon, 25 Apr 2022 03:02:40 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23P6KC6N031455; Mon, 25 Apr 2022 05:02:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=Z5YuVtU3yeCHJFHuOFw1Fh1OHZ3/W3ElUfaHLr4h05s=; b=l4OG3GyWOl/B6u5h5xayNavv2H4ks7yNFVIJbeEK025Ym8trfsJHEmOzgnPEocHHapth GOoFMazIiFFq7AMPSeWWw2afLJZzSXvHXGWZl0Pw4wqCmXiiMrCI5NohyuSK4jV+cx26 u0N9WXuxFiIX6xCSbBdc7dOcjn3wqL6O9Ckmh9qyviyd83fBSmZNIcCBblhcSWfwR5WG oRqdgIbYx0qwp2hYp0yISRYaOAcqSp74Uim9FAdwrMS73Uh9xu9curbP/MoI1n+o0C3z GYaNfq5Xu7uyRsEYDgmLO1L4aL43jzLwA+MzYSDSURvbfEUqyKiJI0Kmoy6KurDQzmoT 7A== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3fmev31rnd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 25 Apr 2022 05:02:32 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 25 Apr 2022 11:02:30 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Mon, 25 Apr 2022 11:02:30 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 577A7B16; Mon, 25 Apr 2022 10:02:29 +0000 (UTC) Date: Mon, 25 Apr 2022 10:02:29 +0000 From: Charles Keepax To: Richard Fitzgerald CC: , , , Subject: Re: [PATCH] firmware: cirrus: cs_dsp: Avoid padding bytes in cs_dsp_coeff_ctl Message-ID: <20220425100229.GU38351@ediswmail.ad.cirrus.com> References: <20220425095159.3044527-1-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220425095159.3044527-1-rf@opensource.cirrus.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: FCrVFt3F1McrOxYFLs5iWCdjsCw45OTB X-Proofpoint-GUID: FCrVFt3F1McrOxYFLs5iWCdjsCw45OTB X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 25, 2022 at 10:51:59AM +0100, Richard Fitzgerald wrote: > Change the order of members in struct cs_dsp_coeff_ctl to avoid > the compiler having to insert alignment padding bytes. On a x86_64 > build this saves 16 bytes per control. > > - Pointers are collected to the top of the struct (with the exception of > priv, as noted below), so that they are inherently aligned. > - The set and enable bitflags are placed together so they can be merged. > - priv is placed at the end of the struct - it is for use by the > client so it is helpful to make it stand out, and since the compiler > will always pad the struct size to an alignment multiple putting a > pointer last won't introduce any more padding. > - struct cs_dsp_alg_region is placed at the end, right before priv, for > the same reasoning as priv. > > Signed-off-by: Richard Fitzgerald > --- Reviewed-by: Charles Keepax Thanks, Charles