Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2805509rwb; Thu, 17 Nov 2022 16:44:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf6GXzAm7aIcRLHk4LVBxWktWvTmOooZiNgJlJbH9njWBOukbBjgtwJybWGoPMSld3l9SYV3 X-Received: by 2002:a17:907:1dda:b0:7ac:db50:90ed with SMTP id og26-20020a1709071dda00b007acdb5090edmr4116250ejc.487.1668732285133; Thu, 17 Nov 2022 16:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668732285; cv=none; d=google.com; s=arc-20160816; b=q222ncGsyKfhFml4q6p4NF+WdYarTeu3++mX48YG1z2ZVS/0125DhaaMZoLOXhX4wL uFObyQYGxZ+dpnltQfABerIGY8a6RYRYMB5ztmsiKgIJdsnFpZ1omvzJ0CPlasldREKN gQk7Ssbnp7JazORlBN8qXXqDg5wiaCOUx+aIOC6UTs9bIFS3BLD9H+9IqwLOH4meSFJH RTuCVzyPr4Pa02jkP3seRCx6BG+nIGyWbz2D7wGxR9W+/4MIQP4b9VqtzDnoF2gRnqCJ rHJxcnCabY1bfrpYXq/iR/aMPraiaYKKA01mBFAm4/NsySTmjQli+A2bPbETGHg/mrM8 bzbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hgtyWgrVOpmdmBa6/UWlG/v6XpfBN1v67jaf5tLg9qg=; b=ZgtK3nZqOBqkj8tCHdmfnOUPceBB2dVFyADmObQp3quoKxTbqhBiYoHaKMHqGqojr+ NnEX7Q26DbV0VAWCj42MFniAYAc64UsbEM6mlwREYf0+QKhQLMEBmxYj6tgPVOsFv54a +fiejt6ch4s1KRBg3gchKgrYhzz5iiLRkh4yd3oOKGT6dvBN2O2dF9VWVPuJJvUbDifn 4zSHbNsplGiwEfH3FBihmH69/nssqv7ynULVEpB/tId9lJFYkF1B3TU2WTfsWHTYDXOc o7kIFMpv1P6TB9w3Ml8I/rlLJ1vZyM52iIt/85NGSnEno/a7tCfqbHUvhLqrzx8uxiHk rTfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=SED0Ys76; 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=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv4-20020a170907080400b007879e9a7451si1595096ejb.816.2022.11.17.16.44.19; Thu, 17 Nov 2022 16:44:45 -0800 (PST) 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=@lunn.ch header.s=20171124 header.b=SED0Ys76; 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=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240307AbiKRAYY (ORCPT + 92 others); Thu, 17 Nov 2022 19:24:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240618AbiKRAYR (ORCPT ); Thu, 17 Nov 2022 19:24:17 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0354C70A1E for ; Thu, 17 Nov 2022 16:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=hgtyWgrVOpmdmBa6/UWlG/v6XpfBN1v67jaf5tLg9qg=; b=SED0Ys76AN59Hhjl7xEtkgFU77 W8zDTGxY/zNGqf6rFnlu+XLYHRVgv8Uk/q2UXS04NipZJCa/S1omiuOrS3cQMiVZYNSJudypVHnov 0Xzvj0UGZUDIfifRlTzQC3SS1oKPOgDo/n3YROybZdFhsari44CexGBzR/BdKUUZ0xdo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ovpAO-002kGK-91; Fri, 18 Nov 2022 01:23:36 +0100 Date: Fri, 18 Nov 2022 01:23:36 +0100 From: Andrew Lunn To: Umang Jain Cc: Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Dan Carpenter , Greg Kroah-Hartman , Hans Verkuil , Dave Stevenson , Mauro Carvalho Chehab , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kieran.bingham@ideasonboard.com Subject: Re: [PATCH 2/3] vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use Message-ID: References: <20221117160015.344528-1-umang.jain@ideasonboard.com> <20221117160015.344528-3-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117160015.344528-3-umang.jain@ideasonboard.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 > struct vchiq_mmal_component { > - u32 in_use:1; > + bool in_use:1; > bool enabled:1; The patch you referenced says: +If a structure has many true/false values, consider consolidating them into a +bitfield with 1 bit members, or using an appropriate fixed width type, such as +u8. The code did exactly this, using two bits fields, in one u32. A bool probably takes up 4 bytes, maybe 8 bytes, so this change probably doubles the storage size for these two fields. Are these fields on the hot path, where an extra AND instruction would make a difference? Andrew