Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2806500rwb; Thu, 17 Nov 2022 16:45:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5XgAAXzy8U4bFsuSA41REsXuIxzDMuTAGASLe/I47tINcqVSwsww2QB9055c6wS1Wr+ssk X-Received: by 2002:a17:907:774e:b0:7ae:39b4:7208 with SMTP id kx14-20020a170907774e00b007ae39b47208mr4019131ejc.766.1668732351080; Thu, 17 Nov 2022 16:45:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668732351; cv=none; d=google.com; s=arc-20160816; b=fp13BQxQ1wXhqwK9vtuwKA4WU0rBsw6Fr9PlHoMhkkmSzBQnUzf3hYG/WmxxpeXYxM Jp6fHXfm04VZhR3H8sKxNeIOGaqDcus5pHjMN4N78zfQrwoA6LdEoJOX0afegroVcA+X idJ7FJwi6dwRdAygGh00cxmEbU+Pc4TLrHdUW76DaiJSWJOFJWdVqGK3JWKKI3KfGUkK FtljeMrhPsoyT9lQPZgj5Cg4ZM4dzF6lELI0FcW947q9fkxkf5ECEZaSaaVlGiV0c4wM mxJCYd/D9X5z/LPWFe51rIxr0aF8Dgk/t5nhV3PADE1ddS5K4mWagPkvDguxP+OiuLez +i4g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PuApb2pByjk98IZchlL2evjxCv1+LxfcRXQWp9SAu+4=; b=UwVd20MswLHPFBAElkW6iD6alqC9N1mXCBF/OfYGQuGF821ra7hKtwHukFjBiDFI2G o3WehBKLLNR8O6w34mtmB5PKFlQHoZi8UqnVbO+AFZqF5lpKBLF6xbczmzK3whvUR2uU z+qm10nZn5iEn/3uHLq5HdnePpN86aYg0YmLCR7BlpILG+tb9RH8rCSIg3YWWKj8Y1bd xeSMJDNf5Q8++CimAjp1DwRN07+8MFIRbbXpdaRYeD2EWugHBWu6dVP51zUUvQDNIym5 6qv4YiiJ3IyZJ1LK1JiQ9Hoj7f++tat8Ei906Fag0YU5op7MsrkssJt1JZHjUoVLtymh F2mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=N3T1+fOh; 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 b22-20020a170906491600b007ada030c2e9si1612812ejq.944.2022.11.17.16.45.25; Thu, 17 Nov 2022 16:45:51 -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=N3T1+fOh; 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 S240538AbiKRANY (ORCPT + 91 others); Thu, 17 Nov 2022 19:13:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235091AbiKRANV (ORCPT ); Thu, 17 Nov 2022 19:13:21 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36DE67666 for ; Thu, 17 Nov 2022 16:13:20 -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-Transfer-Encoding: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=PuApb2pByjk98IZchlL2evjxCv1+LxfcRXQWp9SAu+4=; b=N3 T1+fOh2/fK1epLVAaYd7TGL8sFiN+NFvM7chaaz0tgCgVt47SzidXZxOPdBwpY7DenTAqvlI7+YOf GYaQDIYc2itiZLw9hEx1HYYuQd1V7kAr3n2uhbBjjQ5F4CEq6ARchcHubG35UTE8CuLheamsd8Xnl /UUeWE2S0sIYMaM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ovozg-002kCI-PH; Fri, 18 Nov 2022 01:12:32 +0100 Date: Fri, 18 Nov 2022 01:12:32 +0100 From: Andrew Lunn To: Umang Jain 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 Subject: Re: [PATCH 1/3] Revert "staging: mmal-vchiq: Avoid use of bool in structures" Message-ID: References: <20221117160015.344528-1-umang.jain@ideasonboard.com> <20221117160015.344528-2-umang.jain@ideasonboard.com> <166870135963.50677.14827688186331561108@Monstersaurus> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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_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. Andrew