Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp273559rwb; Fri, 18 Nov 2022 00:58:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf4+QwPz83v9jIABuYYvQwu0fxw9mzsiZ1WxqvaiN3N05NqnxhJ+Fp028Ms1BhZWW/TNMXPY X-Received: by 2002:a17:906:7712:b0:78c:895e:2ff9 with SMTP id q18-20020a170906771200b0078c895e2ff9mr5188952ejm.403.1668761934276; Fri, 18 Nov 2022 00:58:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668761934; cv=none; d=google.com; s=arc-20160816; b=ogvvqN2R4hbNvEazbzATidcUe2GUCHrW/UuSSPLv2q0lRYwmmp0cVyrhqAKChxfgDA OFRdzVerZh3ljeUMlSDDHXc4FCKwiELEHYJVpmMPMn2qd9b7fZMldcDUfVj95sh+1VDN xFxYdmAyWVf48ToSxNogoWbjQCoHObBgWaDGufyd1qQIj94qNi40Twk7y9H+vhEKLeVZ cJgRERdxCjLOsOkiPwtOV4G+xr2zuLglFc9/8221lM2voBfu1Me1Y4JQIGdrxK8xv+8q m4aM7cCzLPr0+2tp1Lujd0VMpbsXAHEaySjlFQDBuhTv3HcXR+81AC7VMRRjnW+KvPCa q/bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nf46BIXXdlzbWawqhN+2txVG5TK3ubh7JMpQSZiF53M=; b=IiVRBddPk8huUzOGdnvu7Nvawv0WHED5/871DgMI0Cg5MODybR1QJAqpy5a60iCZFS CLjg3NjuC74GVH1vOz07PuuE/Fb8VL47aKeKAPuqa96l1baFugrtq0obvUU4fgOze0fO rOxIqDiheagq9l3V/+ljhvkWQo6E1H5H5zY7rS3jkiqHX8PhXzVgCZsZm5JTtcpt4oOo AHeFZoqN8kJWelQREGZ/jLQqn+CEr+zId6ttic/STsJSRUT6AiotQsOM4UXLARdVt7ig iRIwgesciwkvjM09UMr9Tv/WwmSV1R0JCXP/tnmnLqFXxrxishxMp9Ni7B2WNa06Z3UW yxZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DHpanySh; 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 x8-20020a05640226c800b00461540620f1si3131494edd.169.2022.11.18.00.58.31; Fri, 18 Nov 2022 00:58:54 -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=DHpanySh; 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 S241364AbiKRInJ (ORCPT + 90 others); Fri, 18 Nov 2022 03:43:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241132AbiKRInE (ORCPT ); Fri, 18 Nov 2022 03:43:04 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F7BE0F7 for ; Fri, 18 Nov 2022 00:43:02 -0800 (PST) Received: from ideasonboard.com (unknown [103.251.226.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 296CACCA; Fri, 18 Nov 2022 09:42:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668760981; bh=iQ68jUqBgEQAwQC2wOa1YQTubJd9hMRa/Dl1/9xvBPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DHpanySh5ExNVFhh5w2sahewHz+aHB5bWT76gVavMrbh2ANZW6V7tJn0DsdvcNEdZ QdFIyN4ofwz2N1NjWAOIleTonFE3rVblXo3AXexUbXoDbxaEkXR9y1LRVPqb1eFaML omm3fI/MXYxxsVUw3IbY4OhOHtGfRU0tkM0KfWrg= From: Umang Jain To: Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Dan Carpenter , Greg Kroah-Hartman , Hans Verkuil , Dave Stevenson , Mauro Carvalho Chehab , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: kieran.bingham@ideasonboard.com, Umang Jain Subject: [PATCH v2 1/3] Revert "staging: mmal-vchiq: Avoid use of bool in structures" Date: Fri, 18 Nov 2022 14:12:42 +0530 Message-Id: <20221118084244.199909-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118084244.199909-1-umang.jain@ideasonboard.com> References: <20221118084244.199909-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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..6d984cf5a83a 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; 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; u32 handle; /* VideoCore handle for component */ u32 inputs; /* Number of input ports */ u32 outputs; /* Number of output ports */ -- 2.38.1