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 954E4C433FE for ; Thu, 17 Nov 2022 16:13:16 +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=F/M6j67vyY+tcgXeEV+pcge6u0PwIptbs+zwDb4ZPRA=; b=luMz8yAS+3DoJb DePB60rutGeHt45P7M3s/5BFdCVf5SDFi1UFu+IXgkFgcJZcvjXFUugjG15S2rTCHo/uMbhCtuPZP xGX6v5vbMtCKw2iRXuvLpq5qrMPBl8zabYn+uNpFsVHWcxO/EQwxsLAKsQdEIen6AxF3vMat2K3AL l5HB+ErYkyBltCzUoApMAXmq3rz6f9+E2hBaqw2f2eTQo5P7tXbXrD2tRK9/Fs2YNRvGdiJazccnU WnT9u85sPJ4OzVtv1tCYg0dT0fhyjg8PKlEnQ8QbVxeba+JpMRI0+AmxtgGAw59QqaPfXlgaTxCEr S0SvESBDEGRcTq0GA8Cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovhUV-00Fl37-Ck; Thu, 17 Nov 2022 16:11:52 +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 1ovhSA-00FjC9-6a; Thu, 17 Nov 2022 16:09:28 +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 BEC1E6E0; Thu, 17 Nov 2022 17:09:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668701361; bh=R2ce9tWma+Atie4HQadciBgFRBacInCmVGhcy28/5dE=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=ZS6OnxN28n4HLEltsrKajXznLU7rQUuW5WRaQePCudwuNg+fEhQsdyZH3XeSKVtvD GoPUGkQB74g7C7Vh/95znm95lt0J2ga/7XuDxJRB55tW16NZ07auzRn2xDQfNPI5eO AQhuJHNLC2wIvDgey53RSW9pAa9vgNMlkt+xbUOE= MIME-Version: 1.0 In-Reply-To: <20221117160015.344528-2-umang.jain@ideasonboard.com> References: <20221117160015.344528-1-umang.jain@ideasonboard.com> <20221117160015.344528-2-umang.jain@ideasonboard.com> Subject: Re: [PATCH 1/3] Revert "staging: mmal-vchiq: Avoid use of bool in structures" 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: Thu, 17 Nov 2022 16:09:19 +0000 Message-ID: <166870135963.50677.14827688186331561108@Monstersaurus> User-Agent: alot/0.10 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_080926_456616_90192799 X-CRM114-Status: GOOD ( 19.01 ) 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-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' ? I would expect this to be bool enabled; > u32 handle; > u32 type; /* port type, cached to use on port info set */ > u32 index; /* port index, cached to use on port info set */ > @@ -83,7 +83,7 @@ struct vchiq_mmal_port { > > struct vchiq_mmal_component { > u32 in_use:1; > - u32 enabled:1; > + bool enabled:1; Same here of course. > u32 handle; /* VideoCore handle for component */ > u32 inputs; /* Number of input ports */ > u32 outputs; /* Number of output ports */ > -- > 2.38.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel