Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp42394rwb; Thu, 17 Nov 2022 20:07:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AD2/EGa+rP2WzK9Vu+6ATm2B37WIlcJXvHC8sVnG0I9Fq0xzXZf+BdU7Z7nxWulpzCS/a X-Received: by 2002:a50:ff08:0:b0:461:dbcc:5176 with SMTP id a8-20020a50ff08000000b00461dbcc5176mr4656896edu.53.1668744456055; Thu, 17 Nov 2022 20:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668744456; cv=none; d=google.com; s=arc-20160816; b=xDHi4NfiLF2lQgQNXrTojXGDSs/ED9Xvq6Y5xpe4H5TBP1qAQ5jpRgZlEM2ZvpgUea kQaEcj0EG7baGWCq1iUWFsAtumSqVt6wjQXDgJRiRBzOnwJF5kjGrilYhGA5qwedT+8B Wf6WcGMYowpmtL0GCqLlU6hSyCVPHTRxXgXW0ZbLHG88g+uMgwnO/NqEryAUcEhx1Obs JA5jEhuAR+vbbBPiT26BRs1HQO2y6o4wsCBeFmf9ylpDFwjact9VsCxOzCXmsZD7LX+M 45GAJbF2VKF9kt6Ww8pF4eo4r7a2udX21cqa5BbkLSWaFlQLxn798HRBbaPgu9z9CjXv 3znQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=K764qGFDxPZe1ZCxr68Sl6v/STIOGKasAJ7Gi4JG2J8=; b=PTCFxFKq2qfYZqJGMRBO1fdwU8tGqvlFZKeFzaorj5WjMtA60So/3ifatT6tV1KMzb vUYN8lmwHrX/ypS1AafecgAXxE9PyPKX17A19rfsZ9qV1CkNowv62/dFnRqwQExcWeOo eB1HsT9PKi5+cCdHl4BAL+4TXWHMw+oT57LpmCV/u0MkyKcFTgYbCn+eAo8ZmLMG0y2L uU5MoC3KDGrzdkMZgyxzztPFKvx4qi+swpWm7zA0uoVPGXJpjx4PgHTefz9Q2Xkg1Okg C8Y4dWX8N5xWxiRHWQPnH+SoZJTESBN9Tk4p/rHXgNA1wZVCZtXcdfmahA5UGCTOlQVf /g9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="OlOo2O/L"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk42-20020a1709077faa00b0078dad659776si2024035ejc.320.2022.11.17.20.07.12; Thu, 17 Nov 2022 20:07:36 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b="OlOo2O/L"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235088AbiKRD7K (ORCPT + 92 others); Thu, 17 Nov 2022 22:59:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235011AbiKRD7I (ORCPT ); Thu, 17 Nov 2022 22:59:08 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B1C48DA4F for ; Thu, 17 Nov 2022 19:59:06 -0800 (PST) Received: from [192.168.1.102] (unknown [103.251.226.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AE6584DD; Fri, 18 Nov 2022 04:58:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668743944; bh=6oOaTMB/v9QU4ojRYCNukfq71v21+xVeeAcdhfMrSwI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OlOo2O/LBzDt9bq9tXJpsn/urtWBC/iW0HR4EQgaL8NrR08Pi2N5ZHCNVQIq9Jcmp zFLmetQEjL64iBPi77sMajNdzGJ+FCFFTn1532G4YbQRR/DbsxWPu+GpX2fQ8Q40aH nEgCrbZbXRGOKv+KNN7cKrRoD+mY0ZM2wcrldcFk= Message-ID: <79cc1057-bd62-02bb-a8e4-a440aa469109@ideasonboard.com> Date: Fri, 18 Nov 2022 09:28:54 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 1/3] Revert "staging: mmal-vchiq: Avoid use of bool in structures" To: Andrew Lunn Cc: Greg Kroah-Hartman , Kieran Bingham , Broadcom internal kernel review list , Dan Carpenter , Dave Stevenson , Florian Fainelli , Hans Verkuil , Mauro Carvalho Chehab , Ray Jui , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev References: <20221117160015.344528-1-umang.jain@ideasonboard.com> <20221117160015.344528-2-umang.jain@ideasonboard.com> <166870135963.50677.14827688186331561108@Monstersaurus> Content-Language: en-US From: Umang Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Hi, On 11/18/22 5:42 AM, Andrew Lunn wrote: >>>>>> struct vchiq_mmal_port { >>>>>> - u32 enabled:1; >>>>>> + bool enabled:1; >>>>> Is this a direct revert with 'git revert' ? >>>> No. It had conflicts plus I added the ':1' initialization to keep the logic >>>> same (in case 'enabled' gets used directly). Similar pattern come up with: >>>>     ($) git grep 'bool' -- '*.[h]' | grep '\:1' >>>> >>>> So it shouldn't be an issue. >>> Please don't do that "bool foo:1" makes no sense. Drop the ":1" >>> please. >> It won't affect this patch but if you take a look at 2/3 - you'll see a bool >> flag 'in_use' that needs to be initialized (as it's getting used directly). >> >> I can move the initialization part in the function (_init() or something) >> and drop the ":1" as you mentioned. That's  fine as well but I do find >> patterns of 'bool foo:1' in the codebase so I assumed it would be safe to >> use. > Does :1 really initialise the variable? In "u32 enabled:1" it means > this is a 1 bit wide bit field. It seems odd that bool is somehow > special and :1 means something else. Yup you are correct - seems I mis-read :1 as initialization > > Andrew