Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2328992rwb; Thu, 17 Nov 2022 09:18:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Yh6VL5n5PNbEoaEISfcyYqxIeOcNxBWP2kX7Z9ctxpjOHHx/j3Cv9BB9mFrPLTDluKDv0 X-Received: by 2002:a17:906:6d8a:b0:7ad:69eb:923b with SMTP id h10-20020a1709066d8a00b007ad69eb923bmr3032769ejt.19.1668705535195; Thu, 17 Nov 2022 09:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668705535; cv=none; d=google.com; s=arc-20160816; b=nZb1ntgoQV0xWG0MQTpECohaTmuy5uPYmhNABEyhGGJQSge6WTQr4sUhJDaydbMdR4 mxknbJylpBYyTMVN8ItzaE5myZmphlTlgvrS8KVjaEv1uaOQXNsiufbY79PLTYgxe8Xm 10BPc4zyAsmc85eTPGbOl62BjvJngrw+O5pdVgvmN9H1xtf5Fn1sDYNQM3lAzF8tPl2a KK4l+oPOC6OoT8S4NjVKgHH6Wkf9xFNhcJtWWgpOH7PJlX+mll4Cx+M9WGvT8YIbANzh MwwxcWDSR82DLXQnrxG/XLIc2/48oCohhSn8xu1bI3kJq1nfB8GWcP6whnYU4mQne6lI LebQ== 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=GUNz7TTMUIMF4E6BSbGiGwBYUdF6qsajtUAnqNrx5pY=; b=kgGHsS+0Sx2KiH+AsAoL/dW+pSh/SeH0FYIDiQ7DAXJH/UwhdXEHvz5Sjp2CGPoKxF gGmXUFZEdqPZQYlxjswJNGf750lS4RKRwtd7Kx4R+qi/PvHcuws8h23bp8eGQvNZwvso /ORo49Dn8fDM8k7g6dpWQpR5snlkTQPcHj04hF64kERWstu0On98ig4Q5iwtiwnpZzwa PjCY1VG8AbD1JgX/SDknnZO7lREexB+DPYS3HLPeS5Pow8sbMk4OqK27vHZcAUgK59W9 cwTsa/X5BWWzzZNvHK+u0idoHeaVg4zGuDojKV4ggl4F0Akbx4vy8NTMHNqB4D6cN3Rs TPbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZS6OnxN2; 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 t13-20020a170906178d00b0078356aaeb63si812149eje.288.2022.11.17.09.18.31; Thu, 17 Nov 2022 09:18:55 -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=ZS6OnxN2; 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 S239353AbiKQQJ4 (ORCPT + 92 others); Thu, 17 Nov 2022 11:09:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240102AbiKQQJi (ORCPT ); Thu, 17 Nov 2022 11:09:38 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A86E79906 for ; Thu, 17 Nov 2022 08:09:23 -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 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= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-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-17 16:00:13) > This reverts commit 640e77466e69d9c28de227bc76881f5501f532ca. >=20 > 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. >=20 > 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(-) >=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 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; > =20 > 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; > =20 > /* 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_instance = *instance, > if (!port->enabled) > return 0; > =20 > - port->enabled =3D 0; > + port->enabled =3D false; > =20 > ret =3D 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; > =20 > - port->enabled =3D 1; > + port->enabled =3D true; > =20 > if (port->buffer_cb) { > /* send buffer headers to videocore */ > @@ -1531,7 +1531,7 @@ int vchiq_mmal_port_connect_tunnel(struct vchiq_mma= l_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; > } > =20 > @@ -1799,7 +1799,7 @@ int vchiq_mmal_component_disable(struct vchiq_mmal_= instance *instance, > =20 > ret =3D disable_component(instance, component); > if (ret =3D=3D 0) > - component->enabled =3D 0; > + component->enabled =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 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); > =20 > 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 { > =20 > 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 */ > --=20 > 2.38.1 >