From patchwork Sun Oct 24 21:25:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580475 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 9D68BC433F5 for ; Sun, 24 Oct 2021 21:27:16 +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 55D0660E73 for ; Sun, 24 Oct 2021 21:27:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 55D0660E73 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=0v2HSnTZpphOpPfr+VE8RTm6yW8oqcLvT8YIz1I29no=; b=dMCi0xc2/4aq8f z5NqvtmbOIpjoJHb2ui0Vu02S9UlOzmp/yjVcDqhKNBcA5BW3EAa7I39A42TU1zXypmfns1xscypd lWQsSLERkG+JccSENd7oZcpJx82Keg2oiWJIEKVP8sLoLFuXVPB4cZziyXblTvYRkMpwMQlnj2jxS AD6hqoZ+qJo+3+h0GUl90TJpbXb4SH1ckih5tPOuSZsKiBEuq+RN61PZt9Yi4fToOW12dCsENnExX 43Ud1Sg8b4xtXmJX2L1u5yPjBScgSfkBJiVmCGXKIWeG5wAqFMeS4YeclOeNbPAyHHtfXiMVoVjB7 kfggGlXV6EbhddzMqnjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel08-00EdOB-MR; Sun, 24 Oct 2021 21:25:56 +0000 Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mekzw-00EdKP-Kw; Sun, 24 Oct 2021 21:25:45 +0000 Received: by mail-ua1-x92f.google.com with SMTP id u9so8237031uac.8; Sun, 24 Oct 2021 14:25:44 -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=BUZrb/8Tu+o0w2Zrk3jfeV2yAEX/FiW+ydM/SILOmDc=; b=mNmxG7ptRvHDkHl0zzqXCFzL6bfLkvmlWIcj44A07+YEnbRIvvLldDFyOem6ncngFo VlfxdgBK9P7g5R6QLQBMhTQNPC4JMMuHAbt06IMjzl7QK7p/gOxuiCf8TDf4gR8RlBza omp1hPLcSnp2nIrcoBowS0hpdvPl0pmEJ0R5bsRknNCrQSS9B2Ysa2deTBp7HhDgqqrc v1o/F28cz/D+4rzAoC6uQa0uWSAihg9CYP5rJviR7zF3OlZwKweEdtnR1vFzmGn6zkUx DKeSXDvrulPX8ZN4KFydTeLfMKmSs3A2PsxlsaRgpw9aE8XM+lY+EoV+/Y8WgrKGY/Y8 1m2w== 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=BUZrb/8Tu+o0w2Zrk3jfeV2yAEX/FiW+ydM/SILOmDc=; b=ryV6wVdnF8+rAsiLbu1t9kx+kudTVWzuqwq9iiYBbcYuySpEu57f/Y9gSqLFqfPqQh WFdqqmxHD+Sy6yAnyP88/scGAXNm459SxSIRqhkauq6rLQijdV2gR8yHw+xsETiS8OOW F6Ke+7pjCxOjRg7ZjdoV0uqW1uvM/MnyF6cHBJ2Qp5/XWGdP4BIzqIsfds4QK1l/k1W8 clcZOE411ikz5pQsJeWlmvW4fiORX6flDsE7uWeC/D60USvwXII+A/6RI/+CtSg/UrmK 53tnIyARSqF5iSg34k1VfYE9Fu4h3om5cpvaQWM/Wq3TLivNYDxOptfMCd/nThmYso9B FBUg== X-Gm-Message-State: AOAM533mn6oE/96PsGuuXW7toPoxFDGwjVbMFdwsr53xycEWp3KsLm9G MO9zBV+4Nykc1JmBI+9PBzI= X-Google-Smtp-Source: ABdhPJxk/CNcqk31LoGeoNiFDolG+3j9ZXhJhPee+dhU51Z5ZSzZQwiWi1XR4dHLuCTCO5l7gt0V8g== X-Received: by 2002:a67:c217:: with SMTP id i23mr12323615vsj.52.1635110743707; Sun, 24 Oct 2021 14:25:43 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:25:43 -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 v2 1/8] staging: vchiq_core: cleanup blank lines Date: Sun, 24 Oct 2021 18:25:17 -0300 Message-Id: <20211024212524.370078-2-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142544_711949_0C233883 X-CRM114-Status: GOOD ( 10.67 ) 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..a205f769d5d3 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; @@ -3338,7 +3337,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) { 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 24 21:25:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580479 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 31D0BC433F5 for ; Sun, 24 Oct 2021 21:27:46 +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 E66F360F4F for ; Sun, 24 Oct 2021 21:27:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E66F360F4F 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=oToh17W2r0I265WZWleDtBGlIzq1c1/9W7iaoysGIHQ=; b=RAQFtkXlIpOQZT LR4mOa1050pMH8MERCJ/unLPcZkiVXY1oXZyzzHOSSzGH9yGjnE59GTP7FcZzM/WLEgXeFpJ+Rk8t GFYmEqJk57dBIr696vItYEH1yinmviSECcjDvmf2gf8qXdROYC0CuOnVRzMX5X5D+gN+HQ0Lk3bX3 ms+/yyNiFhmJnn0zWIkMCbKB6jPD0u3AFfbW/Qg7JcZgcetV8bhYuKSKPQvPSVnd3uNydW8XlK3vf 299i8CWMEjnKDaAh37d1tRMTvuk0R/tiMYBYfJOsu8CjGs8RmjidSM6dKcVXLjg4VzirPvF1taUow jfPKJ9YIUDeMy/CrlOmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel0K-00EdSb-Oi; Sun, 24 Oct 2021 21:26:08 +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 1mel00-00EdLQ-Bm; Sun, 24 Oct 2021 21:25:53 +0000 Received: by mail-vk1-xa2b.google.com with SMTP id s201so2063630vke.6; Sun, 24 Oct 2021 14:25: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=yvdeL2mylV00dnj30N+QXKuYxoelUln6BpZfLAEVDTE=; b=RfASH8siOB0ZDt/6Z4A9zIPk3iTADoQ4ZRuW/tOKMrZEcxMvbHJnyFI+kakqM0WZNM gX9vRmgJJL9mso1AGEagIrykfxixCIk2eHx1+7c4zGUyAThVF7P+GYltK15bNjJgjTbM FNBCOqwZHP5rMbQSpVdKEkbD/nGhjhx/zz9re/LhT2rv1A12y9ohfCVFg10Qh/cs+IW6 hTF+6gkXVncw+EWUj73YaA0ic8F5AORQeXwvh9QAyByeY9rYk63ErVJTXIS4e1K8ySAw myTYUX7CM4C1v8VUGUDdhLVC+npNgQ3JRPjnN2lTj8gq9w3I+mEahSWD4X+7BsKGqS+A iCWQ== 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=yvdeL2mylV00dnj30N+QXKuYxoelUln6BpZfLAEVDTE=; b=Y0thdzXs4OHVYjvH0pJSaosa2v76S69MGQDDzqgA3dTobdCs9qpR4vSorl+nhYtX/v 3k82y/BnyE9vgauf1dSAbQMRlnfgSpUkBRb4pMgDygaOKg/bbMi4qF7S5nMFRzyUVi7m LeEdhkLvt1+Iuv8nwU+tsVgUN8Gz5SgxDz300TUQOWGS5a5qMsuYRiJW8GglCsn4C0vc X3145WOZ8u4HcAURZxTfMcOcDjos3EAc4hPjC0y9i2NSiJrVrBfWQ4KpueSNCryzM+ht ogV1BPaebpMSXChSuSxyHaKmCAtwMwWm2OkTwgtroIceY3UJsoJtn2Ssu4gq4p64+McQ 02ig== X-Gm-Message-State: AOAM531spGqYN22DXZNlWVruOSypb6ps2ypWUjstWjthbiRdE66pf8L2 5qhuUJ+7j0C/KQH1TIrAk10= X-Google-Smtp-Source: ABdhPJw8NuvuvsuIZV1hIptayJCOvlI2Db+U+Pr4w5D3PPgppqONVcnC2AiUJOGE4aAswkZoo+iPDg== X-Received: by 2002:a05:6122:c89:: with SMTP id ba9mr11880354vkb.25.1635110746902; Sun, 24 Oct 2021 14:25:46 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:25:46 -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 v2 2/8] staging: vchiq_core: cleanup code alignment issues Date: Sun, 24 Oct 2021 18:25:18 -0300 Message-Id: <20211024212524.370078-3-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142548_482459_9B6DEE2D X-CRM114-Status: GOOD ( 15.89 ) 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 a205f769d5d3..d64d6a0427eb 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; @@ -3245,10 +3115,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 @@ -3283,11 +3152,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 24 21:25:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580477 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 EB9F3C433EF for ; Sun, 24 Oct 2021 21:27:41 +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 B9A7F60F70 for ; Sun, 24 Oct 2021 21:27:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B9A7F60F70 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=Ugmlr7NhkE40isOYKLUPCTIVwAxJQkU/n58QFXVKxoU=; b=CX0Ve0NLjG08r9 Qf1/pI/8wKjA5/AcGzEl9eE2dFUydTdHVvG/kf+dcej1AP99eGjEt7g0NhFzuzzz2yWXk+x3oPFXZ AzPoQ6SKP8qqnSUeOm202OvKkagiPJAZGEky81nMcsHFBT0ii7tmanDYMgJG8MOyRQ9Z1MtrcGjC3 ypOT4qVl5dG3q6vQDjkeaf0a83EZuYC12lXDA6BTGRUS10N7lKwn0nTUCieOCadaduamcvXD+Ru2z iMp+23HQD47bmIZn5BDKRWUqcT77q7K65D2YkUOej5838mxrgypZF65lzHCKipTdqzblSsAAlPfn/ jMxYeUP+w/mJMqG1M6nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel0W-00EdVI-9n; Sun, 24 Oct 2021 21:26:20 +0000 Received: from mail-vk1-xa32.google.com ([2607:f8b0:4864:20::a32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel03-00EdMH-32; Sun, 24 Oct 2021 21:25:53 +0000 Received: by mail-vk1-xa32.google.com with SMTP id bc10so4211397vkb.1; Sun, 24 Oct 2021 14:25:50 -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=7gFBvsyo02xfQlMrkGMRUgpYnVFylPr5PKSD1wmXbLg=; b=Btk6kwxqQBLlK2Kl1khbLgAVTUIw/lZRbLWOD2RLGd7WdFpR+i3lWlMwVbIT73D6pE +ffDRnhLxgOkp8fMksTJJYdzx/4C4UjdjZMIocEWKVNQbjhPPkvh96UKo9HO3pqfO5JA fLNXcazO86z9Mo3Riwxc71eZBfmo73bRBKKma7/15l/5SSV3O+EOc7Lrcj+j1Y9eKAKU 4eiW3YN98a8pezB8OlbMaiKS/Dz0ooL3PPvXq6ek+uaL97wszk+kgDcOyWmzkl7B/EcH HKdzHlIdo6DK2JdAZeqmv1KZNUqpRLIg2zPk2UiuwZF8iK9rV8LjsS8jZG6ccY5LtE7m lyCg== 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=7gFBvsyo02xfQlMrkGMRUgpYnVFylPr5PKSD1wmXbLg=; b=uKPxRTvqY90hSSqmtJ9f83YbMkk3VCswQu5lvJ4XgeXLlEIAatQDv+3Zur4tkjmsL5 jkwFKjbArtwZ2LYQA/qKITfcq8z8PiF2KxZ3nlytLDnzhez13UWtrLU9o8qqcWPU7+Zn F4x4U6J+7/9O2uWDej7yVIoUJgPjWimcBn1E4OHDjHQNlhA8nSHb8doDV9HoJuVi1dks IS/hhe/s/l3epxJg8P276LuLVm4GUcuc+4ngB9pG5zHXcBSrQQaSU2SnZ0AYZgujY1o9 ew+1EJ+UK2RTNGwYEMRznvfMIhnx+wOZyls5VnWKfkciCI3VhyPfks2C7dAYhIuHXWYe LCnA== X-Gm-Message-State: AOAM531zWoV44qFMjlL/+kvKmJMuUHgV0gkpoowQS46z6Kh3aKDDIgq6 LeKFzGVR0xhYHky8XQaL4OE= X-Google-Smtp-Source: ABdhPJz0+9rGWIupGWw1BBWoq7paoigHka6FgVu6a5eE9CkFAsLrbRIM0DXSjLR2QI+XyOQjQzWFCQ== X-Received: by 2002:a1f:7d0a:: with SMTP id y10mr1004095vkc.12.1635110749736; Sun, 24 Oct 2021 14:25:49 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:25:49 -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 v2 3/8] staging: vchiq_core.h: fix CamelCase in function declaration Date: Sun, 24 Oct 2021 18:25:19 -0300 Message-Id: <20211024212524.370078-4-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142551_162767_AD6EF50F X-CRM114-Status: GOOD ( 11.00 ) 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 commit 801b1aa002d3 ("staging: vc04_services: fix CamelCase"), the current change make the names of the variables in the function definition and declartion 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 24 21:25:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580481 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 67009C433EF for ; Sun, 24 Oct 2021 21:28: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 2AC0160E0C for ; Sun, 24 Oct 2021 21:28:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2AC0160E0C 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=57tQ3pku3B1c6UwncVOV7/E/80PQ+CFMq8yX+re07uk=; b=hxWdGs0DV8MPrP CnXjIQC+msqSoJAAjSiFr+AydCqixmZGGZ8bndnjnzQxihuYFD/uDlUFJYNRraUjYiHWl2GVSqI2w E5xJpZPQHV4Ah0I2EzvW6vYQmxYfysgs61lJ/+F/LI1yorFV0jUHp/lFmGXETCbsoRdj32pLmHCbY N6I/dtZkv+ZVcJIgKTBxbY89S6nPsqyMhwvXqCuz91G52/GVKkMi4MVj1cX0diM202vKXx3lscKhR vnwlkOjyYTNjc0lHNttLqdF54MOTb5sCj6/ltcA054ocCU1U74HaSFP+ipMoou+dp0c7w8bRtxBXE VVC5o1C3easX4lhkgQGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel0j-00EdZ1-Iv; Sun, 24 Oct 2021 21:26:33 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel06-00EdMy-9I; Sun, 24 Oct 2021 21:25:55 +0000 Received: by mail-ua1-x931.google.com with SMTP id o26so4335369uab.5; Sun, 24 Oct 2021 14:25:53 -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=CsYmpFKWOiWQ03jQad0Q3T5GnVeBFD+8qIGd8B/YeyY=; b=JPAwHuqEg5OBJ3gqusFUTC8GAHeSKNv+lB1wjHmRjh8VCr9e9tjJFqc5tTL8u10NoD QzM3RIhX3qBj6XF6/UtIp/dTkt3cmnit+rvRoKwaJqQH73mlUqOzwzOyEHMJwbY/F+1U u6lCo6nphuGSU54ykEzL+fByO/50ZRB6Ecaeo62E5gvCVvmEkO/AGM9ZLZW1m3BelRVU GEhqPUCYprL1aHyZUC7LON0oxinDh2RccwDKe0l/WHFkhKF7gLWZ1xwfyBLbgTMgupr8 MNGOeAO/x2PxXQ55wiO0bWzplHd3hEDg0RvLK95k5FuuqbjSEdg8xbAixZx8ZxbF0XcL Vd7Q== 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=CsYmpFKWOiWQ03jQad0Q3T5GnVeBFD+8qIGd8B/YeyY=; b=lrx9kldsqhgPev+taItCgBcv4pw56QtYZFji1ugsXJT9LvKlqt7chdy8UJYMVpgOTT TsZiQQZE4j7yMEVkmUxEY0HspD5jVclasy1dbFiwNkhk+QsDAsM9dMmmFVzU2TU880sH MqtPFvfo6dCVaWWv6XsVGqcVGPsY/cAEUfQLwDRSYZUERsAlfpvHlfTREESX1S/2fvUG I0VNVyAoz3THWnrp4EC++Iktn6bNKrmr4EUJmxbxc8xMNjBX44gi+YKJMQZwRO7Ut14L DGlZnZF7kQNd20+9DL6DKM5vNAkcN6XlpbrAym6co6TdN1PHgXVxyVX2vytQrXW88mOt DI6A== X-Gm-Message-State: AOAM532lOiowf0MPu+lQAyx0EtO6UINvsoB3pGcQb0eMGZThcVoHo2Ut CdVIJbmltYuaj7hDzoQ7+ok= X-Google-Smtp-Source: ABdhPJw3Z50PnALm/Vittr9/gmw0CgP7YCwh9FKl6QYIV10vcyW9unkPO+zMDXnqpXBuGQuvXjaxhg== X-Received: by 2002:a05:6102:21b8:: with SMTP id i24mr355424vsb.51.1635110752482; Sun, 24 Oct 2021 14:25:52 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:25:52 -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 v2 4/8] staging: vchiq_core.h: use preferred kernel types Date: Sun, 24 Oct 2021 18:25:20 -0300 Message-Id: <20211024212524.370078-5-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142554_349919_A5F0C31B X-CRM114-Status: UNSURE ( 9.89 ) 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, with the exception of the one in function vchiq_log_dump_mem(). 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 24 21:25:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580483 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 89853C433EF for ; Sun, 24 Oct 2021 21:28:16 +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 5551F60E0C for ; Sun, 24 Oct 2021 21:28:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5551F60E0C 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=yn3VNRjL2M3e+zY7dv1O1VcIIKeZF8JLrcBVhXW6oM8=; b=cCkBghZrxMN8vv lQao2x8xuOWm0MFe2mR9SZ1PbL6Pm/qXIIrfo0l1ZOFqVH1LV5dy3ypOGrQQb5eLGwXKa8Zpfzb62 969jQyajBPPN0yDthDFiZ3B20wHjxhEF4/2MgZyJkti/hnu4GpHhHylqbqNEX2GAaPgd7tMhEnb6J zxdNvZh5LFY+SNK4RhUY0kymWwezyCVmKp2YEUz2wXunVNyhDet/z+6mubB66WDzs/jRQrQAFfQ++ 4uG1gr4K9X0ObFIoRxns+ov4kof/O+bJNv4c8e0Nk7932SsrR+N5+oUuWLtlDZeFUMLUJvjDej/fY foFWXy9I0XzMHZL04EPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel10-00EdgO-2R; Sun, 24 Oct 2021 21:26:50 +0000 Received: from mail-ua1-x934.google.com ([2607:f8b0:4864:20::934]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel08-00EdOJ-8A; Sun, 24 Oct 2021 21:25:59 +0000 Received: by mail-ua1-x934.google.com with SMTP id f4so18252431uad.4; Sun, 24 Oct 2021 14:25:55 -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=wY2nDclaLgOKVb3wF2iM6yH+HK65pZ+hsDlb1ZpHiao=; b=eEG+LojCcslFHQf9iugJoCrICaZoeRodDnaYqj7KCp5S086utIChtfXmxUDp8z/Kcb bbw3nyaSIj19kACxCe+awkpcYlbC21Ds7xH93J0we6UBpAKPwtbmGfSKtkoSTsQEw2BE x02iaydXb09w4u4QL312fE0EtwXjXtPsnVYKtwrtppjKJDFrBrrOLXOF15yXF+xrr6rX uSnSsWDWrPyEIiaAB1mTlCXyfYFODJ4RA64j876q8Xqw0HBUeooFXSrBfAaL7ZgEYLmW LBl30izeWZyzKCgT2MgVyApZywaxSSH7/iHz9DJTcKJ12kff3tts8xn6hCD61g86BvGy qUuA== 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=wY2nDclaLgOKVb3wF2iM6yH+HK65pZ+hsDlb1ZpHiao=; b=QWt7dng6/a2apGq8yy0JXalx59KCZozfOVrWzxvzrulv7UHwTtvffVR675JoAbmrYx l6rNFK/Ug36/2SRMo2ANoBwNohJpwsm/eTHZMUF9Ixem3eWOrUU5+XQmQ72ZEiPmIS9x 7gnhykJbu55NRqSRP5nNXa60c6u67NLrTK3MMZCDRHr/tXCL3VSg90DKvzB2ENXHkrTK cfcJqUDLL3TUXtFJ9mfPu7Xzj8f6jvPQXaTTT6YENs9ham/a2u1E9Uo9hBWNRBrJNjme NzBAn4yGVwawvepZCVmd9Gk+JEfbdtfLFKFSbTVmBn8A7sen1b5RIk04H4i1uK4AnrNX oFlA== X-Gm-Message-State: AOAM531ezdHJtDuHTw2ku6NJ6KyDgkRd9UPrdZ2XSlAstLDczo0YaEjb tNh57ZOxRaSbMajlcWyHvlo= X-Google-Smtp-Source: ABdhPJwo7pa5FDNVmAAzL9vvajkYDwrBsn4NR3XSiB3WmgCUDTO7UMQgoxuUDMUB3LJBawJ/AtJpbA== X-Received: by 2002:a05:6102:304e:: with SMTP id w14mr11429886vsa.52.1635110755219; Sun, 24 Oct 2021 14:25:55 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:25:54 -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 v2 5/8] staging: vchiq: drop trailing semicolon in macro definition Date: Sun, 24 Oct 2021 18:25:21 -0300 Message-Id: <20211024212524.370078-6-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142556_347036_8DF0EF4B X-CRM114-Status: GOOD ( 12.93 ) 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 definitions 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 6fbafdfe340f..d27c5191fbd2 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -986,7 +986,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) { @@ -1054,7 +1054,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 d64d6a0427eb..22d0e706b2dc 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 24 21:25:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580485 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 5CBF0C433F5 for ; Sun, 24 Oct 2021 21:28:48 +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 2158360E0C for ; Sun, 24 Oct 2021 21:28:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2158360E0C 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=LXXgaXztkrFGuPLb5UBwzUqkB3FIX2CxZqS/2gcIKE8=; b=Y0bl7ndNx+BKBd 6+kY8TaigXyJq4CgSCHsVk5YKkQuwVahL79h5kuMEtILlVega+isaKuOQlftCk59mg/xZ7kBtzEWo soTkOesENBwxWXL6t0DRQFMApXVKTZYDLfOq2Fg+aaAd1/QsZao3DdIp17kn7mhDMWUWKgMnrgTNb o164kWxz3AowSmnxcBmQO7tNpLT2m2Y7LlwVca+zQsYlAgyuwyVtivu5as4QF/KKMWEuqdmIeUGmU LLBWn+OZ5MWk3oUcUjVlbVPVJPXoxngVvfp17OZgz724xqVbnCsUX+oi/XpcA12moyiSn7vM2vIVo bz5EHzNYhXbl565iJyrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel1N-00Edph-LS; Sun, 24 Oct 2021 21:27:14 +0000 Received: from mail-ua1-x92a.google.com ([2607:f8b0:4864:20::92a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel0A-00EdPU-Me; Sun, 24 Oct 2021 21:26:00 +0000 Received: by mail-ua1-x92a.google.com with SMTP id p23so5450211uaa.6; Sun, 24 Oct 2021 14:25:58 -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=BejNJl14O6aHwjAG+IoiEw5ZBNgGlpDEHfmiIDvF9LI=; b=a19DZdYKn6qJjG6mB029RkAM3uANS7xF/XuyYFcsA1nbTX526qilPTwXg4CLoibLoI RJr5B9zgndK33T0bNydWSbiqyFSX6n6JB0rz5r07/puCaXtbJ+ubuyUwoT5YlXL/ioRj 7NSG7h3kumh+tqVt9/VP7kSVQcf0ndY3UoSAkkZlhb8+9FwtXwmOAznhT2m4cci4qj6F uQle7LYwTIgsZw5crbY1FPkmJ2kjrrEIna5kJNl21aLkRmE+eRxXOSG6BlcEKv5s7Wtt JgG7NME2H0yOEuG0t9h7HazP5Uw6VnHZpr0Ewmx7EA5CpBpYfaAo2lC5uJBJ1B088GKC ezaA== 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=BejNJl14O6aHwjAG+IoiEw5ZBNgGlpDEHfmiIDvF9LI=; b=XwuFvv+Dat2VkWjg4z4dwvufuPu0eDGGM/TPXO7mbwWs+A7Ek6UHtiLcB2s1tBKXyJ PpkmJshuqJ0yPWkHX6l3whQ0Cb48UCxRxmdTZabuPhD25kg7FnZ8ZI1a6I9Mw/IOY/0g xZF0drY2fZc219pjCvfOAlsX86uYmBRrlmeVCLFrfW0B+qE+8kTY6pmS0aLCg3cRhPbK gEYkfVfRwF4c8qwM2qgrnaPlOLVlokfORDVpCxnkDfb+rTyMAsibR/vpnY0ijm1VJj7f aGW68uPxS7JyJd9uhn3u11MmXq4gQT2girnlp4K9QxCvjFdz/6dKCwqVq3wEUjDoychO xTdQ== X-Gm-Message-State: AOAM530ElI3vUpUIexS2EV+BfofwicuQwfeAkpeBLLFfkrYwidhsxYdw baUjDAJJsNnM+sT5rPtjXP/ZIxTfeFCKxQ== X-Google-Smtp-Source: ABdhPJznOSLyMtcTR/+jLCQ8ioOfyvwxdVB4py1onqrN9cLcCdIrqqmNJcFRrJ9WJThZBvcRUAclrw== X-Received: by 2002:a05:6102:5088:: with SMTP id bl8mr11692070vsb.32.1635110757991; Sun, 24 Oct 2021 14:25:57 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:25:57 -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 v2 6/8] staging: vchiq_core: drop extern prefix in function declarations Date: Sun, 24 Oct 2021 18:25:22 -0300 Message-Id: <20211024212524.370078-7-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142558_823293_486E6B6B X-CRM114-Status: UNSURE ( 9.76 ) 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 24 21:25:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580487 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 D23CDC433F5 for ; Sun, 24 Oct 2021 21:29:05 +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 91F1F60F4F for ; Sun, 24 Oct 2021 21:29:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 91F1F60F4F 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=B4Fj6zPiqHA08/+QJWwwXGlpMkIvWdt/6fFFbFsLGxc=; b=Bj+pHzD9C7HY/D Yy8sVjV3oq5IHMsTjGrKsXME6kFs7LjIlWX+wjy2a+XQY1c4hVzY0Vd16WE+0+lD6IXlqDy1N59A1 tWefiCbMc0kd1Xl+fPT/gaWBt2dl+pRkiH/91A7fOJUKxRRLeBT/gu0OrfLWCr6RqPAoWfCicbae5 O/Z6qhsYP2vQQUHe51jRIBPv60HNxWGm9o9SlI4zj15gucJeHEjM7FwbXyPgwmDMgOjQJ1K0iTe8c 2zYOMd6//x4mkLXfeq/YSrHThyGnDdAje9IV+M32gwwBBmY0MWZWqTRzLjgzdLfvlfLwcaFZiaPsN E4KWACwXGLoSUAQRNpMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel1h-00Ee1p-Q4; Sun, 24 Oct 2021 21:27:34 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mel0D-00EdQV-Gy; Sun, 24 Oct 2021 21:26:03 +0000 Received: by mail-ua1-x931.google.com with SMTP id a17so18164566uax.12; Sun, 24 Oct 2021 14:26:01 -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=4S8lvEsQXwujwatrBqROuPbSEc2sWN6dV4j7Eupmi7s=; b=APlWGDUpN59fZPN1yxcsLEKZedLfhApeDuTLNqqG4jrsMplfUbgs77J+1xRi9BM4rp 5ZltchltKP1WyIQBmLV7q7fyznzhc6vk2xbZeJ28FrSpXPnsOWn4ESMYZLxy5xgMJIiB K/u1lwcdlX7wJWpkwt1v5YhDaGxKtgdeS/Uhp2tf04Ei6APKq+3zFMsX8Qu/gl2jyi7u cQsjabY4ArN34DqJo/RpMzSzFdNKKfIk1MTQ577vVnK5zoYluxR9PJZJvyMYMtUcqIzX 8BWjGTmRv/8YDNVuJeee7c3sC87WNNTMs+qBv1H7XDjT1215rXAqgZHu+5Sq3QT4c/uP UAaA== 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=4S8lvEsQXwujwatrBqROuPbSEc2sWN6dV4j7Eupmi7s=; b=faYahMxdx61X8FWO7BOpq3Z8hunHrsTywVut0XprLOZssA+f8Zu3FS3bqLiwZWLCdK 8Wkeavw6/edjDz9PDxCdolL0YXemMp8TC/TgXp1NL1o/VhKgCoX6ntUktHtPmrVeA3hF mK1KD78qDJ7nXuFWu6Qzi/3+2zOrWgyieLfiYKjNBELwdH7J6FBcz8nolMDucuZ+BFl7 ImHOJ9xJMUddfQQEmKFPH2L6q5/Tc5UBBSjpx7Tal+rx1Ebc+veV9bqavs3YIDimW0is w3Jb4taOH+bdWVhCXspqGA0g6dNER7SKVzUnwjwfSqPSKF/nE7rXs8qKP/x1allnWIED k8HQ== X-Gm-Message-State: AOAM531g5nb/jKKAbISkYktCpqKIbFCqmH1XDioH6sdrbXMTd2ANdlWI vt/RFkg/o50Z6o9GV6Mm7Rw= X-Google-Smtp-Source: ABdhPJyyaYJDZHmVS1HjJ6xuqswEkGW7P/Gw8WZ9b2YwYh9v4Qgr3gKHkpKcEEJPp94wdL0ZDlx7vw== X-Received: by 2002:ab0:30b3:: with SMTP id b19mr11829354uam.123.1635110760848; Sun, 24 Oct 2021 14:26:00 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 45sm8847869uaq.8.2021.10.24.14.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:26:00 -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 v2 7/8] staging: vchiq_core: cleanup lines that end with '(' or '[' Date: Sun, 24 Oct 2021 18:25:23 -0300 Message-Id: <20211024212524.370078-8-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212524.370078-1-gascoar@gmail.com> References: <20211024212524.370078-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_142601_596863_AF57241B X-CRM114-Status: GOOD ( 11.09 ) 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 22d0e706b2dc..3af55e78f356 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); @@ -3089,8 +3080,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 24 21:38:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12580489 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 D2725C433EF for ; Sun, 24 Oct 2021 21:41:02 +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 92D616054F for ; Sun, 24 Oct 2021 21:41:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 92D616054F 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=ov/H4uyPuyrOKBv8ZDJhPKcS1FAh7rgeDHwHewwD2I0=; b=ohACS/18o5m7OW H338vJla337VmC671h7KVqAidsotnnbT0uAeT9xanN4wc3ehiGm6KuPU4GP62DI10k9nE+uWvQCmg hD4y18kSb5nV6KSyvL9ulsI2LQJusii6Nps1wDFyHboVMIaecHCchwhgLEY2ILAsvo61gAzfO6ssB /2n4487XE7wOfdXukmlyIRkvkRjpGG850ygJKwnDugtY+CY+xLN0qOXbNPoccWnz0krFVJzXLTv6Q ltIKwDK3IaJpNfa7WzOBqEP/Fcc/fbYQjpzDs3fWCDFdJGnzRxMdQDmgdav+K/Z6FANTxv5EIlVY8 ZaFID81QyAoibULba5Ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1melDQ-00EgLw-25; Sun, 24 Oct 2021 21:39:40 +0000 Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1melDM-00EgL9-1v; Sun, 24 Oct 2021 21:39:37 +0000 Received: by mail-ua1-x92e.google.com with SMTP id q13so18315799uaq.2; Sun, 24 Oct 2021 14:39:33 -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=QraEw1MMGnwx9JFyFTABlxndaYwZD109U5RjGzZtJZI=; b=iAFPIe9cky/Um+h4fO1+FIa0SurP6snw6pXN1do26C7vDer6KwDZj38nDqJJRPnHS2 +tmhcJC5RGtdyHypd4k8WcJHQ6pC4pWY7Tit6Fx347a1tAZlmrcgi+k2f2IjNUraKDv9 a1lbho9OwNpqOAXxfqDNHMNsXA3r+C+MLJBvavUkcHxzWETdu/kfrlcCtFPXZPh9wZ5P d8DgS18fIJKqguHXaBYj4J0wEyYpVewHGbbaOorllUq07+6KZiUDtXnVufz3u1U2/dO0 WwmzcW6dmr9Js3y61NgrBxD96bBJGyeetPxnmOh2W94I+ALzY94e10KyNkTwE0AqTrGk 6jYA== 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=QraEw1MMGnwx9JFyFTABlxndaYwZD109U5RjGzZtJZI=; b=NqqP1ZhnhEHIw43H6AO/zzuW02efqgmqOwPdu15NXh8OwizU4Wmk4Gs7KfmuKEx3g0 MjX0Pb0F71N8Ccjw662POGQ1S8OvXXETdwuD8wjPUvn7aay1x9bJsG/hyNhbvjQqWxut 4wx0viIw4mIt3zxE78Yk8lEGAsN1zLfKCSz8mJ6pElViif7CdFmFsCf+lm2k7JGsHzXy lLmiLjMTLrXV9yy+EPCjUswVfDQAGPPO9DzW42LRNZKtQ0o70OBf5ltP1GfWMdNMD5Lg p7TF0CMoHE+LhkW0q26L0/IMqIIaf1Bk2312wafNlBv2NsK57FnSyWYqHSL6xJ4qpY9v 8bUA== X-Gm-Message-State: AOAM532yntvi5/JKVMoTYD7fv9CeQlgQlU0yA+ZS3YLccQnV7PHwJUd4 bEnfkJWOxWc3x0vyE5J/X9M= X-Google-Smtp-Source: ABdhPJygE+1fz6v4hPFhXo1k0yuQUD2l0NVhQv2MwZnMh51zGuIEcJ0lcMkm+x5zpTXwoQtuRHOQvA== X-Received: by 2002:a05:6102:3a56:: with SMTP id c22mr11776109vsu.26.1635111573193; Sun, 24 Oct 2021 14:39:33 -0700 (PDT) Received: from localhost.localdomain ([191.83.215.63]) by smtp.gmail.com with ESMTPSA id 64sm2046309vsz.15.2021.10.24.14.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 14:39:32 -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 v2 8/8] staging: vchiq_core: fix quoted strings split across lines Date: Sun, 24 Oct 2021 18:38:39 -0300 Message-Id: <20211024213839.370830-1-gascoar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211024212844.370379-1-gascoar@gmail.com> References: <20211024212844.370379-1-gascoar@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_143936_139739_557B78A4 X-CRM114-Status: GOOD ( 10.73 ) 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: this introduce a checkpatch CHECK: line length of 123 exceeds 100 columns, 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)", But now the string is grep-able and the whole function call 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 3af55e78f356..ab97a35e63f9 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;