From patchwork Sat Sep 11 13:23:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ojaswin Mujoo X-Patchwork-Id: 12486407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6641FC433EF for ; Sat, 11 Sep 2021 13:42:38 +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 280FD60FE3 for ; Sat, 11 Sep 2021 13:42:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 280FD60FE3 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: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:In-Reply-To:References: List-Owner; bh=CXAmm/tSZzXTMqzs4zlRUCSGZXO2CNf1u4m5gW9Mh+Y=; b=Gr8VMKXhQvC9eb kiskLnaVks8huJMHeIlAr2bEVaO1CU/3ZzcE0JVi2LQslW5I6vAFzsdmnaEn4v0oGPAvSaK9h5A9z Mo68MrMaWUfur1b8E+q6215S2n1XnfR51zh3lvc9o1EtvcfcBFCXadgbIalKxdriZ/Z0epth7uJ3p 6DFuPwK6pUN0mgfQ2+L+V6/67kFopV/2LkgCR3qlsyan5l5xycjWqGlM/NYDao5FGZFDeJAcfqOcW 86XYlBHqP7n2XYCrAkFuJrSiN94dVlDpfFcRyapirnOEHr9AAsq2zsRo1TyVtlwPPtR4s5rVOOeNr Up5sQTzkpZC76M7gbWLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mP3F6-00F28U-EP; Sat, 11 Sep 2021 13:40:28 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mP2yk-00EwZV-R4 for linux-arm-kernel@lists.infradead.org; Sat, 11 Sep 2021 13:23:36 +0000 Received: by mail-pj1-x1033.google.com with SMTP id w19-20020a17090aaf9300b00191e6d10a19so3343716pjq.1 for ; Sat, 11 Sep 2021 06:23:34 -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:mime-version :content-transfer-encoding; bh=iuF06DHpNjdKdQXTxnOrZj3TR4UMi4HvEbGD0dPOPXw=; b=YTXhZa0YjdeqLQ3/1n4fBMq28pqDmUFvsBWa3PVXWScYoSufRnuxWBpXkl79ltIFtp heaJaQ2PJFnsOoBO+DNvev/r+zAKJLuVrxFTZi6JE1QSRgoVl8qY1sOAupVn3ncoZbhw BQg2LLb4NFyfFKDVUKtLIG3gFWkXJO+5WlyX10kkKu/9PYRa8Bit9F+83x2qt53pR/Vs z9u/opwYrW8cZJa1UESz2Uz5WIX5pGPXl+U+rp7eQIR+aZ4S/D8LNablnrvJiZXuL26u DW6x6k4gzwfQID//hxZBKV4DbdioCfv/PxnCJGStW9RQM/PJedf7qq/sZWwjNt1lsGYb iDbg== 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:mime-version :content-transfer-encoding; bh=iuF06DHpNjdKdQXTxnOrZj3TR4UMi4HvEbGD0dPOPXw=; b=YoFgs1+M74JFeBD5EtkVyF69/rdj7kCM6RI3D/D5/DKLBUhIFXv2bif4Nx0L+rZMpP urQs1w3kNmdavQe9jEzA9SUCpeXu9R1MCXaNfNuLC8IiuxcOjSE+nb0GVM+4CfkheIBf nOJJqZseV5qZ4sXcABroc3tS3wM6xSAvEPQ35+IG7+qteB6XOiAZSRwqDREnPQNrwKdC b9fKWik6ZLGd0+lWX0xoAI1++B7+dtI0NadJf29AAjOBHLjafm/T4S4nTT7IPQJSL6Hy NMIwn0CsblZlWcr8OA/ZlYMDE/JfHpjF/Slop+zLuRrrYKjDBisEJ7dmeDfjGtljx9Em 731w== X-Gm-Message-State: AOAM532o76Q1tnwEUzecOtzldzyw5xK2Bgd5GN0Kz6s0g0uw5TQbE0g2 QT/70vtBgO5fvGTxWTao7G0xmg7dCyk= X-Google-Smtp-Source: ABdhPJyoUzF6PPKvnxULbrlSREXyHCWNEic/IFu1sKh61dPZyjw8QPiVgOyfYTrF9J69XfnMboArDg== X-Received: by 2002:a17:902:bf43:b0:13a:ae0:9dee with SMTP id u3-20020a170902bf4300b0013a0ae09deemr2417840pls.62.1631366613988; Sat, 11 Sep 2021 06:23:33 -0700 (PDT) Received: from localhost.localdomain ([122.161.51.62]) by smtp.googlemail.com with ESMTPSA id l14sm1951897pjq.13.2021.09.11.06.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 06:23:33 -0700 (PDT) From: Ojaswin Mujoo To: nsaenz@kernel.org, gregkh@linuxfoundation.org, stefan.wahren@i2se.com Cc: dan.carpenter@oracle.com, phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: vchiq: Replace function typedefs with equivalent declaration Date: Sat, 11 Sep 2021 18:53:25 +0530 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210911_062334_954021_B3407026 X-CRM114-Status: GOOD ( 14.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 Replace function typedefs with the equivalent declarations to better align with the linux kenel coding style The following typedefs were changed: * VCHIQ_CONNECTED_CALLBACK_T * vchiq_userdata_term Signed-off-by: Ojaswin Mujoo --- .../vc04_services/interface/vchiq_arm/vchiq_connected.c | 4 ++-- .../vc04_services/interface/vchiq_arm/vchiq_connected.h | 4 +--- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 6 ++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c index 0ee96d1d0481..83502f5f3a33 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -10,7 +10,7 @@ static int g_connected; static int g_num_deferred_callbacks; -static VCHIQ_CONNECTED_CALLBACK_T g_deferred_callback[MAX_CALLBACKS]; +static void (*g_deferred_callback[MAX_CALLBACKS])(void); static int g_once_init; static DEFINE_MUTEX(g_connected_mutex); @@ -28,7 +28,7 @@ static void connected_init(void) * be made immediately, otherwise it will be deferred until * vchiq_call_connected_callbacks is called. */ -void vchiq_add_connected_callback(VCHIQ_CONNECTED_CALLBACK_T callback) +void vchiq_add_connected_callback(void (*callback)(void)) { connected_init(); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h index 95c18670e839..4caf5e30099d 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h @@ -4,9 +4,7 @@ #ifndef VCHIQ_CONNECTED_H #define VCHIQ_CONNECTED_H -typedef void (*VCHIQ_CONNECTED_CALLBACK_T)(void); - -void vchiq_add_connected_callback(VCHIQ_CONNECTED_CALLBACK_T callback); +void vchiq_add_connected_callback(void (*callback)(void)); void vchiq_call_connected_callbacks(void); #endif /* VCHIQ_CONNECTED_H */ 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 9429b8a642fb..083abfd8e212 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -2474,7 +2474,7 @@ struct vchiq_service * vchiq_add_service_internal(struct vchiq_state *state, const struct vchiq_service_params_kernel *params, int srvstate, struct vchiq_instance *instance, - vchiq_userdata_term userdata_term) + void (*userdata_term)(void *userdata)) { struct vchiq_service *service; struct vchiq_service __rcu **pservice = NULL; 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 957fea1f574f..3ef4cbe1053c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -152,8 +152,6 @@ enum vchiq_bulk_dir { VCHIQ_BULK_RECEIVE }; -typedef void (*vchiq_userdata_term)(void *userdata); - struct vchiq_bulk { short mode; short dir; @@ -198,7 +196,7 @@ struct vchiq_service { struct kref ref_count; struct rcu_head rcu; int srvstate; - vchiq_userdata_term userdata_term; + void (*userdata_term)(void *userdata); unsigned int localport; unsigned int remoteport; int public_fourcc; @@ -476,7 +474,7 @@ struct vchiq_service * vchiq_add_service_internal(struct vchiq_state *state, const struct vchiq_service_params_kernel *params, int srvstate, struct vchiq_instance *instance, - vchiq_userdata_term userdata_term); + void (*userdata_term)(void *userdata)); extern enum vchiq_status vchiq_open_service_internal(struct vchiq_service *service, int client_id);