Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp372450rwb; Fri, 18 Nov 2022 02:43:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf44AJmyoXCQQ0nDgXIB3WFN3N20PgSIr+wd1gQ1ZeDmn/o22v+uZSynlXxB3CW+y5gb5VV2 X-Received: by 2002:a62:442:0:b0:55f:8da3:71d2 with SMTP id 63-20020a620442000000b0055f8da371d2mr7258713pfe.37.1668768229279; Fri, 18 Nov 2022 02:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668768229; cv=none; d=google.com; s=arc-20160816; b=JBPCZI8CUrUQoYIQBB++bFutlujmVZEeWaRPQESu05iiCxwMvA4FLlHwTD0l+FUu+d 7DBZdxPj7G6l2PlHwruc97MiSbgfXfHlrXtVdk/9QjorWuVbdVAe3e8ZudlbvjdbgOM6 bPU0Snqz3SvM+g4Gi4wESmifrVdVxsok1nXYa4jk/9HxSyb85ZZIGZQjQQepW8AZ1gZ7 zIievp00s5UHp288yLCclmTHPVdwfll1+WA6+95tB5mEhy42E5MriO9fSkL27z5ntO/J fBFvZvOQprG47O3nUWJ5Au8oZWmnROrqJdrul7wNxRwl1X8Q5KdkCqCZ0NB3gXJd9ZS0 dG7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=rK6MC9n9HfLqVgx16irTySsyeU8WPG2ncExuT9yQrs4=; b=DNpa3SUapx4foSQDE/j7ojF9UQU0IXysGaQkyd0x97aaGos5ZMmQ85aMZxwyFoaX8Z xdSuZa1GAMM5n6ZOcS2nhaDdfdfMrWLFu1VYTgkU8hB8sbRDhsjfUjikLvoO2nbJBQVG hj/OprPxviwkZNLNjDY0VEAxHVDgH/hNUy7H4Bg/PJ4R/F0wComJB9mWj6LoPl39tS+F HjQLFnY08lBvPiWzl2gGwnHbdtX3R7XHPbWQLREmXHSN7KPLjN6uaK+fmN+YmFSyaITd iKrr7rQDbqZy+rne1Hj5r+UmKpB+Y+/7qdGPEHQ710PNVzxRAFEuBbgVyh8EQxyi1+9C natQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ufKjTUYB; 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 t23-20020a170902b21700b00179f9521d08si3191863plr.149.2022.11.18.02.43.37; Fri, 18 Nov 2022 02:43:49 -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=ufKjTUYB; 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 S241724AbiKRKa0 (ORCPT + 91 others); Fri, 18 Nov 2022 05:30:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241597AbiKRKaX (ORCPT ); Fri, 18 Nov 2022 05:30:23 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29C1C922EE for ; Fri, 18 Nov 2022 02:30:22 -0800 (PST) Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F66449C; Fri, 18 Nov 2022 11:30:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668767420; bh=sH88uNandLFM8Idyh7Z25gR1H2U7S+DF9vjx8nxGh5Q=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=ufKjTUYB2EDNoPofR7vc1V5z2utB1DgO5xzx39ZdDleQ+akXgRAQarqyBdTAvNdwU fUoX/3YAOjc/0ykB8PCQIZuUNrW4es2nDzTeliiBO1GLDC8QSya/R+IVemoN1qWy2E uNrtmVeaXAxwNVKM3cRG8m7+sQhZ4tfi0XoOal+g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221118084244.199909-3-umang.jain@ideasonboard.com> References: <20221118084244.199909-1-umang.jain@ideasonboard.com> <20221118084244.199909-3-umang.jain@ideasonboard.com> Subject: Re: [PATCH v2 2/3] vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use From: Kieran Bingham Cc: Umang Jain To: Broadcom internal kernel review list , Dan Carpenter , Dave Stevenson , Florian Fainelli , Greg Kroah-Hartman , Hans Verkuil , Mauro Carvalho Chehab , Ray Jui , Umang Jain , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev Date: Fri, 18 Nov 2022 10:30:17 +0000 Message-ID: <166876741790.50677.17305359640652054680@Monstersaurus> User-Agent: alot/0.10 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 Quoting Umang Jain (2022-11-18 08:42:43) > 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. This only talks about 7967656ffbfa as I can interpret it. A sentence here describing what we're going to do about it in /this/ patch would be clearer as a second paragraph: """ Convert the remaining bit-field storage for 'in-use' to a bool and use it accordingly. """ But that's trivial and not worth a v3 specifically. (unless anyone applying this wants to add it). Reviewed-by: Kieran Bingham >=20 > Signed-off-by: Umang Jain > --- > drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 6 +++--- > drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/driv= ers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c > index 4abb6178cb9f..294b184d4a49 100644 > --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c > +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c > @@ -1648,7 +1648,7 @@ int vchiq_mmal_component_init(struct vchiq_mmal_ins= tance *instance, > for (idx =3D 0; idx < VCHIQ_MMAL_MAX_COMPONENTS; idx++) { > if (!instance->component[idx].in_use) { > component =3D &instance->component[idx]; > - component->in_use =3D 1; > + component->in_use =3D true; > break; > } > } > @@ -1724,7 +1724,7 @@ int vchiq_mmal_component_init(struct vchiq_mmal_ins= tance *instance, > destroy_component(instance, component); > unlock: > if (component) > - component->in_use =3D 0; > + component->in_use =3D false; > mutex_unlock(&instance->vchiq_mutex); > =20 > return ret; > @@ -1747,7 +1747,7 @@ int vchiq_mmal_component_finalise(struct vchiq_mmal= _instance *instance, > =20 > ret =3D destroy_component(instance, component); > =20 > - component->in_use =3D 0; > + component->in_use =3D false; > =20 > mutex_unlock(&instance->vchiq_mutex); > =20 > diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h b/driv= ers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h > index 6d984cf5a83a..09f030919d4e 100644 > --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h > +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h > @@ -82,7 +82,7 @@ struct vchiq_mmal_port { > }; > =20 > struct vchiq_mmal_component { > - u32 in_use:1; > + bool in_use; > bool enabled; > u32 handle; /* VideoCore handle for component */ > u32 inputs; /* Number of input ports */ > --=20 > 2.38.1 >