Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2227044rwb; Thu, 17 Nov 2022 08:05:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf72RMekJdejSgW747QIR3YPIpQAU369+e1JR2YikiuTIhzQSTVJ7FDSU384U9lGzZTnnylR X-Received: by 2002:aa7:854d:0:b0:56d:6e51:60ee with SMTP id y13-20020aa7854d000000b0056d6e5160eemr3580761pfn.25.1668701120191; Thu, 17 Nov 2022 08:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668701120; cv=none; d=google.com; s=arc-20160816; b=KqCRwCmy8Yz+y2pjsgkGZGziC52lz0wRivTWbv1dQ3obYSs0SH0vkHaVtWjhDOIAEP 4XitpLkD15t+NirlIuUhvC+jro0l8xUUYwo8NMw1QH8Rfz4PkaiHvwzJiN662nX3F9PZ MGpQQH1U1YuSaMWQ0VS1qnJs9lXWAXM+clRF8Nv56mRXHgyIBvJ4UhvDYaxNOe8OrNLe 3F0LhzeLnckhAUb4yIpAJSe3De/pzrdKf1TJBEia4ubExj/p9TdoRH7Ad7OysCMqZzXk Plex4xRGKgkLbZX8AfOLhih4MqXNz+T/D/dFaoNAhc8+6wpkiDreY55zp/k7DVQ5mtFh 2dQQ== 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=kUZc1S1W2J8ik4vyJXaCEjM9NVVy7up5J5fBNgoTttU=; b=jo7gyefc52hW0o74nuaqdrvKUxBMSd8wQX0U0xZM7QO34rcPn0b4FDA/RNNgrI8Zfi 9fhW22NJ9LiVfjvrl8mgWIr5cJh0G0owELSmuMJkUuA97l8wMiqA3Jh5z5YZ5zD6uX8Z zCz6x4JgondBLDbEWNJz3k7dEpK5Wf3T7t4F8XKviDVtGfUBilzBmZNP1hOYnmxMxtZz vBii98/7FKSD+ey+MHsyCyEFgWVbhgJXOHKk+G7OvnM5OKfI2zgU3pOZfZ1MPuBaEtE4 ip4/XHQ++XvdRqhdHW7gPAS2mIcq+szWuIYoHTVdvgBpKzlxENd6728vNcflxcCxeYd4 LpHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=GbhODj6i; 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 bw16-20020a056a00409000b0056e8f32463esi1107740pfb.322.2022.11.17.08.05.07; Thu, 17 Nov 2022 08:05:20 -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=GbhODj6i; 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 S240006AbiKQQAq (ORCPT + 92 others); Thu, 17 Nov 2022 11:00:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239654AbiKQQAl (ORCPT ); Thu, 17 Nov 2022 11:00:41 -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 0765913D44 for ; Thu, 17 Nov 2022 08:00:38 -0800 (PST) Received: from ideasonboard.com (unknown [103.251.226.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 03B7D133C; Thu, 17 Nov 2022 17:00:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668700837; bh=JDyW2hzBjXtCPuLRQW6K0nYPrFiaE+Knjz7OMb7YeCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GbhODj6iiGEgRSu9rTpEpm8hgEd04o/j8lstv9znuQDIJM2AvFkXQ2CTme/Xs3UDu SNdRsGlOAahqsWbNNDdRy8FiQHtm7BmLzgT/z2XrDG5b/i1kS9vFj4i08zGGKeBYG3 EnJQbychWK4/Bhx/s1njWyVuUdemz9L2kljwIOjI= 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 2/3] vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use Date: Thu, 17 Nov 2022 21:30:14 +0530 Message-Id: <20221117160015.344528-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221117160015.344528-1-umang.jain@ideasonboard.com> References: <20221117160015.344528-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 70eda6cac1c6..c5be86b0479d 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:1; bool enabled:1; u32 handle; /* VideoCore handle for component */ u32 inputs; /* Number of input ports */ -- 2.38.1