From patchwork Thu Nov 17 16:00:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 21753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp481110wrr; Thu, 17 Nov 2022 08:04:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Vpxgo93ah8ONVwbZSGAH3JUgD2mvjJusvzXSLVnWeKpsUPNbgoU+EU2/jH/3vTdzXh7zC X-Received: by 2002:a17:902:edd0:b0:188:bd82:861a with SMTP id q16-20020a170902edd000b00188bd82861amr3353182plk.56.1668701049919; Thu, 17 Nov 2022 08:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668701049; cv=none; d=google.com; s=arc-20160816; b=Gi1DdCsBVoZaz360dbFmbEJ8+qp8azwUPL5IofWemV25GdOPEtFebu8rSdPyp8Sw87 AbyeGUfCielc4h2I9IWF0Iqj8iU//2SsKXX7f1ywbqoeGx0XLqZGCoo8A/jDdT418Nrg Nv5jMmpYqIonlmzsl4i7YBIMnprjNBl+KFAf0hXQ5tc0yWHPxDbfTRBC5C1ScLA3tYAR uKAmouZOYb19fzYysVSk5YnNxTd+p3A39RUVL1WGmsCFdB/r3/AkU9WdZb5iKLA/1nSR Jo731/1MBo1mRadS0UCWuTZESVbW8Nm7qc4WncHAGW2W4lCyYQ67y/oMbdyeC88+r8QW gpQQ== 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 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.03.31; Thu, 17 Nov 2022 08:04:09 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749759872237727922?= X-GMAIL-MSGID: =?utf-8?q?1749759872237727922?= 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 */