Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2513756lqo; Tue, 14 May 2024 00:25:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyYYDMVOhDn5mzpWX8Egjc3Ma8NDi+Moc6FrZBi4MlN0N8nYjgKdJth2bqDggAOfUNBsQpEflaeOST3wvwqcLqSs552uDhl1QFwBtcOg== X-Google-Smtp-Source: AGHT+IGPZfspOvftjsboxt0l7/zkBLWgERVHPtz49WYKw97lwfCoNvbFPkA8ua8J2t4NO4JUj3LP X-Received: by 2002:a05:6358:9486:b0:192:711e:d796 with SMTP id e5c5f4694b2df-193bb2adfd9mr1363431055d.25.1715671538451; Tue, 14 May 2024 00:25:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715671538; cv=pass; d=google.com; s=arc-20160816; b=NhT6zwJE1dzHzX3UYdygA8ghsJZacarXeFUhTtHPgjI3qkALYOGWWZ67pv02XDR9PH UY9qyWSVihPKJVpCU96taA9tnAeANFWyzhnorjyPmpTUc0opk3DdCh2uxcygzurwlxjB n/NbK/aOvp1XXEhpPDJn047L3VBNO25AE+8i26D3HecZnKk0ZCkPzSYuBglIAYF9JdUq iKEczY5UkT1jfoMbOpEBA3Aw4ylgU0flb4bA1CSZeiKj4TDq3vJ4hZEH5a1yOw3SW8Xl JW2RkBOFl5zdC1nR6hb1zf0vLvMwba7BJII3ZC//N/tnihLHPx2hlU0xO2fbX20LURTW nO9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=eG20GsN5F2OplX5DJWCtLSOquxEFO/UR8MrYQFxY1ZU=; fh=LhdatDguh+IuN1lDyS6rzhx9ubttSYYZpDCGFgekH1E=; b=K41SqMwJ8NFtv0Q2iwWXUYkuENECfWQn1Hz2fthf9OLOcdXY7TQQWhZU+JTPmj4lwT htq/wYN8K3YEQVilYKOo6OYPev3mLrpL4auuW6GJDuOP/rnDx/IOdbwDjJQmEqlv0ZCh hdBiSTGZoCZP0lRBH6422vYz00nKZJqsy3AXcUNcGtVMCeChsaAVdwSitAv+c830vTxV Rj4/fKtYYEedRnip9E//caJ5FA5ZO3YRdyyTjDgEF4w6y+F9BPybb7/J28iXn6Pw3svs vPZL6MndMTjuyXP/7DjhY+VI+D+/fcO2ioMOPMDW4qflw3EQVY8AhCpEansMJNmgg9jB Sy4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UKXNoS0e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178385-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f54b5si10827726a12.268.2024.05.14.00.25.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 00:25:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178385-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UKXNoS0e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178385-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C7118282709 for ; Tue, 14 May 2024 07:25:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2BB03C08F; Tue, 14 May 2024 07:23:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UKXNoS0e" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46BD525765; Tue, 14 May 2024 07:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715671399; cv=none; b=DpOGmUR/Kj7VGSuCkpnQrwIMrmWzUK4toJqoJVFCf9zG8Ku3Oue4fyxms57cqJ6Dyga+zKm07FfQpxAd9XZ3rmMYUlevNSLryyGAYODDGXl7DTHBiDsASeE/chwjpFPudGOF4oLJ3O3l9VBQY8ZtWZJekBwo4Cn+MzriBDN0t1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715671399; c=relaxed/simple; bh=1YgStPTBqOXTZn/yGxVC0i4oXFG75QVcdPJh3J/HwHA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qb1Thx8PQxoqx0rYwPZvX5zXo4+CSqHp7rLm5fuJWO72HrSdB4h7XZwoE2cIh7z9KWsBu2aL1o/fTgbq/WV90/YdEBL99gz8sEWiSaps6iSPBM+wsGz4LAtJoC0zhLgxs6qAjQW2H0xuWa4k1pV2p3W3ern7RPpCkiRkNaYlqXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UKXNoS0e; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id AFE86C4DDF2; Tue, 14 May 2024 07:23:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715671398; bh=1YgStPTBqOXTZn/yGxVC0i4oXFG75QVcdPJh3J/HwHA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UKXNoS0efappWY/f21aEeftbGe4DpYwHuV0RA6MbMGGewgXLSTr08oIq1VC1kek6L i8EwpvjhVwPs8meeE2+KAD/ahapa9FnjqEQlhOMAUgSsyzr+1aZYO/oWtaJ5//L9uK TBdWp4uo7dL2BcAauGoBK3WRqFdhOE3U9vsCpHpSlCmEx02J/6jOg5VLEzfoxu+GrC q9pWJLGKc5pIZ6xpq05B4cXVywhyCgpO5HkGJZkTYhe+sFEURoh+6U+yFm0i8IDxZm Z9BGTkniaNKPzwj3+Pj+VcdMDBw40TyyJ+xjghGYIFNliyopbV2QSnSH539IznlmyQ 1Wa82H5NKZ7dw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F9CFC25B75; Tue, 14 May 2024 07:23:18 +0000 (UTC) From: Dumitru Ceclan via B4 Relay Date: Tue, 14 May 2024 10:22:54 +0300 Subject: [PATCH v2 9/9] iio: adc: ad7173: Reduce device info struct size Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240514-ad4111-v2-9-29be6a55efb5@analog.com> References: <20240514-ad4111-v2-0-29be6a55efb5@analog.com> In-Reply-To: <20240514-ad4111-v2-0-29be6a55efb5@analog.com> To: Ceclan Dumitru 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 X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715671396; l=1076; i=dumitru.ceclan@analog.com; s=20240313; h=from:subject:message-id; bh=RmIUo6Mi25zkqE47X3KPvkctN+OcwkN8pU6glB5Vkrs=; b=rzsfG15wDQ+1f9c6J8mg/V77m6QEu332viIRx2GWiZgtebRG93ls/4H1z9xLYV+VM551lCcq4 wKwALbRSrbpAfDYDCXinF1na7NgfPMqR2r7GHjJTUm1jyC8MUNx2ZXs X-Developer-Key: i=dumitru.ceclan@analog.com; a=ed25519; pk=HdqMlVyrcazwoiai7oN6ghU+Bj1pusGUFRl30jhS7Bo= X-Endpoint-Received: by B4 Relay for dumitru.ceclan@analog.com/20240313 with auth_id=140 X-Original-From: Dumitru Ceclan Reply-To: dumitru.ceclan@analog.com From: Dumitru Ceclan Reduce the size used by the device info struct by packing the bool fields within the same byte. This reduces the struct size from 52 bytes to 44 bytes. Signed-off-by: Dumitru Ceclan --- drivers/iio/adc/ad7173.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index f049d79380ac..f963c731cae3 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -180,15 +180,15 @@ struct ad7173_device_info { unsigned int clock; unsigned int id; 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; /* ((AVDD1 − 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; u8 num_gpios; }; -- 2.43.0