From patchwork Wed May 18 19:11:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 12854012 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BC04FC433F5 for ; Wed, 18 May 2022 19:16:17 +0000 (UTC) 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=h2hqKtqyMMTcFVAeeK84zCmGZK1WMFAA3U/oroLdjtE=; b=MXsm0qptqYPVzz tQktsZdaIqfRF+VzQtM/qismMex3J7EDcQeFUcUE7B9g9gUURDyHzzkFXiUlcgWheYN5xlqhKEq1X hR+C07sd83AiHs0yBdycIyx4zK56sV/VopJfxiH+MjughwhD+FmLwLhWWcXzHVwZRDVdtYFYzX/a5 ENWmKCjRZMqNQuvqxtGNKNFPBuOrByZG9CvE7TTbJ1nNnz5DeD9jqFXIZ48V3s5g31WBqiaBnA6Ni 5PaII7XSvJgDkiyoh35T8p0aWu6SeC/Xb3Mv8aIPcFspdaiFrBHl07YFG+xVAMIrxC4c8ds3kSgn3 vAGPseiaPLyWfZBK/h5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrP8L-003ZGI-Rb; Wed, 18 May 2022 19:14:58 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrP5m-003Y6z-6F for linux-arm-kernel@lists.infradead.org; Wed, 18 May 2022 19:12:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652901137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l8gCe9susi6NfgsCNuuQgf+6siaGgjwLwt7ni61B8hg=; b=gsZF/JCHivndMJMKf7rp8ho5x2ybdd3Og9aWmOSggVGv8zQUIj+cOO6cMbW24RLwsjqsq6 raMcMXdWmrROAgL0O9hyo1Sc/7UUbCHLdxPiU+nye9KnjH6wF3tz9NxBv+qQc4quH2WD0M iqcykIjySiksj6wLvw5eF4KA+wD9xDc= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-474-omaK3G5EPYSozgSKh1IGhw-1; Wed, 18 May 2022 15:12:16 -0400 X-MC-Unique: omaK3G5EPYSozgSKh1IGhw-1 Received: by mail-qt1-f199.google.com with SMTP id q13-20020a05622a04cd00b002f3c0e197afso2419268qtx.0 for ; Wed, 18 May 2022 12:12:16 -0700 (PDT) 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=l8gCe9susi6NfgsCNuuQgf+6siaGgjwLwt7ni61B8hg=; b=q4HO0aX0jnJKvW/lyZgy8BQHE0JE/kRgpnGJMSoagnPVMwKrIvOrz5XcMinanhF9X8 O5sC0Vsb7uI6v+pe49JOmPUlA4+GZbVMWtADO448z1nIIJqnTzDIESp/YE/W5AjRkpbp 2o6RdgXdKv1bYtLL+vUVjAAqlK0N3aOOSNQ/Mh9DPX5sXfVrwNgABuzz/+I2v+vivd6e pF3XccdG+GUTEwmB/Ji/iIBqGJAfb9b5yQn1l9dSp09i+rmXHhfOJ8sjBBS+Pfz0mSfX gBnaUd8o27vJ0/gguNEkDexba/cEiybPs8M4OFHXiG9vlMYFZmWL2TGqLlszg44j3MbB Gytw== X-Gm-Message-State: AOAM5322Jd4BmN7/xMxZf4st+JDtOG/gthw+Av0QNJ1jcgxPKtdqj+Pp knWx8ZBfgIsyCwUwDL+J5nMASpUk1cjfRaZ9aXSH1zvNzrzbN+mj8EKuANkb4ALcW4tAH39QPR1 VDTZDukj8+9c035yL61HPbaku7y7IgLeVwv8= X-Received: by 2002:a05:622a:1a11:b0:2f3:b198:ae7c with SMTP id f17-20020a05622a1a1100b002f3b198ae7cmr1198327qtb.100.1652901135464; Wed, 18 May 2022 12:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoiw+VUlsM0r4I7oEaqGRHv2kq3ELNWCsR/x3VttLIitkD8PwEu4ezBFl0oGDnWO1ud2vZCw== X-Received: by 2002:a05:622a:1a11:b0:2f3:b198:ae7c with SMTP id f17-20020a05622a1a1100b002f3b198ae7cmr1198316qtb.100.1652901135279; Wed, 18 May 2022 12:12:15 -0700 (PDT) Received: from fedora.hitronhub.home (modemcable200.11-22-96.mc.videotron.ca. [96.22.11.200]) by smtp.gmail.com with ESMTPSA id z190-20020a37b0c7000000b006a32d491f92sm39183qke.39.2022.05.18.12.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 12:12:15 -0700 (PDT) From: Adrien Thierry To: Nicolas Saenz Julienne , Greg Kroah-Hartman Cc: Stefan Wahren , Adrien Thierry , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev Subject: [PATCH v2 9/9] staging: vchiq_arm: remove global 'vchiq_states' array Date: Wed, 18 May 2022 15:11:20 -0400 Message-Id: <20220518191126.60396-10-athierry@redhat.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220518191126.60396-1-athierry@redhat.com> References: <20220518191126.60396-1-athierry@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=athierry@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220518_121218_365082_A4136DC1 X-CRM114-Status: GOOD ( 12.25 ) 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 global 'vchiq_states' array, which is not used anymore. This is part of an effort to address TODO item "Get rid of all non essential global structures and create a proper per device structure" Signed-off-by: Adrien Thierry --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 8 -------- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 2 -- 2 files changed, 10 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 cd23d18f8b3c..7b9c100eb74d 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -162,7 +162,6 @@ int vchiq_sync_log_level = VCHIQ_LOG_DEFAULT; DEFINE_SPINLOCK(bulk_waiter_spinlock); static DEFINE_SPINLOCK(quota_spinlock); -struct vchiq_state *vchiq_states[VCHIQ_MAX_STATES]; static unsigned int handle_seq; static const char *const srvstate_names[] = { @@ -2157,11 +2156,6 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero, s char threadname[16]; int i, ret; - if (vchiq_states[0]) { - pr_err("%s: VCHIQ state already initialized\n", __func__); - return -EINVAL; - } - local = &slot_zero->slave; remote = &slot_zero->master; @@ -2282,8 +2276,6 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero, s wake_up_process(state->recycle_thread); wake_up_process(state->sync_thread); - vchiq_states[0] = state; - /* Indicate readiness to the other side */ local->initialised = 1; 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 f87b4b9b3596..e08206397076 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -450,8 +450,6 @@ extern int vchiq_core_log_level; extern int vchiq_core_msg_log_level; extern int vchiq_sync_log_level; -extern struct vchiq_state *vchiq_states[VCHIQ_MAX_STATES]; - extern const char * get_conn_state_name(enum vchiq_connstate conn_state);