Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp593348lqb; Wed, 29 May 2024 05:23:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbyMQvtUyk/U+Ee0J3FCWcd5cC0SZAusTMjc7IX4/JP+iv3AtTajBS6qrbB6A6NLYpVKTmi1b2y7fx/n7k+9HQVIXQMU2CQQECEuXkrw== X-Google-Smtp-Source: AGHT+IGPyZd66Zf6YY2X7mCCHSdzoHbF0wCsTYhkOuFw2yzzGi+MVoAzNWsbDvGrRqzYFX1YYRPo X-Received: by 2002:a05:6102:a48:b0:48b:9131:ea3c with SMTP id ada2fe7eead31-48b9131eac4mr5722462137.6.1716985437362; Wed, 29 May 2024 05:23:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716985437; cv=pass; d=google.com; s=arc-20160816; b=pnI2Z1uiboZ9M2M0A7FIl2P8+1D5JUlG/+aD9t8TmkuCsFjUBNanWcBM59tX3WRQJo DZXb8weusFJNougapZ/0wgxW8BhOCREY0B0e/S5qqQXw58o3/eZ7GpO67LS0n6AXYscn ir27TxDDYa339v58bmmPaGp7hy1SzOg3ldHVIoDXfJoSBDN/gummNokQ/keiqCUnaFQ+ L85p8fXASVk7iNCU9CvBtdyh4nDcQUHrpyJOgxkx8FG2Li6B/CtL7eO5rgzHIRjPLsUC 3V8raykXsOUGh/HXz3YWsx03CriGNRViAPlpQBvIAuOI05XvqEQ/OU5DEMYA7R4Hjdnw Piyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=agBA9ROkL6zGoPVLQLVhzR6Klzg/5dR73YkaHBsvPu8=; fh=vsKvTBSCnmVlvNtfSM5v+KKIua70bActYdt7DhMRa38=; b=octv5B1//CuIMsTl0INv83BFpS1mIHN2WY3PPpHt6MpOrPeHkKuqdLY+QPE+5I5hAo QYQky/QpK/ivIolWuUV4Ow94vhB5Dc41XAhPKsOJgZABfu4VECyjIVNgPPlF86Mhx+zz UcNkkecxflexJYCVXeT8GkpNu1GuZtmoqNLK+uY9wNIp/XRgqxwcCWc4TUuRuCPNM230 SB4SkJJuB/PecxbVswlCiDd1STdd7kumphPfxgS+VxfE/1FFbRO5Al7ikYmgjVXEDqoR y+PjojZRlS93DUrOo5XVd5gZyxi8QLySc5R+OkNSlFPwDgzGtfWPdhDHAIK1/Zd9YkKW W48g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PNeGMl3m; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-194079-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fd57903c5si53582981cf.36.2024.05.29.05.23.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 05:23:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194079-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PNeGMl3m; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-194079-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E6A301C21577 for ; Wed, 29 May 2024 12:23:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E152B181307; Wed, 29 May 2024 12:23:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PNeGMl3m" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C9FD3B295; Wed, 29 May 2024 12:23:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716985429; cv=none; b=ECeMWLzXxhmVxljkb3+Y+3dLHIsfUmbwWzERRiUK/DP80bc/DTPHxqZj6AhAKVyxgfqEux4VKyfEqT0LuPyScml5g8mdhFSct9uIbWs/p2bEiPCEr/OMly+HemeD0bfziTyWCUWKQuJNuMJce9wIxHn1hBkwo3Q1Qf8jm6Jn4LQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716985429; c=relaxed/simple; bh=RkP5D3saaeTMlN+z8GdHuQotsEvMZSjBhTLRBaZ4Za0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=uUlgsUQRorumqWc3z5yqohPK4O7uGzduEqU3/ifvwrWuFppRog9zwIPXFSS6PvcOVLl+Wc6D1gzxevJzx9b7rS3BeBoC1WMI37jWDl+mRryHsuoLk/ez1EYOUJBADX6nXAOhv6nvz4jYhydvlGxxYwejYO/XoNrvN8zz6WChCg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PNeGMl3m; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a6303e13ffeso226427666b.3; Wed, 29 May 2024 05:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716985426; x=1717590226; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=agBA9ROkL6zGoPVLQLVhzR6Klzg/5dR73YkaHBsvPu8=; b=PNeGMl3mJ4yMrWxEWuRLkI8vwya7GJ95WDXj9eaKX1IQn6JSH+Dt7lAdTfwdtdTntl K7A/eHoF50am+ecoH2O3ZC6NW81uQ5gRCTOUQGA5Qn3KhWKaQaZ1DEd8DsGJHtQwfiUS TfZxXQBUgkcYk6QvLKItU631OqDFLBEQHYoM7c5N6agTqXhRz9M3ak3KqvtfB6JuCZOq kUSSCuYknLXiVuuZbF4KiQcaWa9nZZd+vArW9bvUQXfnlmv8XSPpxSmSAkMZw/yR17rE XxCvENqZXskkblOENUa1vqQwbUrZNanbgRD+zHwHBhG18nEyzScVWMRXZAS5UIG1KvLq U+cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716985426; x=1717590226; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=agBA9ROkL6zGoPVLQLVhzR6Klzg/5dR73YkaHBsvPu8=; b=qEChPhgdIf62uSqHuiBxje1yBmlDBFz9pYi/fAsDBz4f9zQKF8pAo+aHeuiDokenLb omamP6/sRiBNEq455xGWEhHl+QrX5B7n+fT+dnwe3iqPFvcmeCmq095eKsQz7p2kUYeO yjmW99NKRN5PnJdyPOvZXt7FiUiRuQigkZTv4LcnbNhvDkvKLipq6axq2JUDyh4mMWpM TYA1HrXBW5wkB8gAD2SBjsJehmw2b29vamXL39SBXS2oEvdSV8jl+uH6JaTbISeOAOqN yYDygJGYP1wL6Z9NIgXdb6/RGG+kPeKq0QWTI2qqC/aznWDq6doRA0Q36xL9WV5iRf/4 7Y2Q== X-Forwarded-Encrypted: i=1; AJvYcCUYh8uQjUWkP9o79Pka021cXjCukFdYWSi1Z3qCFhYvQXAOcdJ8PM9EepnRnA4Xa2SPSJ8fZiQcFBSLGt9d6xIJXEINE48StXNeseL3w+Sx7qqiQm92Z6+g2RIxbr+zTRk/gzmDZ1S8i67AsLMnxKHx4muzrjueKxWObuBghpNoLVsm3g== X-Gm-Message-State: AOJu0Yzizrx6sqHtlcVXep9WuQ5DeL8b+RnbBJAmvH8beemvZUEw/qG1 PAyBCAts8vyXQjGl3hQpf/VusIsME0nhF7S9kMGHrXldTOYj0XCI1npR/CHsfAM= X-Received: by 2002:a17:906:68d4:b0:a65:9c88:b738 with SMTP id a640c23a62f3a-a659c88b7a6mr53492866b.12.1716985425679; Wed, 29 May 2024 05:23:45 -0700 (PDT) Received: from nsa.fritz.box ([2001:a61:35f9:9001:40df:88bb:5090:7ab6]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc51ab2sm709129466b.133.2024.05.29.05.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 05:23:45 -0700 (PDT) Message-ID: <2f26b72970be841279ca00c1b5eb91dcfffabdea.camel@gmail.com> Subject: Re: [PATCH v3 6/6] iio: adc: ad7173: Reduce device info struct size From: Nuno =?ISO-8859-1?Q?S=E1?= To: dumitru.ceclan@analog.com Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Lechner , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan Date: Wed, 29 May 2024 14:23:44 +0200 In-Reply-To: <20240527-ad4111-v3-6-7e9eddbbd3eb@analog.com> References: <20240527-ad4111-v3-0-7e9eddbbd3eb@analog.com> <20240527-ad4111-v3-6-7e9eddbbd3eb@analog.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 (3.52.1-1.fc40) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-05-27 at 20:02 +0300, Dumitru Ceclan via B4 Relay wrote: > From: Dumitru Ceclan >=20 > Reduce the size used by the device info struct by packing the bool > =C2=A0fields within the same byte. This reduces the struct size from 52 b= ytes > =C2=A0to 44 bytes. >=20 > Signed-off-by: Dumitru Ceclan > --- > =C2=A0drivers/iio/adc/ad7173.c | 16 ++++++++-------- > =C2=A01 file changed, 8 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c > index 328685ce25e0..e8357a21d513 100644 > --- a/drivers/iio/adc/ad7173.c > +++ b/drivers/iio/adc/ad7173.c > @@ -179,15 +179,15 @@ struct ad7173_device_info { > =C2=A0 unsigned int clock; > =C2=A0 unsigned int id; > =C2=A0 char *name; > - bool has_current_inputs; > - bool has_vcom_input; > - bool has_temp; > + bool has_current_inputs :1; > + bool has_vcom_input :1; > + bool has_temp :1; > =C2=A0 /* ((AVDD1 =E2=88=92 AVSS)/5) */ > - bool has_common_input; > - bool has_input_buf; > - bool has_int_ref; > - bool has_ref2; > - bool higher_gpio_bits; > + bool has_common_input :1; > + bool has_input_buf :1; > + bool has_int_ref :1; > + bool has_ref2 :1; > + bool higher_gpio_bits :1; > =C2=A0 u8 num_gpios; > =C2=A0}; > =C2=A0 >=20 This is really a very micro optimization... I would drop it tbh but no stro= ng feelings about it. - Nuno S=C3=A1