Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2418971rwb; Thu, 17 Nov 2022 10:27:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf6UrG4V790w2JDbQolpYfv49ZKHWgYeXnXUICxnyWzAuoEj/I5vWqJ13FluME5zjNBbUSi+ X-Received: by 2002:a17:906:cb90:b0:772:e95f:cdce with SMTP id mf16-20020a170906cb9000b00772e95fcdcemr3209166ejb.78.1668709640281; Thu, 17 Nov 2022 10:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668709640; cv=none; d=google.com; s=arc-20160816; b=kCQo+YHtV7rjIzzbu/OwWRJdx3LV8r8+8yr7d0+nePpYdfXSsli1sbQhayWLikuiGL 6hRyPBmCk2Ck4Q1tONQ9KDmqJT3Jswof9Y6f7+AL+dPkskwOkKwX29Bh72haZDT6aYOy V6tsLwBbvk5z/MqFGnnJYmB+RddC15q1LU2/Mf2zIRaJgG37YJnN7XVRQP+uKdamYq5l LVGMvkS4+UsYHJuEOlXRZLoIAfPeOnODlGrF9FK4YcoFNlHpn6AzDV25aE5cLmchgc0g HcIp7uVJCUPqfnZ2ReLViIvtWPAeORjKVG0ur9jq67fFDHiJV68aJdKv1ZFM5Mulvxvw QzQw== 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=sPMtZhx4ivVSAVXAoU+z7pybS1UMHC42/5DG7ucrR/U=; b=Yk/1kmKRW7KHeWPh+ej4xWSzrp/zLSXiDUEaaRlZzOqrL4KIyik0eQ1gI6uhCJRdky VyMtOWxAeSjq/GlePoLfGeQILEEXadSD4wVIK0TSM+UYOoZz9naeG3m2rHbGw1adfGx1 jCnkATVXwEw3Xj6kKSVgVNS6382QcDXsXFCxtdEs2mjk328+9eVLS0cDoZoBkQagO7g6 4yfBXovB1vU0y7w4MSTif0YVYOHJJ+O0XhzNQMW3GpM6D1uEAONoBqASeK5JZEBV4Xdn AA9xhL3N6pmRRKy7vudYX/Bzpdi/FPagCpYxf38MQ0Inxs7CyhPPZ3SZ7YeqCrwcbQhN ncaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mTbXHZNN; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056402444700b0045c97cb9027si1334094edb.421.2022.11.17.10.26.55; Thu, 17 Nov 2022 10:27:20 -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=@linuxfoundation.org header.s=korg header.b=mTbXHZNN; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240307AbiKQSCi (ORCPT + 92 others); Thu, 17 Nov 2022 13:02:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240392AbiKQSCb (ORCPT ); Thu, 17 Nov 2022 13:02:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80B517FF07 for ; Thu, 17 Nov 2022 10:02:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 27FE9621F1 for ; Thu, 17 Nov 2022 18:02:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5464C433D6; Thu, 17 Nov 2022 18:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1668708147; bh=TRjm0WT33DZOnm4zQ5Af86jucgIaP3z093GvYTORYYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mTbXHZNNdEIy33+Uk8+Oq9oCmUpdng8aTdMFnD1OG+4HLFcapT9PyeYQ6P8DKydRT 9UNFybcWRDzgvRltMBWtwR8utLTYsLBVPsFNQyquckIKoXAefKdNhGhsDMtDTlEPRK nu3CDMx6eoIgfv4foyowbh8LnaW96W3NM2qLxPmM= Date: Thu, 17 Nov 2022 19:02:10 +0100 From: Greg Kroah-Hartman To: Umang Jain Cc: 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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 On Thu, Nov 17, 2022 at 11:25:48PM +0530, Umang Jain wrote: > Hi Kieran, > > On 11/17/22 9:39 PM, Kieran Bingham wrote: > > Quoting Umang Jain (2022-11-17 16:00:13) > > > This reverts commit 640e77466e69d9c28de227bc76881f5501f532ca. > > > > > > In commit 7967656ffbfa ("coding-style: Clarify the expectations around > > > bool") the check to dis-allow bool structure members was removed from > > > checkpatch.pl. It promotes bool structure members to store boolean > > > values. This enhances code readability. > > > > > > Signed-off-by: Umang Jain > > > --- > > > .../staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 12 ++++++------ > > > .../staging/vc04_services/vchiq-mmal/mmal-vchiq.h | 4 ++-- > > > 2 files changed, 8 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c > > > index cb921c94996a..4abb6178cb9f 100644 > > > --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c > > > +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c > > > @@ -863,9 +863,9 @@ static int port_info_get(struct vchiq_mmal_instance *instance, > > > goto release_msg; > > > if (rmsg->u.port_info_get_reply.port.is_enabled == 0) > > > - port->enabled = 0; > > > + port->enabled = false; > > > else > > > - port->enabled = 1; > > > + port->enabled = true; > > > /* copy the values out of the message */ > > > port->handle = rmsg->u.port_info_get_reply.port_handle; > > > @@ -1304,7 +1304,7 @@ static int port_disable(struct vchiq_mmal_instance *instance, > > > if (!port->enabled) > > > return 0; > > > - port->enabled = 0; > > > + port->enabled = false; > > > ret = port_action_port(instance, port, > > > MMAL_MSG_PORT_ACTION_TYPE_DISABLE); > > > @@ -1359,7 +1359,7 @@ static int port_enable(struct vchiq_mmal_instance *instance, > > > if (ret) > > > goto done; > > > - port->enabled = 1; > > > + port->enabled = true; > > > if (port->buffer_cb) { > > > /* send buffer headers to videocore */ > > > @@ -1531,7 +1531,7 @@ int vchiq_mmal_port_connect_tunnel(struct vchiq_mmal_instance *instance, > > > pr_err("failed disconnecting src port\n"); > > > goto release_unlock; > > > } > > > - src->connected->enabled = 0; > > > + src->connected->enabled = false; > > > src->connected = NULL; > > > } > > > @@ -1799,7 +1799,7 @@ int vchiq_mmal_component_disable(struct vchiq_mmal_instance *instance, > > > ret = disable_component(instance, component); > > > if (ret == 0) > > > - component->enabled = 0; > > > + component->enabled = false; > > > mutex_unlock(&instance->vchiq_mutex); > > > diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h > > > index 6006e29232b3..70eda6cac1c6 100644 > > > --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h > > > +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h > > > @@ -48,7 +48,7 @@ typedef void (*vchiq_mmal_buffer_cb)( > > > int status, struct mmal_buffer *buffer); > > > 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. thanks, greg k-h