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 3CA3BC433FE for ; Thu, 17 Nov 2022 18:03:57 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iUdyeEgPr4pKzTZluamEDTXvs8uzsrLY3VhWpBMhldo=; b=3jqBY+PMJqmecn tVej3KFMLC1AKJwEcnKBzbPy8zQsogfaRcC5mfI51YPFYJyI929AlCJfw2tN9rYmWhvFJqkhFvEQ7 822SxAzDjXCvLgA3GPrdELhAgsd8mlYNfZm39Yw6ceCOce4Ly25TNY+MtlG0Acuu+AEL3BHTeSgor gWeULx2gAVQDt2NHfJYSLHIhZpuThchifSAO02qIzT1qrRLQMeT7gU0bP5KwbzLC6rXa66uOWMtn1 WmsKC1k20Tjohm7tkUDj93NvbUzmtD0XS53D1n8ejxAKI+klQKQWfOGzdV+u+s292m2+6mSbsmA7U mi/ZT0Rb5dHq1p1WUkjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovjDb-00Gce4-KN; Thu, 17 Nov 2022 18:02:31 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovjDY-00Gccx-IV; Thu, 17 Nov 2022 18:02:30 +0000 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 241EE621C6; 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_100228_709915_3939B1A2 X-CRM114-Status: GOOD ( 24.95 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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_instan= ce *instance, > > > goto release_msg; > > > if (rmsg->u.port_info_get_reply.port.is_enabled =3D=3D 0) > > > - port->enabled =3D 0; > > > + port->enabled =3D false; > > > else > > > - port->enabled =3D 1; > > > + port->enabled =3D true; > > > /* copy the values out of the message */ > > > port->handle =3D rmsg->u.port_info_get_reply.port_handle; > > > @@ -1304,7 +1304,7 @@ static int port_disable(struct vchiq_mmal_insta= nce *instance, > > > if (!port->enabled) > > > return 0; > > > - port->enabled =3D 0; > > > + port->enabled =3D false; > > > ret =3D port_action_port(instance, port, > > > MMAL_MSG_PORT_ACTION_TYPE_DISABLE); > > > @@ -1359,7 +1359,7 @@ static int port_enable(struct vchiq_mmal_instan= ce *instance, > > > if (ret) > > > goto done; > > > - port->enabled =3D 1; > > > + port->enabled =3D 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 =3D 0; > > > + src->connected->enabled =3D false; > > > src->connected =3D NULL; > > > } > > > @@ -1799,7 +1799,7 @@ int vchiq_mmal_component_disable(struct vchiq_m= mal_instance *instance, > > > ret =3D disable_component(instance, component); > > > if (ret =3D=3D 0) > > > - component->enabled =3D 0; > > > + component->enabled =3D 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 log= ic > same (in case 'enabled' gets used directly). Similar pattern come up with: > =A0=A0=A0 ($) 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel