From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A527C4332F for ; Fri, 18 Nov 2022 10:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-ID:Date:To:Cc:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tqQdeBF6143HFU6Fd/IMJpbeJoxCiFfXfZkvL9amIN8=; b=nZLzn2hS6yW2Oo mPDuYqW+NsWo/65Nzmo9KRPg+YHFH2uHFRoFOQRZ7CTaWvSX6wELHPHDCbzRmJM26T+pVCQipC9qw tE3eE6Kbwo58eqXlUfPQIK5xjUSy/BIPnyZjvPSvpaI7+UQ04rLocFlFv3LWr1tRaeztuyHFUdHMr I3rYHYTryAkMlT+eF1fyoBkiPgY7PzA2urooCgHfK/C+jtMsqxwK1k+fOz1tg4wailPDi3Ar8Uxcp R2FQuWBIjgRlwa4Er8QYWE4BZnVgnJtLrLi2GK/j8umyvhdbJ+xacRoD6Ha7FPNSuKfQpA346Up4p f/AipydUam+sG2xIKwAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovydd-003OBt-5o; Fri, 18 Nov 2022 10:30:25 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovyda-003OAq-A9; Fri, 18 Nov 2022 10:30:23 +0000 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= MIME-Version: 1.0 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221118_023022_522343_7F6AF674 X-CRM114-Status: GOOD ( 17.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > > 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(-) > > diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/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_instance *instance, > for (idx = 0; idx < VCHIQ_MMAL_MAX_COMPONENTS; idx++) { > if (!instance->component[idx].in_use) { > component = &instance->component[idx]; > - component->in_use = 1; > + component->in_use = true; > break; > } > } > @@ -1724,7 +1724,7 @@ int vchiq_mmal_component_init(struct vchiq_mmal_instance *instance, > destroy_component(instance, component); > unlock: > if (component) > - component->in_use = 0; > + component->in_use = false; > mutex_unlock(&instance->vchiq_mutex); > > return ret; > @@ -1747,7 +1747,7 @@ int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance, > > ret = destroy_component(instance, component); > > - component->in_use = 0; > + component->in_use = 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 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 { > }; > > 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 */ > -- > 2.38.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel