From patchwork Wed Sep 15 20:29:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12497369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C084BC433F5 for ; Wed, 15 Sep 2021 20:31:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 937D461130 for ; Wed, 15 Sep 2021 20:31:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 937D461130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RpicRGT0FrkiEI3SQIkOVHTGGEqQU9/uGTmlSrFbtzM=; b=jBhNzuZkgDjZFm HKuQ+mmLN9OKt1CYRNypGuW+dK3L3Aa/6pTgQrMpSTVnRmkRd87D1p1/MYF2v1fn6B2UO8onO/E/p 7E0tcVwVxeHKzlQ4FqRfO4Nioaky3uUGacH8Upx1icnCFyNQjPuKAggUtopJYrmgj6d+AYFURHWe8 OlNYcHvh6SyBFymEDN/mk5XCvqQfh3k6sIr8sV319UqbwmLP8W4FBPP2wvLMKLv2JhmiAX4vJBzdT vF1WKK3W8bnwjwjGsDxRUnchffjviWSgmJr6T57MrchIu1vpwD/z6Px6Nwf9b+BfUMOZDiIQEa+CX OxFTY0K9RtVPaYQk4+KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQbXQ-009t3C-NZ; Wed, 15 Sep 2021 20:29:48 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQbXE-009szl-4N; Wed, 15 Sep 2021 20:29:37 +0000 Received: by mail-oi1-x22a.google.com with SMTP id w19so5860900oik.10; Wed, 15 Sep 2021 13:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ep/byKh0NuVpkH8Herix4A8TT0fTgaV62jYcvRPVYXQ=; b=B0AlQHDVJjoUjcROJnHXZlQlM0RwJAr4Y+2PzuhDaik1A/rJB9fzhBB0vgw0kN0a+M hVixW9kpfT0gjBVHePMa235S18n4tEFjje0WnWVXOkZmZmc8EKGUpnF/0uSBRk8EJGCq Kxbg34OYV851lA6P2B/D1d0dfAGYYcWyQ4EVdxkXH9g+T34bbna7nNLic/W4iJhmrahl AmEiCdUZFJGMQu1CVrMlUNFBmkgGsuVvL+2nC3Jyg0VuQdpALnXyvzgoh41+rgMSt4Og M7qvTDNGp3ZqiPQqqsBPAkvsKrHtrZyaaNWCIPGTUx5tbXFFFLC2ctsHby8KQQgMEZme R3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ep/byKh0NuVpkH8Herix4A8TT0fTgaV62jYcvRPVYXQ=; b=HIvirAI9NFYLF2PNRYIdKTKuh4/oEQwsQvitUPODaQMuBy3tzw2yB/Jg6I6y2pgWae qxdMOWg1uHzUkKCVFoLREKVNmoTdbbmepd7VzxUy+lQMAEniY13Tbb4ZCiEbImmB1/ia 6k7Ji4OQd8eAK1ewFeTXyuYJy7rfLQuizepRoNcGLRbeMhIYXYtyNoNgNRZFXugn1zSK Y7YN4nh1p4J81KtHzxwt5TT+3G5hBXD9rWywXjwM7Kfpm5j/PyyzUM9A7poHsMLtqTnD 2tFAqf3OhhmSpxCVlXYuHpdPu3IedNMTYqIqnUPQdVL0uc4RrcQz9GFUaoaKro/Qhkd2 SZHg== X-Gm-Message-State: AOAM530leqkUZ7QNU2wdbTiCHBa6T97uw6ce47PJq5ywYK2lLITB/8KL IYVIuDOgx2LdX6DIxSr2mVc= X-Google-Smtp-Source: ABdhPJy/5z2ic5/GvSkn/yyqMCItDM65BJjpu8uzY7UN6I+FKmb85kh0rfgO6j/91CwXtoLz19oTbA== X-Received: by 2002:aca:1917:: with SMTP id l23mr1177025oii.10.1631737774938; Wed, 15 Sep 2021 13:29:34 -0700 (PDT) Received: from debianG.lan ([181.166.206.110]) by smtp.gmail.com with ESMTPSA id l4sm247584oth.4.2021.09.15.13.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 13:29:34 -0700 (PDT) From: Gaston Gonzalez To: linux-staging@lists.linux.dev Cc: gregkh@linuxfoundation.org, nsaenz@kernel.org, stefan.wahren@i2se.com, arnd@arndb.de, dan.carpenter@oracle.com, ojaswin98@gmail.com, amarjargal16@gmail.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, gascoar@gmail.com Subject: [PATCH 2/3] staging: vchiq: add braces to if block Date: Wed, 15 Sep 2021 17:29:15 -0300 Message-Id: <20210915202916.413914-2-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915202916.413914-1-gascoar@gmail.com> References: <20210915202916.413914-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210915_132936_235540_861141F0 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rule of not using braces in single statement does not apply if only one branch of the conditional statement is a single statement. Add braces to fix this. While at it, remove extra blank space after a comment inside the if block. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- .../vc04_services/interface/vchiq_arm/vchiq_connected.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c index f367dbe2bc63..1802fd5e4888 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -34,16 +34,15 @@ void vchiq_add_connected_callback(void (*callback)(void)) if (mutex_lock_killable(&g_connected_mutex)) return; - if (g_connected) + if (g_connected) { /* We're already connected. Call the callback immediately. */ - callback(); - else { - if (g_num_deferred_callbacks >= MAX_CALLBACKS) + } else { + if (g_num_deferred_callbacks >= MAX_CALLBACKS) { vchiq_log_error(vchiq_core_log_level, "There already %d callback registered - please increase MAX_CALLBACKS", g_num_deferred_callbacks); - else { + } else { g_deferred_callback[g_num_deferred_callbacks] = callback; g_num_deferred_callbacks++;