Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp316096rwb; Fri, 18 Nov 2022 01:42:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf5iHv0IUFs9iuJ/sbffQT9vVHMWzbRG7dv2kZjTfvGzzZkLD1sY/+IipfaGyUvf4OYh+6p2 X-Received: by 2002:a17:90b:3d0d:b0:1fd:5b5d:f09d with SMTP id pt13-20020a17090b3d0d00b001fd5b5df09dmr7134912pjb.69.1668764554411; Fri, 18 Nov 2022 01:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668764554; cv=none; d=google.com; s=arc-20160816; b=v8hCAZ/vc0wKZo278nXcEvy/H07XRw1AtSvkLSig0dJxHYKzdfLdyQ63xExQTrgELM uwR2bzJh9tQps235GpMw6RILg4XkLxxD2+arO+1STQ+FrYyaJeeldXKP7bhtYDHIzUXj t19wduOHTvBgIKHYEppAeo2aWhzupJxEbtczasONCcHw9TcLP2PJ40ujEeicR79O3w3+ xNVqGzHwPLG5nyij7AKokRpq0DPTiZrEhIKn2NtMLEFK8S00DZa2GrA0qjDpQkBGkdNi RAqx2+/ZXLqwzcWY2BM3YNOrdIaNoeroSVIjjOXzubAs4kTgIo8L1a6UxCPhNw7xyx8a gsjA== 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=wjmTCjZ4OPQDeC/EQQ+ebYa1WoM4aB7s/Y3boN5iZpU=; b=hBz2bRurvxaqIOXBIafGPIMig0k8llZWi1kwC92mudiqp8vjW9Z31gDhfDnVrVGJX4 xhAd41iBy4hc1Dn8f4llU35U145mCZjfP5An2N+cqhPOj1AXeOa3TTt/m4UnWJyLgHhZ M6jWqYj8Rw6JOKqHvjgeWILZIpOFgQ/P5o5GVuzKZn+hKAxPxKmRXHRB6X2MZPmEMLd8 VEmUn3M8ZI5Mjxh3QiNcZsdjt8f7vVEGH5pDOx2ZUpOaPC/to4NVEY2tF4RyS8+kpZmQ 70l77HxXQeDaiphZMSlU73t4FQD8ZFe5YtW1PbhRME/aUmChtj9Malv8Tqu60z2tu24N xixA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SvuHBB6G; 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 c13-20020a170903234d00b0016da027a727si3843897plh.116.2022.11.18.01.42.00; Fri, 18 Nov 2022 01:42:34 -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=SvuHBB6G; 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 S241539AbiKRInY (ORCPT + 90 others); Fri, 18 Nov 2022 03:43:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241489AbiKRInK (ORCPT ); Fri, 18 Nov 2022 03:43:10 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E5673404 for ; Fri, 18 Nov 2022 00:43:07 -0800 (PST) Received: from ideasonboard.com (unknown [103.251.226.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EBC9BCE1; Fri, 18 Nov 2022 09:43:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668760986; bh=6Phtney9spbBUHdVRM2VGrePUW5l4G22Zp/hlcIOKcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SvuHBB6Gb8xK4U/2WKK92L7uHV4jHTdlWpJ2AhFmEM0Dj3zfnH/eCHCOpODGSO/iD cMY9VLGjJXYs/umwSYu4nyEPfDlVoxu7inLCBG2kCn40/Fn1VpVRdt0w4Za9d7HaIa 89fIIkC5ZKp6sAdXQyw5TiWKVaz+DxV/7COIcOEM= 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 2/3] vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use Date: Fri, 18 Nov 2022 14:12:43 +0530 Message-Id: <20221118084244.199909-3-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 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 --- 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