Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2172982lqb; Mon, 27 May 2024 10:04:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXffoHaVFof7fjmUOF2w4cVsQUmZues7Y143yaFhHu0FIwbPB/CrnSI/ZTdqlsQUxT1eDfyXNbJHjBAp9U/52xB46IGBDyEduTWaJorkw== X-Google-Smtp-Source: AGHT+IGg+fzJ1+870FmRMSXwKatDht80iS3IK7w81BzQRLV2dyoZryeGtrIZHCPrDrUOrK1TJaR2 X-Received: by 2002:a05:6358:93a7:b0:196:f907:3020 with SMTP id e5c5f4694b2df-197e565ff93mr1298882655d.25.1716829471204; Mon, 27 May 2024 10:04:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716829471; cv=pass; d=google.com; s=arc-20160816; b=vxxtrDn4FhgRiIdylcVlPecpKOmFd0gV2EsptzpVCkBu2pf1X1W4SaqbpsTa0SGFAd bGu0x54RshAbhrt7xi+lq65YsM6r4q6dq7cmNV2kGyb48FTSWP7OtElm69cDzF5sQxZ8 iNZ9MJA82Yt92HIXbY8nS9I8siVzA4cqo48xP7CMc4ThpBlOxOj+nrPluFzGvIKpol7c WznTH3Gw/3CZ/zj7gWsXd2DydwD7O+XDsOIVTj7E6YrETlTi3j9aws3uxnvxtuzOeNo6 qHMsEySre+n0/gg2LAEX90KrlbRtlTkOLhHU/LPDHiqWPmKhZDH5VG6xV4ni80XRq2W9 mP3A== 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=RkTbEm3eO/kuxEO3UFRXsPyiygNDPOCsTNRuX7baZnQ=; fh=LhdatDguh+IuN1lDyS6rzhx9ubttSYYZpDCGFgekH1E=; b=IZzcmZ5RBEIpI737T82Zsuh9ErNzQFTkzthMSBxWd8RlE4BCBwK3thuY9WRY3MWsJe HTcHG/WHaVvHGJLTkAhLz0cXtuSbnDTaXu97UvbQ1OieVWQdx6H7MJ4Xyn8+7UEa128j a+bDG3o5JKcnkuiEnaCQfgXsamsmJoBI56w1sPCFbBRDTcXn6U+afnHglhaq7Ol2jW6m WXm1GeFABuNUtqFtoCdIWx+y971j3hA/I128b7jEgWmF5CEnsyWGox4ScvpUchS5ksiC Nc6sKCPYb4madZ6Wt3cy5Q4qBmcTDfXbGAp0pUtgdTBWLhF39BNWHEg3VWRpZwoPyCVF T6Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lKsCy745; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191275-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191275-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f4dca4si84567246d6.69.2024.05.27.10.04.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191275-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lKsCy745; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191275-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191275-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 81D6A1C221FC for ; Mon, 27 May 2024 17:04:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79FA7161321; Mon, 27 May 2024 17:02:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lKsCy745" 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 384B815EFCB; Mon, 27 May 2024 17:02:41 +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=1716829361; cv=none; b=IN6LjmvMZvYi5S/bY76lkmhsbJV4C0WLnKQ9oDOBkh7TAXciuxErk/NQZ/Z2MZ+qcRkZscqQKlQOBwpttIsKk0TTmhfUhdK/eLkszYlJXqGVKlZEg43DjazA4Mhx/8yxIFEy8maZpwGZ813/RquoIgY+uF5xy+wyql3CRlG6Ay4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829361; c=relaxed/simple; bh=IqesYaWJl2yZZhdPxGkum2usAMQPnOzK+vkmI2bk5lc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pTDeIp79PaYO4zCXoyulK/9aZ9i5WHtF2DodxGxbnZhH6geDVxp2AuWxUKEzzRmWge30Jf/jRUEtAvYIFS8mvuRHMt6sGPyDgDeQw1bHFMo3YXP7oMdaXpD3Q3Cq7at7yoD/8s9Bu/3WXbK9A7fkrsIZBaHXB9EmFyqNJ7WS3Lg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lKsCy745; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 05DF1C32781; Mon, 27 May 2024 17:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716829361; bh=IqesYaWJl2yZZhdPxGkum2usAMQPnOzK+vkmI2bk5lc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=lKsCy745O680yxtv/0mDMC1BXEsa3C7J/dDniyqQdABpfs+tFKd1f2c3ddCTiq+F7 C5HGf9/5HG5DmSvAgv13faMJZyd8rrA3M8IILbavsaOJgxyVnKc/TDCJXP8FpkRXzf 8ZaMXBAyV7Q7TD5f9dFgWKtbKZeWCntOPSiBAlcNSfhH6exIREcB1LCvFC7zwSrGaK +NrF8zyZA8TfWPfWxXrSaxncVqsmGblKWcmCuCYs4GVlMzgUi6DxMTsRN07z7p1JsO kCih//pd5ZMavLPeey56sQS+86xutCEXa2OBZo8zX/ynAR8xofy+aduTQUxFhIM2ib 6NM+LRSUSu8oA== 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 EF660C27C43; Mon, 27 May 2024 17:02:40 +0000 (UTC) From: Dumitru Ceclan via B4 Relay Date: Mon, 27 May 2024 20:02:39 +0300 Subject: [PATCH v3 6/6] 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: <20240527-ad4111-v3-6-7e9eddbbd3eb@analog.com> References: <20240527-ad4111-v3-0-7e9eddbbd3eb@analog.com> In-Reply-To: <20240527-ad4111-v3-0-7e9eddbbd3eb@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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716829358; l=1076; i=dumitru.ceclan@analog.com; s=20240313; h=from:subject:message-id; bh=i/3qfPHmc9/fJMS7GphA3tYcltv4y8f3THcKw3nnHnI=; b=oSmM/iCHqtU2Fbgfsws2MdnrTzKs8xA2r7xrX1RGY/f4pWMUgc3baXJjLPh76lfEP9jLgyv+Q wZCFDZRWSVDDFqbaVPfUz/FVnu+aTuBc8FU1MnaNEvsVH16Mdyk/qMU 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 328685ce25e0..e8357a21d513 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -179,15 +179,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