From patchwork Sun Oct 3 19:57:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AC63C433EF for ; Sun, 3 Oct 2021 20:03:01 +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 19ECE61278 for ; Sun, 3 Oct 2021 20:03:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 19ECE61278 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=klDUEsZ0+gDwHt+GWB38gakbvXW+5nqCaJ+E17IDlHU=; b=AZ9cx/hJndudFN laWO2+m1D6yKs34EFsuMB2Sai1qAJaJyIBQjkL9vZ3WN58QFPTDiFDDXYU8QT8FthQjB3yl4b6C/Y vZYeZBwOe1ksNY9KTGXPiI/E0PJtpR6yRUTzEYsYfF70JT2ILKjYDm+b8TRmWVF2tM1yo+lVcNcZw 8ISirnVvQr/J0pUrTFWq3LbXazTIUuM5rIBBrQxPOYcssGG2Ostzk3WAVkdDHJSH1EHmyutiXM7Tb FKhLt3fr40TDNiF+c5k3eH46je57b5qCxc9MQS3i7GHUYiAIpLSbexPhQiipudp4v2Pn5wpSDNIh8 cH2+x9649CSSHYQKDq5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7f5-004Ns5-PR; Sun, 03 Oct 2021 20:00:39 +0000 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7f1-004NqR-16; Sun, 03 Oct 2021 20:00:36 +0000 Received: by mail-vs1-xe35.google.com with SMTP id o124so17231434vsc.6; Sun, 03 Oct 2021 13:00:27 -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=7TZJXDTQsGNUDbvRjCz8RKRMYb6ELQrEA+DO5zTgBNA=; b=Xem6Lg1b0/aTrHz0hbJGM3loVtZcnOUMJXf/3g28tS48IffCaxi1MVyB09csLYYRD/ 9bOV2VOpccaAhtykLsqneDU8ofwdA1EKWzBNln5c5C1aRMD8Is49jz7kfxiITMugaRQ9 +CLIkYFkG8bjHYEjOC59Y2OP1Txpi06KAkDq2c8pDrxEEuLNGGRu4NCJoeOVM6dz54hE RCaCyaf4X/0KEWofME/Xf84+xe2w8vVNqtDjBykDp81wTtr9QbzdOlxnTYjviOu5tDJM j95l0/CEm8gMEmED5zqTSBp1xGMqykG6SUswRhf5qCVz236YfJqRQZFf5zdDnICc/Czq puJg== 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=7TZJXDTQsGNUDbvRjCz8RKRMYb6ELQrEA+DO5zTgBNA=; b=i0c4vLKlZDJ28WTwKo7Pac62mEP6LkV3nqusyTM7Sh5Xh9Wq4svGyHso9LJo+Uqlsg ORY929qJZ4veza/d0YuasFKKPmxdP1ZtLu/EHh1SUCr8dmfh9n1OVkEmejm2LKeY3F1o VV7Voc4jq2KVGgtt6HlH/ks+E6WPmNxVf6qvSYclspC0ZR+s812HA5DpxgW0ppflaXTI wN3Hv78iOJJ2ZdOv5YltIoNZnZ8E7VKBl3bTwE65yvxA+0CtRMBd3Uflj8+ZNnkaxPwg UPH8m4UUZyhFWlMeS97VAYX9w7iYG6h6+9M9vE6KCx3mVTtCgdLTT5Az3J/p1ZMg37df kz1Q== X-Gm-Message-State: AOAM533OQpml3M9MkqGuIO96j+08TJ4dI+VUgw5riW7bdQ4y/9BPEQQb mZ048XwuANyuozW5XSCj7aI= X-Google-Smtp-Source: ABdhPJw1JjvUugGtOTVTqq7ofJV35mRcutZofY6BZ1Lz2nA6gqxT3W3b1s8PAzGPV0klg+cqGQLjyQ== X-Received: by 2002:a67:c187:: with SMTP id h7mr1634122vsj.29.1633291226351; Sun, 03 Oct 2021 13:00:26 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:00:26 -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 1/9] staging: vchiq_core: cleanup blank lines Date: Sun, 3 Oct 2021 16:57:51 -0300 Message-Id: <20211003195758.36572-2-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130035_094022_51D828CD X-CRM114-Status: GOOD ( 10.04 ) 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 Remove unnecessary blank lines. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 -- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 083abfd8e212..45858607282c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -257,7 +257,6 @@ find_service_by_handle(unsigned int handle) struct vchiq_service * find_service_by_port(struct vchiq_state *state, int localport) { - if ((unsigned int)localport <= VCHIQ_PORT_MAX) { struct vchiq_service *service; @@ -3207,7 +3206,6 @@ enum vchiq_status vchiq_bulk_transfer(unsigned int handle, } state = service->state; - queue = (dir == VCHIQ_BULK_TRANSMIT) ? &service->bulk_tx : &service->bulk_rx; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 3ef4cbe1053c..de1e861c4ed3 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -14,7 +14,6 @@ #include "vchiq_cfg.h" - /* Do this so that we can test-build the code on non-rpi systems */ #if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE) @@ -260,7 +259,6 @@ struct vchiq_service_quota { }; struct vchiq_shared_state { - /* A non-zero value here indicates that the content is valid. */ int initialised; @@ -449,7 +447,6 @@ struct vchiq_config { short version_min; /* The minimum compatible version of VCHIQ */ }; - extern spinlock_t bulk_waiter_spinlock; extern int vchiq_core_log_level; From patchwork Sun Oct 3 19:57:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63C61C433F5 for ; Sun, 3 Oct 2021 20:03:29 +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 2D88D61278 for ; Sun, 3 Oct 2021 20:03:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2D88D61278 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=lV/1oyT6ejTOt2gk1AzWiXWkO6wCyIAqvf384NR/0JU=; b=hDNxg0rYVr2iKF faTXTwiymBGpBf2I59ZRQXPei69mC3+P4lhXTBVVMw1KkkWwD29kaaQdmHVcpQIBTG4MaaUn0b2Yi xBKdHxtl9PYOPWajIIelImVaM9eNLYLw4s8HpTmzaxvE+2rXJc+TNiND8FaR8PN82WLrw0znPt68R 7viIjai1+Ky5zxDX36lT9b4xJi40kZWyERyVu9w0oXB5VSRin/yo8boB6J4/LLwzpNyV/jFSi0Nf+ EjxZ4tGC20RHxouhsmasFuJcx4OVM8ONj/88sTMMdSnpslGvbCI6Vna4ODlggrZks6sdBsj2Js6Ia rM2RI1ySt25PI4M3wVAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fI-004NvA-De; Sun, 03 Oct 2021 20:00:52 +0000 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7f9-004NsR-Gw; Sun, 03 Oct 2021 20:00:48 +0000 Received: by mail-vs1-xe2a.google.com with SMTP id o124so17231773vsc.6; Sun, 03 Oct 2021 13:00:40 -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=4F4iSy2LVLSfioluB+uevFAat67a2AfFnvPkU/8omLA=; b=LSZu81NRdQo4Wx2ubPWSEUvJRGWgMgFOvJAMIgCxxbOUE10sfabb4UMwPYXKRlwwv+ GqKnuCKABAd+J+1/B1Sz1p9aV/N2cG/PpgUSdKKF8fGsB5797kXHKKSnAbaf7juxnfKf Qt3XssKKQA//51+UfGf3/zZrA376b1sy8lixKGkclHc7qdL2o17A4zMZyRPk0LPr51HM A6zAehqYShBA05EbQmMT8GArlYQDHj6j62P9+OdiYvEoJCSrSMIJyyBBKQTlnTD2I+U/ 8xBq5TgnPu/8SfBtHB2zkvgq0/TygVB09Bi0naSX2gUQAFhlOO5JhRehmRS+bUZ1QwV0 Bffg== 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=4F4iSy2LVLSfioluB+uevFAat67a2AfFnvPkU/8omLA=; b=ox0ochWJKQPUhTOZqYALfwfV3Zb6RpMckgLvAgpLzsDfFJ8gRXNkPaZC9TDX2HwX/Y bS62cD2yIHvttmaPANmKyCWyDV5TFgEOh1iiy7lPL350Umtt/f/wGrna7KAii+E1PaBt 5sWsAlKMrCxhpMsW1F9i3ohFHj21UuzT6rklL/ke/JaEf5kR8o22+X1pLOhorJXZthlQ yIxHEDdA+ZnmqB2lsEyW/MCCji0hGwciC93tkXOV6nArVDnym24H3Tx64zZaKkY3HMzY SBTTBas3Qdq75fEamSDevfWBHMxPIGL0ENvRi7ykPqcwfrYqspQcnNVyvnWDqDAwOwRa XNxg== X-Gm-Message-State: AOAM532Ybqy+IdI6F0pQymCXcpvtUZqnOh/rPQeeSP+RZV5wDKU8kBND JSPgaQ28bQjaknZ7lrPmzD4= X-Google-Smtp-Source: ABdhPJyfFJfv+Qu2hcDedxAbLuCnJn0m+QTgQjum0mzj3FBgxTzL2cQR3Luf8D0Rj3GUzbPYxr+JCw== X-Received: by 2002:a05:6102:370c:: with SMTP id s12mr10693445vst.42.1633291239287; Sun, 03 Oct 2021 13:00:39 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:00:38 -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/9] staging: vchiq_core: cleanup code alignment issues Date: Sun, 3 Oct 2021 16:57:53 -0300 Message-Id: <20211003195758.36572-3-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130043_646420_A720C7D0 X-CRM114-Status: GOOD ( 15.76 ) 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 Fix code alignment issues reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- .../interface/vchiq_arm/vchiq_core.c | 715 +++++++----------- .../interface/vchiq_arm/vchiq_core.h | 12 +- 2 files changed, 286 insertions(+), 441 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 45858607282c..e327393800da 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -228,9 +228,9 @@ static inline void vchiq_set_service_state(struct vchiq_service *service, int newstate) { vchiq_log_info(vchiq_core_log_level, "%d: srv:%d %s->%s", - service->state->id, service->localport, - srvstate_names[service->srvstate], - srvstate_names[newstate]); + service->state->id, service->localport, + srvstate_names[service->srvstate], + srvstate_names[newstate]); service->srvstate = newstate; } @@ -276,8 +276,7 @@ find_service_by_port(struct vchiq_state *state, int localport) } struct vchiq_service * -find_service_for_instance(struct vchiq_instance *instance, - unsigned int handle) +find_service_for_instance(struct vchiq_instance *instance, unsigned int handle) { struct vchiq_service *service; @@ -298,8 +297,7 @@ find_service_for_instance(struct vchiq_instance *instance, } struct vchiq_service * -find_closed_service_for_instance(struct vchiq_instance *instance, - unsigned int handle) +find_closed_service_for_instance(struct vchiq_instance *instance, unsigned int handle) { struct vchiq_service *service; @@ -466,14 +464,13 @@ make_service_callback(struct vchiq_service *service, enum vchiq_reason reason, enum vchiq_status status; vchiq_log_trace(vchiq_core_log_level, "%d: callback:%d (%s, %pK, %pK)", - service->state->id, service->localport, reason_names[reason], - header, bulk_userdata); - status = service->base.callback(reason, header, service->handle, - bulk_userdata); + service->state->id, service->localport, reason_names[reason], + header, bulk_userdata); + status = service->base.callback(reason, header, service->handle, bulk_userdata); if (status == VCHIQ_ERROR) { vchiq_log_warning(vchiq_core_log_level, - "%d: ignoring ERROR from callback to service %x", - service->state->id, service->handle); + "%d: ignoring ERROR from callback to service %x", + service->state->id, service->handle); status = VCHIQ_SUCCESS; } @@ -488,9 +485,8 @@ vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate) { enum vchiq_connstate oldstate = state->conn_state; - vchiq_log_info(vchiq_core_log_level, "%d: %s->%s", state->id, - conn_state_names[oldstate], - conn_state_names[newstate]); + vchiq_log_info(vchiq_core_log_level, "%d: %s->%s", state->id, conn_state_names[oldstate], + conn_state_names[newstate]); state->conn_state = newstate; vchiq_platform_conn_state_changed(state, oldstate, newstate); } @@ -693,8 +689,7 @@ reserve_space(struct vchiq_state *state, size_t space, int is_blocking) remote_event_signal(&state->remote->trigger); if (!is_blocking || - (wait_for_completion_interruptible( - &state->slot_available_event))) + (wait_for_completion_interruptible(&state->slot_available_event))) return NULL; /* No space available */ } @@ -739,11 +734,9 @@ process_free_data_message(struct vchiq_state *state, BITSET_T *service_found, complete("a->quota_event); } else if (count == 0) { vchiq_log_error(vchiq_core_log_level, - "service %d message_use_count=%d (header %pK, msgid %x, header->msgid %x, header->size %x)", - port, - quota->message_use_count, - header, msgid, header->msgid, - header->size); + "service %d message_use_count=%d (header %pK, msgid %x, header->msgid %x, header->size %x)", + port, quota->message_use_count, header, msgid, header->msgid, + header->size); WARN(1, "invalid message use count\n"); } if (!BITSET_IS_SET(service_found, port)) { @@ -762,17 +755,12 @@ process_free_data_message(struct vchiq_state *state, BITSET_T *service_found, * it has dropped below its quota */ complete("a->quota_event); - vchiq_log_trace(vchiq_core_log_level, - "%d: pfq:%d %x@%pK - slot_use->%d", - state->id, port, - header->size, header, - count - 1); + vchiq_log_trace(vchiq_core_log_level, "%d: pfq:%d %x@%pK - slot_use->%d", + state->id, port, header->size, header, count - 1); } else { vchiq_log_error(vchiq_core_log_level, "service %d slot_use_count=%d (header %pK, msgid %x, header->msgid %x, header->size %x)", - port, count, header, - msgid, header->msgid, - header->size); + port, count, header, msgid, header->msgid, header->size); WARN(1, "bad slot use count\n"); } } @@ -814,8 +802,8 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found, rmb(); vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%pK %x %x", - state->id, slot_index, data, - local->slot_queue_recycle, slot_queue_available); + state->id, slot_index, data, local->slot_queue_recycle, + slot_queue_available); /* Initialise the bitmask for services which have used this slot */ memset(service_found, 0, length); @@ -836,9 +824,8 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found, pos += calc_stride(header->size); if (pos > VCHIQ_SLOT_SIZE) { vchiq_log_error(vchiq_core_log_level, - "pfq - pos %x: header %pK, msgid %x, header->msgid %x, header->size %x", - pos, header, msgid, header->msgid, - header->size); + "pfq - pos %x: header %pK, msgid %x, header->msgid %x, header->size %x", + pos, header, msgid, header->msgid, header->size); WARN(1, "invalid slot position\n"); } } @@ -967,7 +954,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, * slots */ while ((tx_end_index != state->previous_data_index) && - (state->data_use_count == state->data_quota)) { + (state->data_use_count == state->data_quota)) { VCHIQ_STATS_INC(state, data_stalls); spin_unlock("a_spinlock); mutex_unlock(&state->slot_mutex); @@ -981,7 +968,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, tx_end_index = SLOT_QUEUE_INDEX_FROM_POS( state->local_tx_pos + stride - 1); if ((tx_end_index == state->previous_data_index) || - (state->data_use_count < state->data_quota)) { + (state->data_use_count < state->data_quota)) { /* Pass the signal on to other waiters */ complete(&state->data_quota_event); break; @@ -989,15 +976,13 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, } while ((quota->message_use_count == quota->message_quota) || - ((tx_end_index != quota->previous_tx_index) && + ((tx_end_index != quota->previous_tx_index) && (quota->slot_use_count == quota->slot_quota))) { spin_unlock("a_spinlock); vchiq_log_trace(vchiq_core_log_level, - "%d: qm:%d %s,%zx - quota stall (msg %d, slot %d)", - state->id, service->localport, - msg_type_str(type), size, - quota->message_use_count, - quota->slot_use_count); + "%d: qm:%d %s,%zx - quota stall (msg %d, slot %d)", + state->id, service->localport, msg_type_str(type), size, + quota->message_use_count, quota->slot_use_count); VCHIQ_SERVICE_STATS_INC(service, quota_stalls); mutex_unlock(&state->slot_mutex); if (wait_for_completion_interruptible( @@ -1039,11 +1024,9 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, int tx_end_index; int slot_use_count; - vchiq_log_info(vchiq_core_log_level, - "%d: qm %s@%pK,%zx (%d->%d)", - state->id, msg_type_str(VCHIQ_MSG_TYPE(msgid)), - header, size, VCHIQ_MSG_SRCPORT(msgid), - VCHIQ_MSG_DSTPORT(msgid)); + vchiq_log_info(vchiq_core_log_level, "%d: qm %s@%pK,%zx (%d->%d)", state->id, + msg_type_str(VCHIQ_MSG_TYPE(msgid)), header, size, + VCHIQ_MSG_SRCPORT(msgid), VCHIQ_MSG_DSTPORT(msgid)); WARN_ON(flags & (QMFLAGS_NO_MUTEX_LOCK | QMFLAGS_NO_MUTEX_UNLOCK)); @@ -1096,19 +1079,16 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, if (slot_use_count) vchiq_log_trace(vchiq_core_log_level, - "%d: qm:%d %s,%zx - slot_use->%d (hdr %p)", - state->id, service->localport, - msg_type_str(VCHIQ_MSG_TYPE(msgid)), size, - slot_use_count, header); + "%d: qm:%d %s,%zx - slot_use->%d (hdr %p)", state->id, + service->localport, msg_type_str(VCHIQ_MSG_TYPE(msgid)), + size, slot_use_count, header); VCHIQ_SERVICE_STATS_INC(service, ctrl_tx_count); VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size); } else { - vchiq_log_info(vchiq_core_log_level, - "%d: qm %s@%pK,%zx (%d->%d)", state->id, - msg_type_str(VCHIQ_MSG_TYPE(msgid)), - header, size, VCHIQ_MSG_SRCPORT(msgid), - VCHIQ_MSG_DSTPORT(msgid)); + vchiq_log_info(vchiq_core_log_level, "%d: qm %s@%pK,%zx (%d->%d)", state->id, + msg_type_str(VCHIQ_MSG_TYPE(msgid)), header, size, + VCHIQ_MSG_SRCPORT(msgid), VCHIQ_MSG_DSTPORT(msgid)); if (size != 0) { /* * It is assumed for now that this code path @@ -1137,13 +1117,10 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); vchiq_log_info(SRVTRACE_LEVEL(service), - "Sent Msg %s(%u) to %c%c%c%c s:%u d:%d len:%zu", - msg_type_str(VCHIQ_MSG_TYPE(msgid)), - VCHIQ_MSG_TYPE(msgid), - VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), - VCHIQ_MSG_SRCPORT(msgid), - VCHIQ_MSG_DSTPORT(msgid), - size); + "Sent Msg %s(%u) to %c%c%c%c s:%u d:%d len:%zu", + msg_type_str(VCHIQ_MSG_TYPE(msgid)), VCHIQ_MSG_TYPE(msgid), + VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), VCHIQ_MSG_SRCPORT(msgid), + VCHIQ_MSG_DSTPORT(msgid), size); } /* Make sure the new header is visible to the peer. */ @@ -1193,9 +1170,8 @@ queue_message_sync(struct vchiq_state *state, struct vchiq_service *service, int oldmsgid = header->msgid; if (oldmsgid != VCHIQ_MSGID_PADDING) - vchiq_log_error(vchiq_core_log_level, - "%d: qms - msgid %x, not PADDING", - state->id, oldmsgid); + vchiq_log_error(vchiq_core_log_level, "%d: qms - msgid %x, not PADDING", + state->id, oldmsgid); } vchiq_log_info(vchiq_sync_log_level, @@ -1240,13 +1216,10 @@ queue_message_sync(struct vchiq_state *state, struct vchiq_service *service, : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); vchiq_log_trace(vchiq_sync_log_level, - "Sent Sync Msg %s(%u) to %c%c%c%c s:%u d:%d len:%d", - msg_type_str(VCHIQ_MSG_TYPE(msgid)), - VCHIQ_MSG_TYPE(msgid), - VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), - VCHIQ_MSG_SRCPORT(msgid), - VCHIQ_MSG_DSTPORT(msgid), - size); + "Sent Sync Msg %s(%u) to %c%c%c%c s:%u d:%d len:%d", + msg_type_str(VCHIQ_MSG_TYPE(msgid)), VCHIQ_MSG_TYPE(msgid), + VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), VCHIQ_MSG_SRCPORT(msgid), + VCHIQ_MSG_DSTPORT(msgid), size); } remote_event_signal(&state->remote->sync_trigger); @@ -1272,8 +1245,7 @@ release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info, if (header) { int msgid = header->msgid; - if (((msgid & VCHIQ_MSGID_CLAIMED) == 0) || - (service && service->closing)) { + if (((msgid & VCHIQ_MSGID_CLAIMED) == 0) || (service && service->closing)) { mutex_unlock(&state->recycle_mutex); return; } @@ -1300,10 +1272,9 @@ release_slot(struct vchiq_state *state, struct vchiq_slot_info *slot_info, VCHIQ_SLOT_QUEUE_MASK] = SLOT_INDEX_FROM_INFO(state, slot_info); state->remote->slot_queue_recycle = slot_queue_recycle + 1; - vchiq_log_info(vchiq_core_log_level, - "%d: %s %d - recycle->%x", state->id, __func__, - SLOT_INDEX_FROM_INFO(state, slot_info), - state->remote->slot_queue_recycle); + vchiq_log_info(vchiq_core_log_level, "%d: %s %d - recycle->%x", state->id, __func__, + SLOT_INDEX_FROM_INFO(state, slot_info), + state->remote->slot_queue_recycle); /* * A write barrier is necessary, but remote_event_signal @@ -1338,11 +1309,9 @@ notify_bulks(struct vchiq_service *service, struct vchiq_bulk_queue *queue, { enum vchiq_status status = VCHIQ_SUCCESS; - vchiq_log_trace(vchiq_core_log_level, - "%d: nb:%d %cx - p=%x rn=%x r=%x", - service->state->id, service->localport, - (queue == &service->bulk_tx) ? 't' : 'r', - queue->process, queue->remote_notify, queue->remove); + vchiq_log_trace(vchiq_core_log_level, "%d: nb:%d %cx - p=%x rn=%x r=%x", service->state->id, + service->localport, (queue == &service->bulk_tx) ? 't' : 'r', + queue->process, queue->remote_notify, queue->remove); queue->remote_notify = queue->process; @@ -1357,21 +1326,16 @@ notify_bulks(struct vchiq_service *service, struct vchiq_bulk_queue *queue, if (bulk->data && service->instance) { if (bulk->actual != VCHIQ_BULK_ACTUAL_ABORTED) { if (bulk->dir == VCHIQ_BULK_TRANSMIT) { - VCHIQ_SERVICE_STATS_INC(service, - bulk_tx_count); - VCHIQ_SERVICE_STATS_ADD(service, - bulk_tx_bytes, - bulk->actual); + VCHIQ_SERVICE_STATS_INC(service, bulk_tx_count); + VCHIQ_SERVICE_STATS_ADD(service, bulk_tx_bytes, + bulk->actual); } else { - VCHIQ_SERVICE_STATS_INC(service, - bulk_rx_count); - VCHIQ_SERVICE_STATS_ADD(service, - bulk_rx_bytes, - bulk->actual); + VCHIQ_SERVICE_STATS_INC(service, bulk_rx_count); + VCHIQ_SERVICE_STATS_ADD(service, bulk_rx_bytes, + bulk->actual); } } else { - VCHIQ_SERVICE_STATS_INC(service, - bulk_aborted_count); + VCHIQ_SERVICE_STATS_INC(service, bulk_aborted_count); } if (bulk->mode == VCHIQ_BULK_MODE_BLOCKING) { struct bulk_waiter *waiter; @@ -1386,8 +1350,8 @@ notify_bulks(struct vchiq_service *service, struct vchiq_bulk_queue *queue, } else if (bulk->mode == VCHIQ_BULK_MODE_CALLBACK) { enum vchiq_reason reason = get_bulk_reason(bulk); - status = make_service_callback(service, - reason, NULL, bulk->userdata); + status = make_service_callback(service, reason, NULL, + bulk->userdata); if (status == VCHIQ_RETRY) break; } @@ -1400,9 +1364,8 @@ notify_bulks(struct vchiq_service *service, struct vchiq_bulk_queue *queue, status = VCHIQ_SUCCESS; if (status == VCHIQ_RETRY) - request_poll(service->state, service, - (queue == &service->bulk_tx) ? - VCHIQ_POLL_TXNOTIFY : VCHIQ_POLL_RXNOTIFY); + request_poll(service->state, service, (queue == &service->bulk_tx) ? + VCHIQ_POLL_TXNOTIFY : VCHIQ_POLL_RXNOTIFY); return status; } @@ -1443,15 +1406,10 @@ poll_services_of_group(struct vchiq_state *state, int group) VCHIQ_SUCCESS) request_poll(state, service, VCHIQ_POLL_REMOVE); } else if (service_flags & BIT(VCHIQ_POLL_TERMINATE)) { - vchiq_log_info(vchiq_core_log_level, - "%d: ps - terminate %d<->%d", - state->id, service->localport, - service->remoteport); - if (vchiq_close_service_internal( - service, NO_CLOSE_RECVD) != - VCHIQ_SUCCESS) - request_poll(state, service, - VCHIQ_POLL_TERMINATE); + vchiq_log_info(vchiq_core_log_level, "%d: ps - terminate %d<->%d", + state->id, service->localport, service->remoteport); + if (vchiq_close_service_internal(service, NO_CLOSE_RECVD) != VCHIQ_SUCCESS) + request_poll(state, service, VCHIQ_POLL_TERMINATE); } if (service_flags & BIT(VCHIQ_POLL_TXNOTIFY)) notify_bulks(service, &service->bulk_tx, RETRY_POLL); @@ -1478,18 +1436,16 @@ abort_outstanding_bulks(struct vchiq_service *service, { int is_tx = (queue == &service->bulk_tx); - vchiq_log_trace(vchiq_core_log_level, - "%d: aob:%d %cx - li=%x ri=%x p=%x", - service->state->id, service->localport, is_tx ? 't' : 'r', - queue->local_insert, queue->remote_insert, queue->process); + vchiq_log_trace(vchiq_core_log_level, "%d: aob:%d %cx - li=%x ri=%x p=%x", + service->state->id, service->localport, is_tx ? 't' : 'r', + queue->local_insert, queue->remote_insert, queue->process); WARN_ON((int)(queue->local_insert - queue->process) < 0); WARN_ON((int)(queue->remote_insert - queue->process) < 0); while ((queue->process != queue->local_insert) || - (queue->process != queue->remote_insert)) { - struct vchiq_bulk *bulk = - &queue->bulks[BULK_INDEX(queue->process)]; + (queue->process != queue->remote_insert)) { + struct vchiq_bulk *bulk = &queue->bulks[BULK_INDEX(queue->process)]; if (queue->process == queue->remote_insert) { /* fabricate a matching dummy bulk */ @@ -1502,12 +1458,10 @@ abort_outstanding_bulks(struct vchiq_service *service, vchiq_complete_bulk(bulk); vchiq_log_info(SRVTRACE_LEVEL(service), - "%s %c%c%c%c d:%d ABORTED - tx len:%d, rx len:%d", - is_tx ? "Send Bulk to" : "Recv Bulk from", - VCHIQ_FOURCC_AS_4CHARS(service->base.fourcc), - service->remoteport, - bulk->size, - bulk->remote_size); + "%s %c%c%c%c d:%d ABORTED - tx len:%d, rx len:%d", + is_tx ? "Send Bulk to" : "Recv Bulk from", + VCHIQ_FOURCC_AS_4CHARS(service->base.fourcc), + service->remoteport, bulk->size, bulk->remote_size); } else { /* fabricate a matching dummy bulk */ bulk->data = 0; @@ -1540,10 +1494,8 @@ parse_open(struct vchiq_state *state, struct vchiq_header *header) payload = (struct vchiq_open_payload *)header->data; fourcc = payload->fourcc; - vchiq_log_info(vchiq_core_log_level, - "%d: prs OPEN@%pK (%d->'%c%c%c%c')", - state->id, header, localport, - VCHIQ_FOURCC_AS_4CHARS(fourcc)); + vchiq_log_info(vchiq_core_log_level, "%d: prs OPEN@%pK (%d->'%c%c%c%c')", + state->id, header, localport, VCHIQ_FOURCC_AS_4CHARS(fourcc)); service = get_listening_service(state, fourcc); if (!service) @@ -1553,8 +1505,7 @@ parse_open(struct vchiq_state *state, struct vchiq_header *header) version = payload->version; version_min = payload->version_min; - if ((service->version < version_min) || - (version < service->version_min)) { + if ((service->version < version_min) || (version < service->version_min)) { /* Version mismatch */ vchiq_loud_error_header(); vchiq_loud_error("%d: service %d (%c%c%c%c) " @@ -1583,25 +1534,18 @@ parse_open(struct vchiq_state *state, struct vchiq_header *header) /* Acknowledge the OPEN */ if (service->sync) { - if (queue_message_sync(state, NULL, openack_id, - memcpy_copy_callback, - &ack_payload, - sizeof(ack_payload), - 0) == VCHIQ_RETRY) + if (queue_message_sync(state, NULL, openack_id, memcpy_copy_callback, + &ack_payload, sizeof(ack_payload), 0) == VCHIQ_RETRY) goto bail_not_ready; } else { - if (queue_message(state, NULL, openack_id, - memcpy_copy_callback, - &ack_payload, - sizeof(ack_payload), - 0) == VCHIQ_RETRY) + if (queue_message(state, NULL, openack_id, memcpy_copy_callback, + &ack_payload, sizeof(ack_payload), 0) == VCHIQ_RETRY) goto bail_not_ready; } /* The service is now open */ - vchiq_set_service_state(service, - service->sync ? VCHIQ_SRVSTATE_OPENSYNC - : VCHIQ_SRVSTATE_OPEN); + vchiq_set_service_state(service, service->sync ? VCHIQ_SRVSTATE_OPENSYNC + : VCHIQ_SRVSTATE_OPEN); } /* Success - the message has been dealt with */ @@ -1611,7 +1555,7 @@ parse_open(struct vchiq_state *state, struct vchiq_header *header) fail_open: /* No available service, or an invalid request - send a CLOSE */ if (queue_message(state, NULL, MAKE_CLOSE(0, VCHIQ_MSG_SRCPORT(msgid)), - NULL, NULL, 0, 0) == VCHIQ_RETRY) + NULL, NULL, 0, 0) == VCHIQ_RETRY) goto bail_not_ready; return 1; @@ -1675,22 +1619,19 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) */ if (service) vchiq_service_put(service); - service = get_connected_service(state, - remoteport); + service = get_connected_service(state, remoteport); if (service) vchiq_log_warning(vchiq_core_log_level, - "%d: prs %s@%pK (%d->%d) - found connected service %d", - state->id, msg_type_str(type), - header, remoteport, localport, - service->localport); + "%d: prs %s@%pK (%d->%d) - found connected service %d", + state->id, msg_type_str(type), header, + remoteport, localport, service->localport); } if (!service) { vchiq_log_error(vchiq_core_log_level, - "%d: prs %s@%pK (%d->%d) - invalid/closed service %d", - state->id, msg_type_str(type), - header, remoteport, localport, - localport); + "%d: prs %s@%pK (%d->%d) - invalid/closed service %d", + state->id, msg_type_str(type), header, remoteport, + localport, localport); goto skip_message; } break; @@ -1705,21 +1646,18 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) ? service->base.fourcc : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); vchiq_log_info(SRVTRACE_LEVEL(service), - "Rcvd Msg %s(%u) from %c%c%c%c s:%d d:%d len:%d", - msg_type_str(type), type, - VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), - remoteport, localport, size); + "Rcvd Msg %s(%u) from %c%c%c%c s:%d d:%d len:%d", + msg_type_str(type), type, VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), + remoteport, localport, size); if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, - min(16, size)); + vchiq_log_dump_mem("Rcvd", 0, header->data, min(16, size)); } if (((unsigned long)header & VCHIQ_SLOT_MASK) + calc_stride(size) > VCHIQ_SLOT_SIZE) { vchiq_log_error(vchiq_core_log_level, - "header %pK (msgid %x) - size %x too big for slot", - header, (unsigned int)msgid, - (unsigned int)size); + "header %pK (msgid %x) - size %x too big for slot", + header, (unsigned int)msgid, (unsigned int)size); WARN(1, "oversized for slot\n"); } @@ -1736,66 +1674,55 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) header->data; service->peer_version = payload->version; } - vchiq_log_info(vchiq_core_log_level, - "%d: prs OPENACK@%pK,%x (%d->%d) v:%d", - state->id, header, size, remoteport, localport, - service->peer_version); + vchiq_log_info(vchiq_core_log_level, "%d: prs OPENACK@%pK,%x (%d->%d) v:%d", + state->id, header, size, remoteport, localport, + service->peer_version); if (service->srvstate == VCHIQ_SRVSTATE_OPENING) { service->remoteport = remoteport; - vchiq_set_service_state(service, - VCHIQ_SRVSTATE_OPEN); + vchiq_set_service_state(service, VCHIQ_SRVSTATE_OPEN); complete(&service->remove_event); } else { - vchiq_log_error(vchiq_core_log_level, - "OPENACK received in state %s", - srvstate_names[service->srvstate]); + vchiq_log_error(vchiq_core_log_level, "OPENACK received in state %s", + srvstate_names[service->srvstate]); } break; case VCHIQ_MSG_CLOSE: WARN_ON(size); /* There should be no data */ - vchiq_log_info(vchiq_core_log_level, - "%d: prs CLOSE@%pK (%d->%d)", - state->id, header, remoteport, localport); + vchiq_log_info(vchiq_core_log_level, "%d: prs CLOSE@%pK (%d->%d)", + state->id, header, remoteport, localport); mark_service_closing_internal(service, 1); - if (vchiq_close_service_internal(service, - CLOSE_RECVD) == VCHIQ_RETRY) + if (vchiq_close_service_internal(service, CLOSE_RECVD) == VCHIQ_RETRY) goto bail_not_ready; - vchiq_log_info(vchiq_core_log_level, - "Close Service %c%c%c%c s:%u d:%d", - VCHIQ_FOURCC_AS_4CHARS(service->base.fourcc), - service->localport, - service->remoteport); + vchiq_log_info(vchiq_core_log_level, "Close Service %c%c%c%c s:%u d:%d", + VCHIQ_FOURCC_AS_4CHARS(service->base.fourcc), + service->localport, service->remoteport); break; case VCHIQ_MSG_DATA: - vchiq_log_info(vchiq_core_log_level, - "%d: prs DATA@%pK,%x (%d->%d)", - state->id, header, size, remoteport, localport); + vchiq_log_info(vchiq_core_log_level, "%d: prs DATA@%pK,%x (%d->%d)", + state->id, header, size, remoteport, localport); if ((service->remoteport == remoteport) && (service->srvstate == VCHIQ_SRVSTATE_OPEN)) { header->msgid = msgid | VCHIQ_MSGID_CLAIMED; claim_slot(state->rx_info); DEBUG_TRACE(PARSE_LINE); - if (make_service_callback(service, - VCHIQ_MESSAGE_AVAILABLE, header, - NULL) == VCHIQ_RETRY) { + if (make_service_callback(service, VCHIQ_MESSAGE_AVAILABLE, header, + NULL) == VCHIQ_RETRY) { DEBUG_TRACE(PARSE_LINE); goto bail_not_ready; } VCHIQ_SERVICE_STATS_INC(service, ctrl_rx_count); - VCHIQ_SERVICE_STATS_ADD(service, ctrl_rx_bytes, - size); + VCHIQ_SERVICE_STATS_ADD(service, ctrl_rx_bytes, size); } else { VCHIQ_STATS_INC(state, error_count); } break; case VCHIQ_MSG_CONNECT: - vchiq_log_info(vchiq_core_log_level, - "%d: prs CONNECT@%pK", state->id, header); + vchiq_log_info(vchiq_core_log_level, "%d: prs CONNECT@%pK", state->id, header); state->version_common = ((struct vchiq_slot_zero *) state->slot_data)->version; complete(&state->connect); @@ -1827,11 +1754,10 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) if ((int)(queue->remote_insert - queue->local_insert) >= 0) { vchiq_log_error(vchiq_core_log_level, - "%d: prs %s@%pK (%d->%d) unexpected (ri=%d,li=%d)", - state->id, msg_type_str(type), - header, remoteport, localport, - queue->remote_insert, - queue->local_insert); + "%d: prs %s@%pK (%d->%d) unexpected (ri=%d,li=%d)", + state->id, msg_type_str(type), header, remoteport, + localport, queue->remote_insert, + queue->local_insert); mutex_unlock(&service->bulk_mutex); break; } @@ -1844,24 +1770,18 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) goto bail_not_ready; } - bulk = &queue->bulks[ - BULK_INDEX(queue->remote_insert)]; + bulk = &queue->bulks[BULK_INDEX(queue->remote_insert)]; bulk->actual = *(int *)header->data; queue->remote_insert++; - vchiq_log_info(vchiq_core_log_level, - "%d: prs %s@%pK (%d->%d) %x@%pad", - state->id, msg_type_str(type), - header, remoteport, localport, - bulk->actual, &bulk->data); + vchiq_log_info(vchiq_core_log_level, "%d: prs %s@%pK (%d->%d) %x@%pad", + state->id, msg_type_str(type), header, remoteport, localport, + bulk->actual, &bulk->data); - vchiq_log_trace(vchiq_core_log_level, - "%d: prs:%d %cx li=%x ri=%x p=%x", - state->id, localport, - (type == VCHIQ_MSG_BULK_RX_DONE) ? - 'r' : 't', - queue->local_insert, - queue->remote_insert, queue->process); + vchiq_log_trace(vchiq_core_log_level, "%d: prs:%d %cx li=%x ri=%x p=%x", + state->id, localport, + (type == VCHIQ_MSG_BULK_RX_DONE) ? 'r' : 't', + queue->local_insert, queue->remote_insert, queue->process); DEBUG_TRACE(PARSE_LINE); WARN_ON(queue->process == queue->local_insert); @@ -1874,35 +1794,30 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) } break; case VCHIQ_MSG_PADDING: - vchiq_log_trace(vchiq_core_log_level, - "%d: prs PADDING@%pK,%x", - state->id, header, size); + vchiq_log_trace(vchiq_core_log_level, "%d: prs PADDING@%pK,%x", + state->id, header, size); break; case VCHIQ_MSG_PAUSE: /* If initiated, signal the application thread */ - vchiq_log_trace(vchiq_core_log_level, - "%d: prs PAUSE@%pK,%x", - state->id, header, size); + vchiq_log_trace(vchiq_core_log_level, "%d: prs PAUSE@%pK,%x", + state->id, header, size); if (state->conn_state == VCHIQ_CONNSTATE_PAUSED) { - vchiq_log_error(vchiq_core_log_level, - "%d: PAUSE received in state PAUSED", - state->id); + vchiq_log_error(vchiq_core_log_level, "%d: PAUSE received in state PAUSED", + state->id); break; } if (state->conn_state != VCHIQ_CONNSTATE_PAUSE_SENT) { /* Send a PAUSE in response */ - if (queue_message(state, NULL, MAKE_PAUSE, - NULL, NULL, 0, QMFLAGS_NO_MUTEX_UNLOCK) - == VCHIQ_RETRY) + if (queue_message(state, NULL, MAKE_PAUSE, NULL, NULL, 0, + QMFLAGS_NO_MUTEX_UNLOCK) == VCHIQ_RETRY) goto bail_not_ready; } /* At this point slot_mutex is held */ vchiq_set_conn_state(state, VCHIQ_CONNSTATE_PAUSED); break; case VCHIQ_MSG_RESUME: - vchiq_log_trace(vchiq_core_log_level, - "%d: prs RESUME@%pK,%x", - state->id, header, size); + vchiq_log_trace(vchiq_core_log_level, "%d: prs RESUME@%pK,%x", + state->id, header, size); /* Release the slot mutex */ mutex_unlock(&state->slot_mutex); vchiq_set_conn_state(state, VCHIQ_CONNSTATE_CONNECTED); @@ -1918,9 +1833,8 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) break; default: - vchiq_log_error(vchiq_core_log_level, - "%d: prs invalid msgid %x@%pK,%x", - state->id, msgid, header, size); + vchiq_log_error(vchiq_core_log_level, "%d: prs invalid msgid %x@%pK,%x", + state->id, msgid, header, size); WARN(1, "invalid message\n"); break; } @@ -2030,8 +1944,7 @@ handle_poll(struct vchiq_state *state) * since the PAUSE should have flushed * through outstanding messages. */ - vchiq_log_error(vchiq_core_log_level, - "Failed to send RESUME message"); + vchiq_log_error(vchiq_core_log_level, "Failed to send RESUME message"); } break; default: @@ -2129,9 +2042,9 @@ sync_func(void *v) if (!service) { vchiq_log_error(vchiq_sync_log_level, - "%d: sf %s@%pK (%d->%d) - invalid/closed service %d", - state->id, msg_type_str(type), - header, remoteport, localport, localport); + "%d: sf %s@%pK (%d->%d) - invalid/closed service %d", + state->id, msg_type_str(type), header, + remoteport, localport, localport); release_message_sync(state, header); continue; } @@ -2143,13 +2056,11 @@ sync_func(void *v) ? service->base.fourcc : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); vchiq_log_trace(vchiq_sync_log_level, - "Rcvd Msg %s from %c%c%c%c s:%d d:%d len:%d", - msg_type_str(type), - VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), - remoteport, localport, size); + "Rcvd Msg %s from %c%c%c%c s:%d d:%d len:%d", + msg_type_str(type), VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), + remoteport, localport, size); if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, - min(16, size)); + vchiq_log_dump_mem("Rcvd", 0, header->data, min(16, size)); } switch (type) { @@ -2160,14 +2071,12 @@ sync_func(void *v) header->data; service->peer_version = payload->version; } - vchiq_log_info(vchiq_sync_log_level, - "%d: sf OPENACK@%pK,%x (%d->%d) v:%d", - state->id, header, size, remoteport, localport, - service->peer_version); + vchiq_log_info(vchiq_sync_log_level, "%d: sf OPENACK@%pK,%x (%d->%d) v:%d", + state->id, header, size, remoteport, localport, + service->peer_version); if (service->srvstate == VCHIQ_SRVSTATE_OPENING) { service->remoteport = remoteport; - vchiq_set_service_state(service, - VCHIQ_SRVSTATE_OPENSYNC); + vchiq_set_service_state(service, VCHIQ_SRVSTATE_OPENSYNC); service->sync = 1; complete(&service->remove_event); } @@ -2175,25 +2084,22 @@ sync_func(void *v) break; case VCHIQ_MSG_DATA: - vchiq_log_trace(vchiq_sync_log_level, - "%d: sf DATA@%pK,%x (%d->%d)", - state->id, header, size, remoteport, localport); + vchiq_log_trace(vchiq_sync_log_level, "%d: sf DATA@%pK,%x (%d->%d)", + state->id, header, size, remoteport, localport); if ((service->remoteport == remoteport) && (service->srvstate == VCHIQ_SRVSTATE_OPENSYNC)) { - if (make_service_callback(service, - VCHIQ_MESSAGE_AVAILABLE, header, - NULL) == VCHIQ_RETRY) + if (make_service_callback(service, VCHIQ_MESSAGE_AVAILABLE, header, + NULL) == VCHIQ_RETRY) vchiq_log_error(vchiq_sync_log_level, - "synchronous callback to service %d returns VCHIQ_RETRY", - localport); + "synchronous callback to service %d returns VCHIQ_RETRY", + localport); } break; default: - vchiq_log_error(vchiq_sync_log_level, - "%d: sf unexpected msgid %x@%pK,%x", - state->id, msgid, header, size); + vchiq_log_error(vchiq_sync_log_level, "%d: sf unexpected msgid %x@%pK,%x", + state->id, msgid, header, size); release_message_sync(state, header); break; } @@ -2236,9 +2142,8 @@ vchiq_init_slots(void *mem_base, int mem_size) num_slots -= first_data_slot; if (num_slots < 4) { - vchiq_log_error(vchiq_core_log_level, - "%s - insufficient memory %x bytes", - __func__, mem_size); + vchiq_log_error(vchiq_core_log_level, "%s - insufficient memory %x bytes", + __func__, mem_size); return NULL; } @@ -2329,7 +2234,7 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero) state->default_slot_quota = state->slot_queue_available / 2; state->default_message_quota = min((unsigned short)(state->default_slot_quota * 256), - (unsigned short)~0); + (unsigned short)~0); state->previous_data_index = -1; state->data_use_count = 0; @@ -2358,9 +2263,7 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero) * bring up slot handler thread */ snprintf(threadname, sizeof(threadname), "vchiq-slot/%d", state->id); - state->slot_handler_thread = kthread_create(&slot_handler_func, - (void *)state, - threadname); + state->slot_handler_thread = kthread_create(&slot_handler_func, (void *)state, threadname); if (IS_ERR(state->slot_handler_thread)) { vchiq_loud_error_header(); @@ -2371,9 +2274,7 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero) set_user_nice(state->slot_handler_thread, -19); snprintf(threadname, sizeof(threadname), "vchiq-recy/%d", state->id); - state->recycle_thread = kthread_create(&recycle_func, - (void *)state, - threadname); + state->recycle_thread = kthread_create(&recycle_func, (void *)state, threadname); if (IS_ERR(state->recycle_thread)) { vchiq_loud_error_header(); vchiq_loud_error("couldn't create thread %s", threadname); @@ -2384,9 +2285,7 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero) set_user_nice(state->recycle_thread, -19); snprintf(threadname, sizeof(threadname), "vchiq-sync/%d", state->id); - state->sync_thread = kthread_create(&sync_func, - (void *)state, - threadname); + state->sync_thread = kthread_create(&sync_func, (void *)state, threadname); if (IS_ERR(state->sync_thread)) { vchiq_loud_error_header(); vchiq_loud_error("couldn't create thread %s", threadname); @@ -2602,12 +2501,9 @@ vchiq_add_service_internal(struct vchiq_state *state, /* Bring this service online */ vchiq_set_service_state(service, srvstate); - vchiq_log_info(vchiq_core_msg_log_level, - "%s Service %c%c%c%c SrcPort:%d", - (srvstate == VCHIQ_SRVSTATE_OPENING) - ? "Open" : "Add", - VCHIQ_FOURCC_AS_4CHARS(params->fourcc), - service->localport); + vchiq_log_info(vchiq_core_msg_log_level, "%s Service %c%c%c%c SrcPort:%d", + (srvstate == VCHIQ_SRVSTATE_OPENING) ? "Open" : "Add", + VCHIQ_FOURCC_AS_4CHARS(params->fourcc), service->localport); /* Don't unlock the service - leave it with a ref_count of 1. */ @@ -2702,19 +2598,15 @@ release_service_messages(struct vchiq_service *service) int msgid = header->msgid; int port = VCHIQ_MSG_DSTPORT(msgid); - if ((port == service->localport) && - (msgid & VCHIQ_MSGID_CLAIMED)) { - vchiq_log_info(vchiq_core_log_level, - " fsi - hdr %pK", header); - release_slot(state, slot_info, header, - NULL); + if ((port == service->localport) && (msgid & VCHIQ_MSGID_CLAIMED)) { + vchiq_log_info(vchiq_core_log_level, " fsi - hdr %pK", header); + release_slot(state, slot_info, header, NULL); } pos += calc_stride(header->size); if (pos > VCHIQ_SLOT_SIZE) { vchiq_log_error(vchiq_core_log_level, - "fsi - pos %x: header %pK, msgid %x, header->msgid %x, header->size %x", - pos, header, msgid, - header->msgid, header->size); + "fsi - pos %x: header %pK, msgid %x, header->msgid %x, header->size %x", + pos, header, msgid, header->msgid, header->size); WARN(1, "invalid slot position\n"); } } @@ -2768,15 +2660,13 @@ close_service_complete(struct vchiq_service *service, int failstate) case VCHIQ_SRVSTATE_LISTENING: break; default: - vchiq_log_error(vchiq_core_log_level, - "%s(%x) called in state %s", __func__, - service->handle, srvstate_names[service->srvstate]); + vchiq_log_error(vchiq_core_log_level, "%s(%x) called in state %s", __func__, + service->handle, srvstate_names[service->srvstate]); WARN(1, "%s in unexpected state\n", __func__); return VCHIQ_ERROR; } - status = make_service_callback(service, - VCHIQ_SERVICE_CLOSED, NULL, NULL); + status = make_service_callback(service, VCHIQ_SERVICE_CLOSED, NULL, NULL); if (status != VCHIQ_RETRY) { int uc = service->service_use_count; @@ -2817,9 +2707,8 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) int close_id = MAKE_CLOSE(service->localport, VCHIQ_MSG_DSTPORT(service->remoteport)); - vchiq_log_info(vchiq_core_log_level, "%d: csi:%d,%d (%s)", - service->state->id, service->localport, close_recvd, - srvstate_names[service->srvstate]); + vchiq_log_info(vchiq_core_log_level, "%d: csi:%d,%d (%s)", service->state->id, + service->localport, close_recvd, srvstate_names[service->srvstate]); switch (service->srvstate) { case VCHIQ_SRVSTATE_CLOSED: @@ -2827,9 +2716,8 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) case VCHIQ_SRVSTATE_LISTENING: case VCHIQ_SRVSTATE_CLOSEWAIT: if (close_recvd) { - vchiq_log_error(vchiq_core_log_level, - "%s(1) called in state %s", - __func__, srvstate_names[service->srvstate]); + vchiq_log_error(vchiq_core_log_level, "%s(1) called in state %s", + __func__, srvstate_names[service->srvstate]); } else if (is_server) { if (service->srvstate == VCHIQ_SRVSTATE_LISTENING) { status = VCHIQ_ERROR; @@ -2838,8 +2726,7 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) service->remoteport = VCHIQ_PORT_FREE; if (service->srvstate == VCHIQ_SRVSTATE_CLOSEWAIT) - vchiq_set_service_state(service, - VCHIQ_SRVSTATE_LISTENING); + vchiq_set_service_state(service, VCHIQ_SRVSTATE_LISTENING); } complete(&service->remove_event); } else { @@ -2849,13 +2736,11 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) case VCHIQ_SRVSTATE_OPENING: if (close_recvd) { /* The open was rejected - tell the user */ - vchiq_set_service_state(service, - VCHIQ_SRVSTATE_CLOSEWAIT); + vchiq_set_service_state(service, VCHIQ_SRVSTATE_CLOSEWAIT); complete(&service->remove_event); } else { /* Shutdown mid-open - let the other side know */ - status = queue_message(state, service, close_id, - NULL, NULL, 0, 0); + status = queue_message(state, service, close_id, NULL, NULL, 0, 0); } break; @@ -2871,8 +2756,8 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) release_service_messages(service); if (status == VCHIQ_SUCCESS) - status = queue_message(state, service, close_id, - NULL, NULL, 0, QMFLAGS_NO_MUTEX_UNLOCK); + status = queue_message(state, service, close_id, NULL, + NULL, 0, QMFLAGS_NO_MUTEX_UNLOCK); if (status != VCHIQ_SUCCESS) { if (service->srvstate == VCHIQ_SRVSTATE_OPENSYNC) @@ -2896,8 +2781,7 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) if (service->sync) mutex_unlock(&state->sync_mutex); - status = close_service_complete(service, - VCHIQ_SRVSTATE_CLOSERECVD); + status = close_service_complete(service, VCHIQ_SRVSTATE_CLOSERECVD); break; case VCHIQ_SRVSTATE_CLOSESENT: @@ -2911,23 +2795,19 @@ vchiq_close_service_internal(struct vchiq_service *service, int close_recvd) } if (status == VCHIQ_SUCCESS) - status = close_service_complete(service, - VCHIQ_SRVSTATE_CLOSERECVD); + status = close_service_complete(service, VCHIQ_SRVSTATE_CLOSERECVD); break; case VCHIQ_SRVSTATE_CLOSERECVD: if (!close_recvd && is_server) /* Force into LISTENING mode */ - vchiq_set_service_state(service, - VCHIQ_SRVSTATE_LISTENING); - status = close_service_complete(service, - VCHIQ_SRVSTATE_CLOSERECVD); + vchiq_set_service_state(service, VCHIQ_SRVSTATE_LISTENING); + status = close_service_complete(service, VCHIQ_SRVSTATE_CLOSERECVD); break; default: - vchiq_log_error(vchiq_core_log_level, - "%s(%d) called in state %s", __func__, - close_recvd, srvstate_names[service->srvstate]); + vchiq_log_error(vchiq_core_log_level, "%s(%d) called in state %s", __func__, + close_recvd, srvstate_names[service->srvstate]); break; } @@ -2940,8 +2820,8 @@ vchiq_terminate_service_internal(struct vchiq_service *service) { struct vchiq_state *state = service->state; - vchiq_log_info(vchiq_core_log_level, "%d: tsi - (%d<->%d)", - state->id, service->localport, service->remoteport); + vchiq_log_info(vchiq_core_log_level, "%d: tsi - (%d<->%d)", state->id, + service->localport, service->remoteport); mark_service_closing(service); @@ -2955,8 +2835,7 @@ vchiq_free_service_internal(struct vchiq_service *service) { struct vchiq_state *state = service->state; - vchiq_log_info(vchiq_core_log_level, "%d: fsi - (%d)", - state->id, service->localport); + vchiq_log_info(vchiq_core_log_level, "%d: fsi - (%d)", state->id, service->localport); switch (service->srvstate) { case VCHIQ_SRVSTATE_OPENING: @@ -2966,10 +2845,8 @@ vchiq_free_service_internal(struct vchiq_service *service) case VCHIQ_SRVSTATE_CLOSEWAIT: break; default: - vchiq_log_error(vchiq_core_log_level, - "%d: fsi - (%d) in state %s", - state->id, service->localport, - srvstate_names[service->srvstate]); + vchiq_log_error(vchiq_core_log_level, "%d: fsi - (%d) in state %s", state->id, + service->localport, srvstate_names[service->srvstate]); return; } @@ -2989,17 +2866,15 @@ vchiq_connect_internal(struct vchiq_state *state, struct vchiq_instance *instanc /* Find all services registered to this client and enable them. */ i = 0; - while ((service = next_service_by_instance(state, instance, - &i)) != NULL) { + while ((service = next_service_by_instance(state, instance, &i)) != NULL) { if (service->srvstate == VCHIQ_SRVSTATE_HIDDEN) - vchiq_set_service_state(service, - VCHIQ_SRVSTATE_LISTENING); + vchiq_set_service_state(service, VCHIQ_SRVSTATE_LISTENING); vchiq_service_put(service); } if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED) { - if (queue_message(state, NULL, MAKE_CONNECT, NULL, NULL, - 0, QMFLAGS_IS_BLOCKING) == VCHIQ_RETRY) + if (queue_message(state, NULL, MAKE_CONNECT, NULL, NULL, 0, + QMFLAGS_IS_BLOCKING) == VCHIQ_RETRY) return VCHIQ_RETRY; vchiq_set_conn_state(state, VCHIQ_CONNSTATE_CONNECTING); @@ -3024,8 +2899,7 @@ vchiq_shutdown_internal(struct vchiq_state *state, struct vchiq_instance *instan /* Find all services registered to this client and remove them. */ i = 0; - while ((service = next_service_by_instance(state, instance, - &i)) != NULL) { + while ((service = next_service_by_instance(state, instance, &i)) != NULL) { (void)vchiq_remove_service(service->handle); vchiq_service_put(service); } @@ -3041,9 +2915,8 @@ vchiq_close_service(unsigned int handle) if (!service) return VCHIQ_ERROR; - vchiq_log_info(vchiq_core_log_level, - "%d: close_service:%d", - service->state->id, service->localport); + vchiq_log_info(vchiq_core_log_level, "%d: close_service:%d", + service->state->id, service->localport); if ((service->srvstate == VCHIQ_SRVSTATE_FREE) || (service->srvstate == VCHIQ_SRVSTATE_LISTENING) || @@ -3074,9 +2947,9 @@ vchiq_close_service(unsigned int handle) break; vchiq_log_warning(vchiq_core_log_level, - "%d: close_service:%d - waiting in state %s", - service->state->id, service->localport, - srvstate_names[service->srvstate]); + "%d: close_service:%d - waiting in state %s", + service->state->id, service->localport, + srvstate_names[service->srvstate]); } if ((status == VCHIQ_SUCCESS) && @@ -3100,9 +2973,8 @@ vchiq_remove_service(unsigned int handle) if (!service) return VCHIQ_ERROR; - vchiq_log_info(vchiq_core_log_level, - "%d: remove_service:%d", - service->state->id, service->localport); + vchiq_log_info(vchiq_core_log_level, "%d: remove_service:%d", + service->state->id, service->localport); if (service->srvstate == VCHIQ_SRVSTATE_FREE) { vchiq_service_put(service); @@ -3136,9 +3008,9 @@ vchiq_remove_service(unsigned int handle) break; vchiq_log_warning(vchiq_core_log_level, - "%d: remove_service:%d - waiting in state %s", - service->state->id, service->localport, - srvstate_names[service->srvstate]); + "%d: remove_service:%d - waiting in state %s", + service->state->id, service->localport, + srvstate_names[service->srvstate]); } if ((status == VCHIQ_SUCCESS) && @@ -3158,11 +3030,9 @@ vchiq_remove_service(unsigned int handle) * When called in blocking mode, the userdata field points to a bulk_waiter * structure. */ -enum vchiq_status vchiq_bulk_transfer(unsigned int handle, - void *offset, void __user *uoffset, - int size, void *userdata, - enum vchiq_bulk_mode mode, - enum vchiq_bulk_dir dir) +enum vchiq_status vchiq_bulk_transfer(unsigned int handle, void *offset, void __user *uoffset, + int size, void *userdata, enum vchiq_bulk_mode mode, + enum vchiq_bulk_dir dir) { struct vchiq_service *service = find_service_by_handle(handle); struct vchiq_bulk_queue *queue; @@ -3244,10 +3114,9 @@ enum vchiq_status vchiq_bulk_transfer(unsigned int handle, wmb(); - vchiq_log_info(vchiq_core_log_level, - "%d: bt (%d->%d) %cx %x@%pad %pK", - state->id, service->localport, service->remoteport, dir_char, - size, &bulk->data, userdata); + vchiq_log_info(vchiq_core_log_level, "%d: bt (%d->%d) %cx %x@%pad %pK", + state->id, service->localport, service->remoteport, + dir_char, size, &bulk->data, userdata); /* * The slot mutex must be held when the service is being closed, so @@ -3282,11 +3151,9 @@ enum vchiq_status vchiq_bulk_transfer(unsigned int handle, mutex_unlock(&state->slot_mutex); mutex_unlock(&service->bulk_mutex); - vchiq_log_trace(vchiq_core_log_level, - "%d: bt:%d %cx li=%x ri=%x p=%x", - state->id, - service->localport, dir_char, - queue->local_insert, queue->remote_insert, queue->process); + vchiq_log_trace(vchiq_core_log_level, "%d: bt:%d %cx li=%x ri=%x p=%x", + state->id, service->localport, dir_char, queue->local_insert, + queue->remote_insert, queue->process); waiting: vchiq_service_put(service); @@ -3349,11 +3216,11 @@ vchiq_queue_message(unsigned int handle, switch (service->srvstate) { case VCHIQ_SRVSTATE_OPEN: status = queue_message(service->state, service, data_id, - copy_callback, context, size, 1); + copy_callback, context, size, 1); break; case VCHIQ_SRVSTATE_OPENSYNC: status = queue_message_sync(service->state, service, data_id, - copy_callback, context, size, 1); + copy_callback, context, size, 1); break; default: status = VCHIQ_ERROR; @@ -3468,8 +3335,7 @@ void vchiq_get_config(struct vchiq_config *config) } int -vchiq_set_service_option(unsigned int handle, - enum vchiq_service_option option, int value) +vchiq_set_service_option(unsigned int handle, enum vchiq_service_option option, int value) { struct vchiq_service *service = find_service_by_handle(handle); struct vchiq_service_quota *quota; @@ -3563,16 +3429,14 @@ vchiq_dump_shared_state(void *dump_context, struct vchiq_state *state, int len; int err; - len = scnprintf(buf, sizeof(buf), - " %s: slots %d-%d tx_pos=%x recycle=%x", - label, shared->slot_first, shared->slot_last, - shared->tx_pos, shared->slot_queue_recycle); + len = scnprintf(buf, sizeof(buf), " %s: slots %d-%d tx_pos=%x recycle=%x", + label, shared->slot_first, shared->slot_last, + shared->tx_pos, shared->slot_queue_recycle); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; - len = scnprintf(buf, sizeof(buf), - " Slots claimed:"); + len = scnprintf(buf, sizeof(buf), " Slots claimed:"); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; @@ -3581,9 +3445,8 @@ vchiq_dump_shared_state(void *dump_context, struct vchiq_state *state, struct vchiq_slot_info slot_info = *SLOT_INFO_FROM_INDEX(state, i); if (slot_info.use_count != slot_info.release_count) { - len = scnprintf(buf, sizeof(buf), - " %d: %d/%d", i, slot_info.use_count, - slot_info.release_count); + len = scnprintf(buf, sizeof(buf), " %d: %d/%d", i, slot_info.use_count, + slot_info.release_count); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; @@ -3592,7 +3455,7 @@ vchiq_dump_shared_state(void *dump_context, struct vchiq_state *state, for (i = 1; i < shared->debug[DEBUG_ENTRIES]; i++) { len = scnprintf(buf, sizeof(buf), " DEBUG: %s = %d(%x)", - debug_names[i], shared->debug[i], shared->debug[i]); + debug_names[i], shared->debug[i], shared->debug[i]); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; @@ -3608,45 +3471,43 @@ int vchiq_dump_state(void *dump_context, struct vchiq_state *state) int err; len = scnprintf(buf, sizeof(buf), "State %d: %s", state->id, - conn_state_names[state->conn_state]); + conn_state_names[state->conn_state]); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; - len = scnprintf(buf, sizeof(buf), - " tx_pos=%x(@%pK), rx_pos=%x(@%pK)", - state->local->tx_pos, - state->tx_data + (state->local_tx_pos & VCHIQ_SLOT_MASK), - state->rx_pos, - state->rx_data + (state->rx_pos & VCHIQ_SLOT_MASK)); + len = scnprintf(buf, sizeof(buf), " tx_pos=%x(@%pK), rx_pos=%x(@%pK)", + state->local->tx_pos, + state->tx_data + (state->local_tx_pos & VCHIQ_SLOT_MASK), + state->rx_pos, + state->rx_data + (state->rx_pos & VCHIQ_SLOT_MASK)); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; - len = scnprintf(buf, sizeof(buf), - " Version: %d (min %d)", - VCHIQ_VERSION, VCHIQ_VERSION_MIN); + len = scnprintf(buf, sizeof(buf), " Version: %d (min %d)", + VCHIQ_VERSION, VCHIQ_VERSION_MIN); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; if (VCHIQ_ENABLE_STATS) { len = scnprintf(buf, sizeof(buf), - " Stats: ctrl_tx_count=%d, ctrl_rx_count=%d, error_count=%d", - state->stats.ctrl_tx_count, state->stats.ctrl_rx_count, - state->stats.error_count); + " Stats: ctrl_tx_count=%d, ctrl_rx_count=%d, error_count=%d", + state->stats.ctrl_tx_count, state->stats.ctrl_rx_count, + state->stats.error_count); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; } len = scnprintf(buf, sizeof(buf), - " Slots: %d available (%d data), %d recyclable, %d stalls (%d data)", - ((state->slot_queue_available * VCHIQ_SLOT_SIZE) - + " Slots: %d available (%d data), %d recyclable, %d stalls (%d data)", + ((state->slot_queue_available * VCHIQ_SLOT_SIZE) - state->local_tx_pos) / VCHIQ_SLOT_SIZE, - state->data_quota - state->data_use_count, - state->local->slot_queue_recycle - state->slot_queue_available, - state->stats.slot_stalls, state->stats.data_stalls); + state->data_quota - state->data_use_count, + state->local->slot_queue_recycle - state->slot_queue_available, + state->stats.slot_stalls, state->stats.data_stalls); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; @@ -3710,21 +3571,17 @@ int vchiq_dump_service_state(void *dump_context, struct vchiq_service *service) "%u", service->remoteport); if (service->public_fourcc != VCHIQ_FOURCC_INVALID) - scnprintf(remoteport + len2, - sizeof(remoteport) - len2, - " (client %x)", service->client_id); + scnprintf(remoteport + len2, sizeof(remoteport) - len2, + " (client %x)", service->client_id); } else { strscpy(remoteport, "n/a", sizeof(remoteport)); } len += scnprintf(buf + len, sizeof(buf) - len, - " '%c%c%c%c' remote %s (msg use %d/%d, slot use %d/%d)", - VCHIQ_FOURCC_AS_4CHARS(fourcc), - remoteport, - quota->message_use_count, - quota->message_quota, - quota->slot_use_count, - quota->slot_quota); + " '%c%c%c%c' remote %s (msg use %d/%d, slot use %d/%d)", + VCHIQ_FOURCC_AS_4CHARS(fourcc), remoteport, + quota->message_use_count, quota->message_quota, + quota->slot_use_count, quota->slot_quota); err = vchiq_dump(dump_context, buf, len + 1); if (err) @@ -3737,13 +3594,13 @@ int vchiq_dump_service_state(void *dump_context, struct vchiq_service *service) service->bulk_rx.remote_insert; len = scnprintf(buf, sizeof(buf), - " Bulk: tx_pending=%d (size %d), rx_pending=%d (size %d)", - tx_pending, - tx_pending ? service->bulk_tx.bulks[ - BULK_INDEX(service->bulk_tx.remove)].size : 0, - rx_pending, - rx_pending ? service->bulk_rx.bulks[ - BULK_INDEX(service->bulk_rx.remove)].size : 0); + " Bulk: tx_pending=%d (size %d), rx_pending=%d (size %d)", + tx_pending, + tx_pending ? + service->bulk_tx.bulks[BULK_INDEX(service->bulk_tx.remove)].size : + 0, rx_pending, rx_pending ? + service->bulk_rx.bulks[BULK_INDEX(service->bulk_rx.remove)].size : + 0); if (VCHIQ_ENABLE_STATS) { err = vchiq_dump(dump_context, buf, len + 1); @@ -3751,32 +3608,27 @@ int vchiq_dump_service_state(void *dump_context, struct vchiq_service *service) return err; len = scnprintf(buf, sizeof(buf), - " Ctrl: tx_count=%d, tx_bytes=%llu, rx_count=%d, rx_bytes=%llu", - service->stats.ctrl_tx_count, - service->stats.ctrl_tx_bytes, - service->stats.ctrl_rx_count, - service->stats.ctrl_rx_bytes); + " Ctrl: tx_count=%d, tx_bytes=%llu, rx_count=%d, rx_bytes=%llu", + service->stats.ctrl_tx_count, service->stats.ctrl_tx_bytes, + service->stats.ctrl_rx_count, service->stats.ctrl_rx_bytes); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; len = scnprintf(buf, sizeof(buf), - " Bulk: tx_count=%d, tx_bytes=%llu, rx_count=%d, rx_bytes=%llu", - service->stats.bulk_tx_count, - service->stats.bulk_tx_bytes, - service->stats.bulk_rx_count, - service->stats.bulk_rx_bytes); + " Bulk: tx_count=%d, tx_bytes=%llu, rx_count=%d, rx_bytes=%llu", + service->stats.bulk_tx_count, service->stats.bulk_tx_bytes, + service->stats.bulk_rx_count, service->stats.bulk_rx_bytes); err = vchiq_dump(dump_context, buf, len + 1); if (err) return err; len = scnprintf(buf, sizeof(buf), - " %d quota stalls, %d slot stalls, %d bulk stalls, %d aborted, %d errors", - service->stats.quota_stalls, - service->stats.slot_stalls, - service->stats.bulk_stalls, - service->stats.bulk_aborted_count, - service->stats.error_count); + " %d quota stalls, %d slot stalls, %d bulk stalls, %d aborted, %d errors", + service->stats.quota_stalls, service->stats.slot_stalls, + service->stats.bulk_stalls, + service->stats.bulk_aborted_count, + service->stats.error_count); } } @@ -3793,9 +3645,9 @@ void vchiq_loud_error_header(void) { vchiq_log_error(vchiq_core_log_level, - "============================================================================"); + "============================================================================"); vchiq_log_error(vchiq_core_log_level, - "============================================================================"); + "============================================================================"); vchiq_log_error(vchiq_core_log_level, "====="); } @@ -3804,9 +3656,9 @@ vchiq_loud_error_footer(void) { vchiq_log_error(vchiq_core_log_level, "====="); vchiq_log_error(vchiq_core_log_level, - "============================================================================"); + "============================================================================"); vchiq_log_error(vchiq_core_log_level, - "============================================================================"); + "============================================================================"); } enum vchiq_status vchiq_send_remote_use(struct vchiq_state *state) @@ -3826,8 +3678,7 @@ enum vchiq_status vchiq_send_remote_use_active(struct vchiq_state *state) NULL, NULL, 0, 0); } -void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, - size_t num_bytes) +void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes) { const u8 *mem = void_mem; size_t offset; @@ -3856,11 +3707,9 @@ void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, *s++ = '\0'; if (label && (*label != '\0')) - vchiq_log_trace(VCHIQ_LOG_TRACE, - "%s: %08x: %s", label, addr, line_buf); + vchiq_log_trace(VCHIQ_LOG_TRACE, "%s: %08x: %s", label, addr, line_buf); else - vchiq_log_trace(VCHIQ_LOG_TRACE, - "%08x: %s", addr, line_buf); + vchiq_log_trace(VCHIQ_LOG_TRACE, "%08x: %s", addr, line_buf); addr += 16; mem += 16; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index de1e861c4ed3..893b07698268 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -531,12 +531,10 @@ extern struct vchiq_service * find_service_by_port(struct vchiq_state *state, int localport); extern struct vchiq_service * -find_service_for_instance(struct vchiq_instance *instance, - unsigned int handle); +find_service_for_instance(struct vchiq_instance *instance, unsigned int handle); extern struct vchiq_service * -find_closed_service_for_instance(struct vchiq_instance *instance, - unsigned int handle); +find_closed_service_for_instance(struct vchiq_instance *instance, unsigned int handle); extern struct vchiq_service * __next_service_by_instance(struct vchiq_state *state, @@ -586,8 +584,7 @@ extern int vchiq_dump_platform_instances(void *dump_context); extern int -vchiq_dump_platform_service_state(void *dump_context, - struct vchiq_service *service); +vchiq_dump_platform_service_state(void *dump_context, struct vchiq_service *service); extern int vchiq_use_service_internal(struct vchiq_service *service); @@ -625,8 +622,7 @@ extern void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); extern void -vchiq_log_dump_mem(const char *label, uint32_t addr, const void *voidMem, - size_t numBytes); +vchiq_log_dump_mem(const char *label, uint32_t addr, const void *voidMem, size_t numBytes); extern enum vchiq_status vchiq_remove_service(unsigned int service); From patchwork Sun Oct 3 19:57:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533041 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 537F1C433EF for ; Sun, 3 Oct 2021 20:03:40 +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 130BA61872 for ; Sun, 3 Oct 2021 20:03:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 130BA61872 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=4MLUUdwd9y8Jt2mDDQcKFtY6ghjwSgfqR6sFuidGjJI=; b=PWO6TgAZEUl+9q HmW/24+azKFLiusXz/ezPCNMas4JboplQrE0evDFAMHmbMvE21rQPrABwLdPWtul21nRpJL9H2NNE 7ynbhYjztA7M7AeVIZxIsx6kGdSKJafQVl2FLvL74Oo26CRR4xuj8E7RwgUFNqeaqmxYtsUgRpqoN 9dJ6M8U+JQagt+FssYDC1PLHFApwoZbFxJ0AbZaGBJbSrpYAD8JAbzKCDOWARVXNTKkQ8Rzy/fcDj wd6WEYgO1kmpFkTTSLMGZqtCW5+mq0lrX+4ygDQsBGaIuYMirwyshC3XRqyA+NwHiOOKBxtZ8ugK2 Qqg+zDZwlGmi9Rww/Cng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fX-004NzL-JM; Sun, 03 Oct 2021 20:01:07 +0000 Received: from mail-vk1-xa36.google.com ([2607:f8b0:4864:20::a36]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fF-004Nu1-Oh; Sun, 03 Oct 2021 20:00:51 +0000 Received: by mail-vk1-xa36.google.com with SMTP id w68so6733575vkd.7; Sun, 03 Oct 2021 13:00:48 -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=8bFrZAcb9WzVQXID1RbOeEU4t3ZJiJEDIEoV1+0KG6A=; b=PeYJuSC835yzUsOygkosppyw7q6a2uwDvrdu1o+SLSy0kj7bW+aPEoLJTW63y8cjKc diojPyG8dxepMI0yFVqdL/xBT74Szk7J7T873AJ7r7BAYGTMUQFz2TIcz8EPClCIh2Gn xmvlHuo7F70vEjaMTRDJRUi8/41C2dXjtflousMrGlfDpKGj5qZlsnE7I/WhE5KlddH0 138HTfXp17QeH2G2SCDKFSLoenjF0wfC1+XVoe0WSLFuPxZ8hNdIwkMOuqMYp9OQPOFI 0BLWiUBEPx2peHjhCoerMcgCJB8cyUmPCb1rA2r8BLzVqQPtELnjwRXzq/c75CTuf8sT ImIQ== 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=8bFrZAcb9WzVQXID1RbOeEU4t3ZJiJEDIEoV1+0KG6A=; b=RZK0Nh723Aj66+tsAvyYsGlNL8nhe4K3r5Hmj/BPhQ3bNoEiSX12E/Mm+8RrA3JHW4 ePuuUY+jHQZyd0N/ZnPHZK1pWVgOE6GMpyjP49T6J2x9qqfNjEIf0VWKODOmP7UOr0az vNYqYzd32OJ2QN0+ctdUlLfqNJx4VdWn5Ah/SUhompF5vjo3+Ojs+KunurgB5T2tFIV1 vYie023oTUtJElts/OAT7TmNF44EuDRshAhTrkg0xzkt0xt08Z/RDqiYzjYsVFDyRraA Jw1pBYZwsR/yeuU+2+UB/a1Suz6ipGrkaZaLb25g/iwL9btlFXmKNEtSsWaHc0rZ15DO Zpng== X-Gm-Message-State: AOAM5312WCUd7TfIOuXjZuRXYYJCoaRD4Krug4nym/XYoAB5GHPhZnMO dmv64zC4Hg975m1MWjm6/yYGSuNq/1/Isw== X-Google-Smtp-Source: ABdhPJyP18cz+60Uf30VXcI02hfHj8l4puTSHVQi3EurvqOZiDksxwbM9fYGxmTufcNT6WSWd1BVgA== X-Received: by 2002:ac5:c5b7:: with SMTP id f23mr13266663vkl.20.1633291247566; Sun, 03 Oct 2021 13:00:47 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:00:47 -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 3/9] staging: vchiq_core.h: fix CamelCase in function declaration Date: Sun, 3 Oct 2021 16:57:55 -0300 Message-Id: <20211003195758.36572-4-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130049_851396_C16DE03D X-CRM114-Status: GOOD ( 10.87 ) 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 Renaming function declaration to avoid CamelCase use. As this was already fixed in the function definition in vchiq_core.c in commit 801b1aa002d3 ("staging: vc04_services: fix CamelCase"), the current change make the names of the variables in the function definition and declaration match. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 893b07698268..383c3bcf787e 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -622,7 +622,7 @@ extern void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); extern void -vchiq_log_dump_mem(const char *label, uint32_t addr, const void *voidMem, size_t numBytes); +vchiq_log_dump_mem(const char *label, uint32_t addr, const void *void_mem, size_t num_bytes); extern enum vchiq_status vchiq_remove_service(unsigned int service); From patchwork Sun Oct 3 19:57:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7190C433EF for ; Sun, 3 Oct 2021 20:04:13 +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 6908361278 for ; Sun, 3 Oct 2021 20:04:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6908361278 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=jzUFz7BmedF05rM5NkWmouvyoEw+gXWNZoCy6ARMUuE=; b=DOuiudwxvBqdiH vI1G8Ltu+ICo0hW6EWzgnb2Z0UyT+Clk3g2vtr06XpZw06j2jQp9rImR3HvwMbnOxIGXtSWB/KAfw qX+ECY8eOdd0w2aczetG4DSFvi5mU0P2LCM4aDtpLt7cswvQe6QuLJiWgiPCT/wvfhKPV+e2TuKrQ 536zFRrBu97gam1c4V2yyj72OGb4TsG4Hg36r03JZ70xWnuMsxY6rU3uT5oN2wW9cfeFAVCnkiwtU JfLXCpn1oq8DsXMLFaqxo6IFNSJZKBZtaf4hoZwlqgUH0npmT24rSGC+44Gj0ur5E7Km74hNP1onl XE8wDwCLs4710TpGbrKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fs-004O6y-Bo; Sun, 03 Oct 2021 20:01:28 +0000 Received: from mail-vs1-xe33.google.com ([2607:f8b0:4864:20::e33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fl-004O48-Rl; Sun, 03 Oct 2021 20:01:23 +0000 Received: by mail-vs1-xe33.google.com with SMTP id f18so17274975vsp.2; Sun, 03 Oct 2021 13:01:20 -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=HoLG1xadIhb37Moe2giR32FgTB7t+l3y/OOs4uvCyVs=; b=kRbNTeXD+RgsVyU+Ta1fIauroLL94BIu81u4UdVoSQ3vZ/s97G1QIAsvktd1ELdHqt 3kyU7q5jZhJPN8a8LircbdF15h57AClMJ7m23KXXr8DFDaabNSNfxjD4/UnPv4Kmxb+l C1800PprDhyO1eu+vyGLSj0wEd3J4bmH0C+eMQ9Ag1XQ0F5MBNwZw2m7eVae7eTHlfM8 yrgTzogDb4agXC3KLrqQRZPBH02PTlxzL5bToocS3rk22S581yPGbV7AOy63GNhn5T7o dAC26OGoOASnpRjoEgJ5Zge0mijYwQu1tJPhO/fGP3XJBV8S0fsGqR26nHlyFWrGaLGb 8xwA== 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=HoLG1xadIhb37Moe2giR32FgTB7t+l3y/OOs4uvCyVs=; b=0VpueF0v1cdVejoiDTG2k7U41pk7m6r0Wpuj0+FaMVCxlfD00Jp/veLUryxH8FIhXK SuKbgOUvMdpB4vaeA8xlhY2sHqUDMk2h9pqJczXUt6Lp9DN5VUJjwINdHoZKUGu5BnWs eQIEMUR/UbAoP4h+reaQ0z5rqZ+PanLVqNYLU85TZYTm3L6z3slHNbZBjjMm0kVRRgCc CfdfHRYMJXc3KBv3lmvdyHGyy+8b1G8uS6CJO7/kX+p6zgO5g5J4185S6AjlfFowC2iW ZV19chBmZ78n4wnodwLvwLE79mlbtULurddomUNQBQ2Me7BVcXpW/KxPpn3VJhWXVszf Zr2g== X-Gm-Message-State: AOAM5302FxWyovfyXsE2ChAPhZZujjcnVHEEwdYjw4411Sx9Cm+C48WC 0CSidmEaOsCIm+43xdVWKtQ= X-Google-Smtp-Source: ABdhPJyeB65tXOofex2kQAVQOCCG+rInAXqURozdvA+f5Qf1SXX0kpuXaERC1WMRcV4As2POF2ghmw== X-Received: by 2002:a05:6102:226f:: with SMTP id v15mr10767172vsd.50.1633291279744; Sun, 03 Oct 2021 13:01:19 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:01:19 -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 4/9] staging: vchiq_core.h: use preferred kernel types Date: Sun, 3 Oct 2021 16:57:57 -0300 Message-Id: <20211003195758.36572-5-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130121_951347_074C4FA1 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. 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 Change types from uint32_t and uint64_t to the preferred ones u32 and u64. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 383c3bcf787e..a107c72ce3a6 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -74,7 +74,7 @@ ((fourcc) >> 8) & 0xff, \ (fourcc) & 0xff -typedef uint32_t BITSET_T; +typedef u32 BITSET_T; static_assert((sizeof(BITSET_T) * 8) == 32); @@ -231,10 +231,10 @@ struct vchiq_service { int bulk_tx_count; int bulk_rx_count; int bulk_aborted_count; - uint64_t ctrl_tx_bytes; - uint64_t ctrl_rx_bytes; - uint64_t bulk_tx_bytes; - uint64_t bulk_rx_bytes; + u64 ctrl_tx_bytes; + u64 ctrl_rx_bytes; + u64 bulk_tx_bytes; + u64 bulk_rx_bytes; } stats; int msg_queue_read; @@ -622,7 +622,7 @@ extern void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); extern void -vchiq_log_dump_mem(const char *label, uint32_t addr, const void *void_mem, size_t num_bytes); +vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes); extern enum vchiq_status vchiq_remove_service(unsigned int service); From patchwork Sun Oct 3 19:57:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53885C433F5 for ; Sun, 3 Oct 2021 20:04:25 +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 20DE061872 for ; Sun, 3 Oct 2021 20:04:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 20DE061872 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=O/5I5ISoiK092BnMaqF9rSTShAkC5zA1ZNW/PDO+6vI=; b=YQVV7kv0TsQgJw xmVO2qCvVq1DJxI0/F9A3MOr4TIlYwQwx7emFHYtOe9Wpc7iojKIP/Bse5h15s2sq+iOcza4x3z4N fLTgf22+h9VDrgun8cdMRwtMjL6IQIEh2PL4Kh14so0lLHQ1bX002wmtJ8Jc0TKjx94vMsj8cWkc4 3tCzq+S283BftJjRzhr6DnaKbwxw26cz17JekHhsTN4AozQwmeUuqWVT4CYfp9gpN5Gu5q163nj9N nOy0i1gI01UCJXN8/40V5xhyUsHnJAys6Q0VSko67qCaljHyDLjR1sBzBU/wKa0hXL7T/5YqS0LK/ cyAWweOQeZ3j8emr/gLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7gD-004OJ3-LT; Sun, 03 Oct 2021 20:01:49 +0000 Received: from mail-vk1-xa2b.google.com ([2607:f8b0:4864:20::a2b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fn-004O5a-Nf; Sun, 03 Oct 2021 20:01:25 +0000 Received: by mail-vk1-xa2b.google.com with SMTP id h132so6733986vke.8; Sun, 03 Oct 2021 13:01:23 -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=uSkH/ZagQntPkG0C2DpHNBonj7Wo9RInBQiBWcy5XFE=; b=FSO1rIOGJgjGiv0ApTs5p11TPMuTpriYaPVgrHJ3Ymoy4Vmr4Mj1Iv+ZJ08WnQQ36M oFKPlsXpEsA7zdaSMkxh+eXEPtBVTvQ42QMZaGizQ2zDiIYghKJFs7rvufnuH6uHqgEw 5t1wuryuuIyReaU9YGRcPdrtP9PdpycpZIX/xk2214nQNa5Hcs78RBMT4qFsdy5QmpR6 g51yVi5hsXjkkqiuLWGS3yMOnZrnbk/aoYn7ZM6UFPPWqXOnyEel9h31qlWqDpw83SQi /GCUwj2gMtOyK+ngDLMus1oGLT80ovzWGh8izppnMoeK25xeqBByhZ0RTFHE/AGqOKD3 mbQw== 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=uSkH/ZagQntPkG0C2DpHNBonj7Wo9RInBQiBWcy5XFE=; b=v+DvBSTG+XEo+fvG/4kzXLekJB1rOcF+11S4a+8zldXSL6Mh1E/xm3z26AYBmaN+gu kDxswBfmOQ4su4/z7DaFbOOGOPxYxyl1ZIL4VkHCdUeUuZvK6J1FAr9rNKGNifs22T2L vxdeKD7YXA96K3reZZf4Xsm9imGY7QPcxZ7RTdmb0wlA8v1BS57rdlZ5eOkEzPtM7N+P PwxGxEcaR+4paosj88gG6pgPPsgY6guXVPfJ+SrQG9a+zb68NEvOte7H6KhRqdn4vbL3 eg//r1Z+MkAKaFEl9W8FY/nQpgaVed6geQif2EEcoykqUUsEu2dptq+HaZsD7GHT8Ls1 20wA== X-Gm-Message-State: AOAM531J/OFqAGQJTx6fBdP09qTk0Kw73rYZKmA7OSLV68RJjSMf5N5k +3URC26RGJLDjfBu0u7lJEeTD5P720dSug== X-Google-Smtp-Source: ABdhPJzU68BmIDYtHfc0+zSQmhGaxNeqKRjgG2+yjrVl4QCsdCZRiqlgrdrml8y6cL4VTEDQDqInGA== X-Received: by 2002:a1f:c602:: with SMTP id w2mr13384373vkf.26.1633291282261; Sun, 03 Oct 2021 13:01:22 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:01:21 -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 5/9] staging: vchiq: drop trailing semicolon in macro definition Date: Sun, 3 Oct 2021 16:57:58 -0300 Message-Id: <20211003195758.36572-6-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130123_837651_5C6E3FA9 X-CRM114-Status: GOOD ( 12.88 ) 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 As reported by checkpatch.pl, macro should not use a trailing semicolon. Signed-off-by: Gaston Gonzalez --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++-- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 6 +++--- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- .../staging/vc04_services/interface/vchiq_arm/vchiq_dev.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index fcff2e5bd73f..08c03acd8592 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -930,7 +930,7 @@ add_completion(struct vchiq_instance *instance, enum vchiq_reason reason, struct vchiq_completion_data_kernel *completion; int insert; - DEBUG_INITIALISE(g_state.local) + DEBUG_INITIALISE(g_state.local); insert = instance->completion_insert; while ((insert - instance->completion_remove) >= MAX_COMPLETIONS) { @@ -998,7 +998,7 @@ service_callback(enum vchiq_reason reason, struct vchiq_header *header, struct vchiq_instance *instance; bool skip_completion = false; - DEBUG_INITIALISE(g_state.local) + DEBUG_INITIALISE(g_state.local); DEBUG_TRACE(SERVICE_CALLBACK_LINE); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index e327393800da..026c7c775e40 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1585,7 +1585,7 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) unsigned int localport, remoteport; int msgid, size, type, ret = -EINVAL; - DEBUG_INITIALISE(state->local) + DEBUG_INITIALISE(state->local); DEBUG_VALUE(PARSE_HEADER, (int)(long)header); msgid = header->msgid; @@ -1856,7 +1856,7 @@ parse_rx_slots(struct vchiq_state *state) struct vchiq_shared_state *remote = state->remote; int tx_pos; - DEBUG_INITIALISE(state->local) + DEBUG_INITIALISE(state->local); tx_pos = remote->tx_pos; @@ -1961,7 +1961,7 @@ slot_handler_func(void *v) struct vchiq_state *state = v; struct vchiq_shared_state *local = state->local; - DEBUG_INITIALISE(local) + DEBUG_INITIALISE(local); while (1) { DEBUG_COUNT(SLOT_HANDLER_COUNT); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index a107c72ce3a6..e54e9d80bd7f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -104,7 +104,7 @@ enum { #if VCHIQ_ENABLE_DEBUG -#define DEBUG_INITIALISE(local) int *debug_ptr = (local)->debug; +#define DEBUG_INITIALISE(local) int *debug_ptr = (local)->debug #define DEBUG_TRACE(d) \ do { debug_ptr[DEBUG_ ## d] = __LINE__; dsb(sy); } while (0) #define DEBUG_VALUE(d, v) \ diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c index 32aa1e62450d..2325844b0880 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c @@ -210,7 +210,7 @@ static int vchiq_ioc_dequeue_message(struct vchiq_instance *instance, struct vchiq_header *header; int ret; - DEBUG_INITIALISE(g_state.local) + DEBUG_INITIALISE(g_state.local); DEBUG_TRACE(DEQUEUE_MESSAGE_LINE); service = find_service_for_instance(instance, args->handle); if (!service) @@ -439,7 +439,7 @@ static int vchiq_ioc_await_completion(struct vchiq_instance *instance, int remove; int ret; - DEBUG_INITIALISE(g_state.local) + DEBUG_INITIALISE(g_state.local); DEBUG_TRACE(AWAIT_COMPLETION_LINE); if (!instance->connected) From patchwork Sun Oct 3 19:57:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 105A7C433F5 for ; Sun, 3 Oct 2021 20:04:37 +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 D61D161278 for ; Sun, 3 Oct 2021 20:04:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D61D161278 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=rVbLRznvq/5wJZeBPpYwxNCVa4gSpPrSfSW44TPGizk=; b=GOpaoqViLCmZqh fy9FlL4COB/w4KgP0nFqkmmoERTQT4pElTukw0KYI5EhfoFCo2B9jIJwq4WACxfG/o55spbeuwRmE Zos6KwH18AcU2pIPOVveFrHC2vVwlbwH7xnGAqItf2RtxuoNio3necGgdv1tPcNM2iT1q2vUYM80N amyGKHbvicUFbNtgnbbiYZO2YCYwCCaiojlK+SSMWweaoHtCR61XgUKkoAaVKKwVB1MvMjHYJcItt 0FytBu5BjZghiTYmtfw/GTaYM/I4OXC1b5JjOOO+YEIklbQ0n6iH75DNHkZfeaKwWk2T+VajfIPdM xdi7NjdYWmAQqEkCM9Dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7gY-004OQg-G5; Sun, 03 Oct 2021 20:02:10 +0000 Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fq-004O76-3k; Sun, 03 Oct 2021 20:01:27 +0000 Received: by mail-vk1-xa33.google.com with SMTP id w68so6733957vkd.7; Sun, 03 Oct 2021 13:01:25 -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=d2/W18IRRr+MCGYPxXwCA4Xe9jbsY9mJx5CTn4+TVlk=; b=Bgare4OzVdITE+F0Xw0Dp+o+LtUtRbqhCKt+JbGEtlOyOu45qgaHqH+OvTpG1Hu2OF 3UgqmG5McaQn87E6H9W2oQb1XDEszt6APSHvn5uk45a3wN2/dlVCa+eI32VA/9WN0lWy Vm9U42Ty0WdmS0wtEuB4aNe/tU7KwVIVQIKY0ydWx0zW0sdnAEVECGUrnx/mrQYlUH/4 1D2XFfZKK2kqTqAHeB3TvVIkltBTmfClS3kB+9nqwg1ZOBD+ggdS7ulwmmy+Y6vLheoa 3EvWoRCWKtZoIrUmy0GDSpwPi55zgNv5aiTO5SJesX9MfiClq/H/Z5Hz5J+sNfIWILq/ wSeQ== 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=d2/W18IRRr+MCGYPxXwCA4Xe9jbsY9mJx5CTn4+TVlk=; b=mKgjzcqN96wL7X1MPmadElKyT90dVhIw026IzS4eeaCKOHopnw+046VFuE/3IWGnef 5LSk+mR1vnwfoHrMx+5wGRfYcfdERgZIV8kjHwUEhmZcETAKbETM1MnjgP9YE47PW9z4 L3nvljX8sfAyUTfqEQAiDFE5Dx5QMY42riTE44boCkHVDFE4fvmOpLgRMYbzBeIGeAcG I/y4BwOG7EbpHo7DzXfUwQIT40gbm8C/XC0gAZ3ltfegkBKjchSruLF8fql1NvAF5VtE 5lflW/azErc0J64xb/rmMiJ/JRPx2TEJ8zszsUlpjRdhuxFBgG8t3uUWukE5ubMYy6sO pHzg== X-Gm-Message-State: AOAM533PI09KzsuOh/2/6kmXestIQyOJZACliCap0UnpV7/mr9mcwlOY jdMd7RmJ+b4VDCTwHn+4prc= X-Google-Smtp-Source: ABdhPJwVtM/uMninbsURZpUiTRrMK9ZrsH0TH4Cj4HNHt2DZefpLEd3TuXCeredbiXXXLuFvPymoiw== X-Received: by 2002:ac5:cbd5:: with SMTP id h21mr14355711vkn.1.1633291284689; Sun, 03 Oct 2021 13:01:24 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:01:24 -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 6/9] staging: vchiq_core: drop extern prefix in function declarations Date: Sun, 3 Oct 2021 16:57:59 -0300 Message-Id: <20211003195758.36572-7-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130126_198152_BF490EAA X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. 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 Remove unnecessary extern prefix in function declarations. While at it, remove a now outdated comment and realign the function declarations in order to improve readability. Signed-off-by: Gaston Gonzalez --- .../interface/vchiq_arm/vchiq_core.h | 76 ++++++------------- 1 file changed, 25 insertions(+), 51 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index e54e9d80bd7f..3e50910ecba3 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -559,79 +559,53 @@ vchiq_queue_message(unsigned int handle, void *context, size_t size); -/* - * The following functions are called from vchiq_core, and external - * implementations must be provided. - */ +int vchiq_prepare_bulk_data(struct vchiq_bulk *bulk, void *offset, void __user *uoffset, + int size, int dir); -extern int -vchiq_prepare_bulk_data(struct vchiq_bulk *bulk, void *offset, - void __user *uoffset, int size, int dir); +void vchiq_complete_bulk(struct vchiq_bulk *bulk); -extern void -vchiq_complete_bulk(struct vchiq_bulk *bulk); +void remote_event_signal(struct remote_event *event); -extern void -remote_event_signal(struct remote_event *event); +int vchiq_dump(void *dump_context, const char *str, int len); -extern int -vchiq_dump(void *dump_context, const char *str, int len); +int vchiq_dump_platform_state(void *dump_context); -extern int -vchiq_dump_platform_state(void *dump_context); +int vchiq_dump_platform_instances(void *dump_context); -extern int -vchiq_dump_platform_instances(void *dump_context); +int vchiq_dump_platform_service_state(void *dump_context, struct vchiq_service *service); -extern int -vchiq_dump_platform_service_state(void *dump_context, struct vchiq_service *service); +int vchiq_use_service_internal(struct vchiq_service *service); -extern int -vchiq_use_service_internal(struct vchiq_service *service); +int vchiq_release_service_internal(struct vchiq_service *service); -extern int -vchiq_release_service_internal(struct vchiq_service *service); +void vchiq_on_remote_use(struct vchiq_state *state); -extern void -vchiq_on_remote_use(struct vchiq_state *state); +void vchiq_on_remote_release(struct vchiq_state *state); -extern void -vchiq_on_remote_release(struct vchiq_state *state); +int vchiq_platform_init_state(struct vchiq_state *state); -extern int -vchiq_platform_init_state(struct vchiq_state *state); +enum vchiq_status vchiq_check_service(struct vchiq_service *service); -extern enum vchiq_status -vchiq_check_service(struct vchiq_service *service); +void vchiq_on_remote_use_active(struct vchiq_state *state); -extern void -vchiq_on_remote_use_active(struct vchiq_state *state); +enum vchiq_status vchiq_send_remote_use(struct vchiq_state *state); -extern enum vchiq_status -vchiq_send_remote_use(struct vchiq_state *state); +enum vchiq_status vchiq_send_remote_use_active(struct vchiq_state *state); -extern enum vchiq_status -vchiq_send_remote_use_active(struct vchiq_state *state); - -extern void -vchiq_platform_conn_state_changed(struct vchiq_state *state, - enum vchiq_connstate oldstate, +void vchiq_platform_conn_state_changed(struct vchiq_state *state, + enum vchiq_connstate oldstate, enum vchiq_connstate newstate); -extern void -vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); +void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); -extern void -vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes); +void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes); -extern enum vchiq_status vchiq_remove_service(unsigned int service); +enum vchiq_status vchiq_remove_service(unsigned int service); -extern int vchiq_get_client_id(unsigned int service); +int vchiq_get_client_id(unsigned int service); -extern void vchiq_get_config(struct vchiq_config *config); +void vchiq_get_config(struct vchiq_config *config); -extern int -vchiq_set_service_option(unsigned int service, enum vchiq_service_option option, - int value); +int vchiq_set_service_option(unsigned int service, enum vchiq_service_option option, int value); #endif From patchwork Sun Oct 3 19:58:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8362C433F5 for ; Sun, 3 Oct 2021 20:05:13 +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 9ADFA61872 for ; Sun, 3 Oct 2021 20:05:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9ADFA61872 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=UR58W4+3hqrc0/jvqmBLSFy0nc+U3USFMlpycs/8LnU=; b=OW2WiY/cpqx56T CDmGaROpXQuNzUoq5dCLx0J+qd86ETzkNEaIJCx4WO5qZmVzt472lBsvNcOBsdzPCDeV9FL5Yzm8z 0/vRJhNKLPO4Bqp7OFe/G12868Q2vAFdWwN/Rob8bVMXYCX9rqxCmcQHMKpJq3uZMTvmsmQ6rj/sD G1UwfM5hO0Z2YzPSSSdJsWC/39KUlNITqyrVX0Rsbbp91lLfkeeyX/7TmPFIUODD60IDrCr12gfWk irr8b775HyRT1m5Fn11Z14yNTc73Z0a846Z6zNvPhvqcsw7AgkFF7QDSJ8xMrM/sI4AXUlQfqODTg twHSVnbjESvHX2cCy+Pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7gz-004OcK-BO; Sun, 03 Oct 2021 20:02:38 +0000 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fs-004O8S-QN; Sun, 03 Oct 2021 20:01:30 +0000 Received: by mail-vs1-xe2f.google.com with SMTP id g10so2779893vsb.8; Sun, 03 Oct 2021 13:01:27 -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=7bP3U1yAZRt+u68NpbNq0nb+zKNPUwV3lLbZ4sFMYKk=; b=VPz19kliN98T8/mxR29yWivNGIFgd3VMZG6pMvmeyA6NkcltfkH5xI0DynISsOPkuC vYIkTEfsKpAZ+H6WNpiysN7vHnv3jK6GgRPETyJR4p1jrmQS8hO2KoFoQnllDUUADlLp gyS6IOzpLd0ZlipHFUypue4Q+Ucpy+tQuZadFlEDekDjaj9jg8S89mu+z0niMkyhB3SO GdwXIH0wW2EaOEjyXT1wK7+09sYe7o0nCYrbHZquLfC4AQsKGJQ1XXHVKAJqmFSfeWj9 WXupz0ZBxyu7sL68Z81Mlt73c3Hgy6v9QMcv8k7TABDiv8uIgy121zpP4MQ/EZmIQEoQ ANCQ== 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=7bP3U1yAZRt+u68NpbNq0nb+zKNPUwV3lLbZ4sFMYKk=; b=UrQKtNXx58PAu2PyrYyYcBvKxXLamxovLrftT5HIpvW1WRuJi59Nn1LQY1ZpFWw7YU /Xl7VucYH7SXQbYwUAQlxQFJDQZ+XV8nIlsddQ8gE7O5QHlv4TsbI9niTLR4pMmTDSy+ sVwjTAtpGuNtdLnEM0KjWpQaviSasOF28lBeMUI+4dB8s0zT/8ghs35MSl2ys9DRscHU RSteEXi0tnxGMDMOPcTBtiTbJAyT4JW+waRNtLB4DdB0+pq3CB/n8//KJaONo/I0/vNC JyO8Qb8UdMy3UuACmnci3w1yVn0Gi9YEUtkc4Q7E+PpEN7qJoSBk76lKnxIBe5MuolFa nBSw== X-Gm-Message-State: AOAM530a2/6Q5b7vweZENp/WkVLyuYWtHejKifzu+THneYiqPUU9HIJ+ KnGl0YQxEJhf+CJA9GV38fI= X-Google-Smtp-Source: ABdhPJzktHhae8DX+eZEXR+RgndZY7/aOkqVP8Bkce0LaukNnLWshpoum9Qyg5P9+1mwKRsATJ1kcg== X-Received: by 2002:a67:f147:: with SMTP id t7mr10547572vsm.41.1633291287189; Sun, 03 Oct 2021 13:01:27 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:01:26 -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 7/9] staging: vchiq_core: cleanup lines that end with '(' or '[' Date: Sun, 3 Oct 2021 16:58:00 -0300 Message-Id: <20211003195758.36572-8-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130128_919473_169D4333 X-CRM114-Status: GOOD ( 10.86 ) 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 Fix lines that end with '(' or '['. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- .../interface/vchiq_arm/vchiq_core.c | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 026c7c775e40..b4ad68ff42db 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -699,8 +699,7 @@ reserve_space(struct vchiq_state *state, size_t space, int is_blocking) return NULL; } - slot_index = local->slot_queue[ - SLOT_QUEUE_INDEX_FROM_POS_MASKED(tx_pos)]; + slot_index = local->slot_queue[SLOT_QUEUE_INDEX_FROM_POS_MASKED(tx_pos)]; state->tx_data = (char *)SLOT_DATA_FROM_INDEX(state, slot_index); } @@ -854,18 +853,15 @@ process_free_queue(struct vchiq_state *state, BITSET_T *service_found, } static ssize_t -memcpy_copy_callback( - void *context, void *dest, - size_t offset, size_t maxsize) +memcpy_copy_callback(void *context, void *dest, size_t offset, size_t maxsize) { memcpy(dest + offset, context + offset, maxsize); return maxsize; } static ssize_t -copy_message_data( - ssize_t (*copy_callback)(void *context, void *dest, - size_t offset, size_t maxsize), +copy_message_data(ssize_t (*copy_callback)(void *context, void *dest, size_t offset, + size_t maxsize), void *context, void *dest, size_t size) @@ -946,8 +942,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, * Ensure this service doesn't use more than its quota of * messages or slots */ - tx_end_index = SLOT_QUEUE_INDEX_FROM_POS( - state->local_tx_pos + stride - 1); + tx_end_index = SLOT_QUEUE_INDEX_FROM_POS(state->local_tx_pos + stride - 1); /* * Ensure data messages don't use more than their quota of @@ -959,14 +954,12 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, spin_unlock("a_spinlock); mutex_unlock(&state->slot_mutex); - if (wait_for_completion_interruptible( - &state->data_quota_event)) + if (wait_for_completion_interruptible(&state->data_quota_event)) return VCHIQ_RETRY; mutex_lock(&state->slot_mutex); spin_lock("a_spinlock); - tx_end_index = SLOT_QUEUE_INDEX_FROM_POS( - state->local_tx_pos + stride - 1); + tx_end_index = SLOT_QUEUE_INDEX_FROM_POS(state->local_tx_pos + stride - 1); if ((tx_end_index == state->previous_data_index) || (state->data_use_count < state->data_quota)) { /* Pass the signal on to other waiters */ @@ -985,8 +978,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, quota->message_use_count, quota->slot_use_count); VCHIQ_SERVICE_STATS_INC(service, quota_stalls); mutex_unlock(&state->slot_mutex); - if (wait_for_completion_interruptible( - "a->quota_event)) + if (wait_for_completion_interruptible("a->quota_event)) return VCHIQ_RETRY; if (service->closing) return VCHIQ_ERROR; @@ -998,8 +990,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, return VCHIQ_ERROR; } spin_lock("a_spinlock); - tx_end_index = SLOT_QUEUE_INDEX_FROM_POS( - state->local_tx_pos + stride - 1); + tx_end_index = SLOT_QUEUE_INDEX_FROM_POS(state->local_tx_pos + stride - 1); } spin_unlock("a_spinlock); @@ -3088,8 +3079,7 @@ enum vchiq_status vchiq_bulk_transfer(unsigned int handle, void *offset, void __ VCHIQ_SERVICE_STATS_INC(service, bulk_stalls); do { mutex_unlock(&service->bulk_mutex); - if (wait_for_completion_interruptible( - &service->bulk_remove_event)) { + if (wait_for_completion_interruptible(&service->bulk_remove_event)) { status = VCHIQ_RETRY; goto error_exit; } From patchwork Sun Oct 3 19:58:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84DDBC433EF for ; Sun, 3 Oct 2021 20:05:17 +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 549E961872 for ; Sun, 3 Oct 2021 20:05:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 549E961872 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=8mOae9A8Xe01PGcSAkJUq45CCNYDQtancaVjFko3NfE=; b=BwHF/EktfQ1ok+ CiBRKDBp5/N4htrV64pYQytYun/5eyCujR79yTwpYKYLHNYXOfywxWHaSOwleDBiqgzABgX/LisP4 ER7MW2i3lOSEiGfygWQVGXqrL51KHJF5Q2/UP4e/2SfzJmnMqRNYnNkZG4Dvz159PfvQw9Jhg1Vy9 49Zb+b0y9x5ieMh5rZL/NSFlsbLtAz6GHcS3qkh1vHFQQ7OWgVzeWPQ+iyaHTRYMCppGY+jDnF9SD qHiGkej18lMBeMpGfresNDdHKdKUbfbEzv1eB+5QRKKQHReLldLA6lNdHeG3uizjZ+dd+r+wB7txI euVOcQXEKFqNy7TBbRww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7hY-004Oub-1B; Sun, 03 Oct 2021 20:03:12 +0000 Received: from mail-vk1-xa2b.google.com ([2607:f8b0:4864:20::a2b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fu-004OA3-HI; Sun, 03 Oct 2021 20:01:31 +0000 Received: by mail-vk1-xa2b.google.com with SMTP id n85so233777vkf.10; Sun, 03 Oct 2021 13:01:30 -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=RISxD/viKv7LKWmGTkIKr7KI+2YT0D1VIuZdPYzWbkQ=; b=mK35pTDRYFtojim+7uEt2qb/XHjO9IUDlkrkpTyOiCyT/+ut31qa6u2yF6u3X/RpD4 /sSnSGlP4vR2d5T3uJdemDAdsA37nfGzlmE6C6y6BeNGYKGMaM2Df//aSVwVJB8ysDH7 8Yf11VrUu0cEzP40wHLn6h2CQi2PRNExp1CiCWT+ylcn6HRd3JSDGL9Y9Pu7EdiWRHaQ Q+Ahln10F7uVBh9sZEJGY05amLqaH5zMJSrG0BscWalCvpPPnxzMniOdpKwo+jBmsA3a z3To9KfWiirah9Wly8IhfnB3XJ+/KCDpBzjUFaewKhh1mhMQZB2LGKHvq/xzJhyGULua gxIg== 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=RISxD/viKv7LKWmGTkIKr7KI+2YT0D1VIuZdPYzWbkQ=; b=chHqo2dacC3g7yimSkfivl8hBrB1vw2Hf7m5dA0cOeXwmAhSAvli6C9O8FqsZHSY4b e+2mej6o1QvFX8q1yOydvXq3xWsSjnfRHoo7Fvz3sfIxH5ONTqzQU57f6rFGLhdOssSj FzlUL761t483+RTQWTtMIbGmJEBp7AX2hRoddy7y8Q0hmEyV2qF9HmDqAKtHRQQjEJ6k Fb2c3AKylYxx22UAxfSTKufnILl62lTvFzybmds3HuHRnAJ8sf+FZfkXG7KJz6uSwJTC VZgUrftWhcv0hAredil9KphmAHUEqVr2/y9pU7lCaVh32H3tuWVEyY/ANs0RX2eDDQau IC/g== X-Gm-Message-State: AOAM530Cjp9CgZDPCbcmMuXdof4EBdvu5vk9HaTUw9x+tRdRqhPMaTMA xInl6gP0mBY8+hk6dEvU+5w= X-Google-Smtp-Source: ABdhPJxHXNALxamC78pDf3kPboNu+0yUjARPw/Vj6beyUnoITXaBEkpTgEC6aMpZkDJxGHqmyzIZFg== X-Received: by 2002:ac5:c24c:: with SMTP id n12mr7474711vkk.10.1633291289737; Sun, 03 Oct 2021 13:01:29 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:01:29 -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 8/9] staging: vchiq_core: cleanup unnecessary blank line Date: Sun, 3 Oct 2021 16:58:01 -0300 Message-Id: <20211003195758.36572-9-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130130_617341_8475383A X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. 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 Remove blank line before close brace. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index b4ad68ff42db..416110bf20fa 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3193,7 +3193,6 @@ vchiq_queue_message(unsigned int handle, if (!size) { VCHIQ_SERVICE_STATS_INC(service, error_count); goto error_exit; - } if (size > VCHIQ_MAX_MSG_SIZE) { From patchwork Sun Oct 3 19:58:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12533053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0CB5C433EF for ; Sun, 3 Oct 2021 20:06:26 +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 6900461278 for ; Sun, 3 Oct 2021 20:06:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6900461278 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=R8P4KFHXHPDh88nMH4YfvRrlb1JURWM7errbqDvGcfk=; b=ZQOuK2iqBdZeVn giikGdkaOoftgWU4RhnRFH0B0KAVZLHhN4d9Lly4AzRGS37SOA6i9ZP89wlHHO3js4nS+WQ27MkrN EKnfqnTcQIt/QIAlJWYMunu+QOno1TQKL3HQHaWZWic6GEcZx4TI2qp4Jrtz2wD+3N2eVIBT7LMAn FSp3GSnf7ldyVSlRNrGVeTR80du5Thh44OCPjydL8lzhGiA3zW95HPmSJ8h5e6P20BXzAkcx1f4aB 2cL94T4UYAVJ4GgAw5ReWAgG98vGHzcfxmEetUf3ffEmi6/u0o/TZjdDP5dP2z5dScqi7nrHBgalt XwX/f44E6cLH+aPcKYHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7iF-004PFP-S2; Sun, 03 Oct 2021 20:03:57 +0000 Received: from mail-vs1-xe30.google.com ([2607:f8b0:4864:20::e30]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mX7fx-004OBp-Kk; Sun, 03 Oct 2021 20:01:35 +0000 Received: by mail-vs1-xe30.google.com with SMTP id g10so2780067vsb.8; Sun, 03 Oct 2021 13:01:32 -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=PWnB5K1Grj0xQyY5Skv45XzlXt4yBMt+nMNlhoq0dAk=; b=kxcwQ5isTHdCrmNEqg2mueB/somw/dnSZ172BkV66GxYsy4NpfHzCbJ2Fx8N9vmf1o 8nJnAbaCA/cJR6C3dStiK3GIxyYE4rsaL1gV35KDBjX2Ep6luZs2ne5giXf0UoZdzinW BBBxq38jFMTTe2ur8J2U3rr8svCoVYMfVrHgWNQLTz17nyqzjP2bN+zK7PWl8UThXCM/ p8dq1o5C7OI7Z+4qUXFzx3GmUISc/YcsVNa1fUHhvvweN3DL5vo2DC42eoswbV8sUiiL nqcIeGambAq/IawRxXDD7TfsojNg3NiUvL1mr5nw9HnqQaq/HBYm4ERkt8eAw+QHX7o+ /NRg== 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=PWnB5K1Grj0xQyY5Skv45XzlXt4yBMt+nMNlhoq0dAk=; b=mdny3XGf3O0/WUj4ErBxd43qvJRR512amLtmC3bBdfWPsgj6Po5c2L/zRkt573q8BG eBkEV0d8xJZKCbqb7RfeJdFYAhDTuM49tuMqD8V9/ANf6Y0mPNZVPVyBCr0iLuiEb40M ZMt9wLiv9H/8Kxe1hB/1jU/oEF6tBi0O+zIYcxID9gkHXunAdyXMFFbXiChZ+tThIcMK Bgr7PPB5uSlC5h3NULQy5M7W2d0dDSHZR448NpWhpKnCAwfY/TmSo1ML8eXVPEiTiwvA YbaFiheG5nTbtXsDI8e/hQPLHz1JKhufcGqhDrLiVWyzYDYzGvqQ1Tnjc3aapdS16KxP r6hw== X-Gm-Message-State: AOAM532ElLu9meGF791HCwlrq/mCx3anmeX/eLFL1hGJayUEy4uNgyYk af7xZ9PaF1Au3CtCOtCbRCk= X-Google-Smtp-Source: ABdhPJwGIuGvigJRC8FTrma9fSmPm3wosjqCuei6Z9n0gA9efbcU/0UCPT24xg+3XkmSv6NApARWJg== X-Received: by 2002:a05:6102:3593:: with SMTP id h19mr10540551vsu.23.1633291292266; Sun, 03 Oct 2021 13:01:32 -0700 (PDT) Received: from localhost.localdomain ([181.23.73.135]) by smtp.gmail.com with ESMTPSA id x21sm6691019uao.2.2021.10.03.13.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 13:01:31 -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 9/9] staging: vchiq_core: fix quoted strings split across lines Date: Sun, 3 Oct 2021 16:58:02 -0300 Message-Id: <20211003195758.36572-10-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003195758.36572-1-gascoar@gmail.com> References: <20211003195758.36572-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_130133_740427_224E3CCF X-CRM114-Status: GOOD ( 10.60 ) 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 Quoted strings should not be split across lines. As put it in [1]: "never break user-visible strings such as printk messages because that breaks the ability to grep for them." While at it, fix the alignment of the arguments in the sentence. Note: as the line now is: vchiq_loud_error("%d: service %d (%c%c%c%c) version mismatch - local (%d, min %d) vs. remote (%d, min %d)", checkpatch.pl emits a CHECK: line length of 123 exceeds 100 columns. But now the string is grep-able and the whole function call is more clear. Reported by checkpatch.pl [1] Documentation/process/coding-style.rst Signed-off-by: Gaston Gonzalez --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 416110bf20fa..fa65a99ae54a 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1499,13 +1499,9 @@ parse_open(struct vchiq_state *state, struct vchiq_header *header) if ((service->version < version_min) || (version < service->version_min)) { /* Version mismatch */ vchiq_loud_error_header(); - vchiq_loud_error("%d: service %d (%c%c%c%c) " - "version mismatch - local (%d, min %d)" - " vs. remote (%d, min %d)", - state->id, service->localport, - VCHIQ_FOURCC_AS_4CHARS(fourcc), - service->version, service->version_min, - version, version_min); + vchiq_loud_error("%d: service %d (%c%c%c%c) version mismatch - local (%d, min %d) vs. remote (%d, min %d)", + state->id, service->localport, VCHIQ_FOURCC_AS_4CHARS(fourcc), + service->version, service->version_min, version, version_min); vchiq_loud_error_footer(); vchiq_service_put(service); service = NULL;