From patchwork Wed May 18 19:11:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 12854004 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 B3A26C433EF for ; Wed, 18 May 2022 19:13:13 +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: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=Cp/UWDects00pBZ4O0JQZxY4E6SWGrVVPNEh8KCzLL4=; b=Lb/4uqLchRtafO z6rSVGtwxcYbTKRxuh40uAuzfuBffgmVkn4UQjJjRm3EmdxFz0m+wrWo+qcXj8/hUd3ZRMnnWDe4w 9PIJQPwW8qlNCaiS3folpU6yT58SfHD1lkvOwl5NfV7SmI5nTHtcRmgqmnp5N/Guxjyux3D35O1L0 RY0zEJ9J0gpVXRo2Q/pFFRrSreYS6hsWG7oblX/kBTr3KtRYdiWjrDPwq6MC1sSBo7+XMinXk975u P+ATu253rU/S603lzWJQUKBYfPK2LaJKJyaCMeg2B9w19VKxJx6cx+odQ2PoBuivwU3/0wOR18jv7 2s8wWFqOFn/Jl/Z3YP8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrP5M-003Xx1-Rk; Wed, 18 May 2022 19:11:52 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrP5K-003Xwd-8C for linux-arm-kernel@lists.infradead.org; Wed, 18 May 2022 19:11:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652901109; 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; bh=8IPr4BqiZkpa6rDCPznS2vW1CcA8i8Vnd3gRfZzsA+o=; b=UEX04Lq9sVlEhI4eYD2fdoNnQlZ3+YobPrEhnMNF8F/4Ta/LUGKPV5THqLntb0X4tyIexd 8M13sk6xDZPzjJuKBKO07CHYK2o90dA88g1S2jkvrozs+6P9TV1MbEHf5bTkKHGDURrdxr jPyYGZL33+yZBJ1DvAmaFPUzxCBhkOQ= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-451-nEhwwZ2PMluNg-ghVIiXLQ-1; Wed, 18 May 2022 15:11:42 -0400 X-MC-Unique: nEhwwZ2PMluNg-ghVIiXLQ-1 Received: by mail-qv1-f70.google.com with SMTP id fw9-20020a056214238900b0043522aa5b81so2305916qvb.21 for ; Wed, 18 May 2022 12:11:42 -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:mime-version :content-transfer-encoding; bh=8IPr4BqiZkpa6rDCPznS2vW1CcA8i8Vnd3gRfZzsA+o=; b=DYILUhuKT6mCaGyYPbcLFFk2G/n1EGLKkDil2q7BS3j4YXdNDCujYiUxw5961+1D0o dRVwkUjlUMwgy1nWEvn21R4btZQIFq5UBmYMMSdizXHaLu51z0bYb4fEK3dz/FR/I8Xt ayPW+T4ki7eQ0extvAbuYym11sNDUzF6RIvuFjRbAAFLU+kXfSnoWuxMJsm0ukfmDG+u E6mCJf2BNK7FjgDDxT2D2QreVmoKBiVSV2uUmHsbR6+L9pSREwad1tcV6+ltqkBJbymO eH7is8ttNA0fXTjcmjYdMCB3xChPK5KF6qq1diIhbXUddoc7rVD4NTDcIcPN2qO42B03 ghhA== X-Gm-Message-State: AOAM533013+2VWsQEMG8GhEMs30lXgHjUBRrGwDN4altlpiHDhXTRCcq 6U4OxF1AYcmFd35qHn9gA2Nda9QSTk2cB8BYcnLJswIXlRA4tQi8Q7pJh2loNgH4Hs4QAYoPSeN BKK2ZidfnZwiVmhT9N3DimJHGfBSjY0wY3yQ= X-Received: by 2002:a05:622a:4d4:b0:2f3:c529:5f89 with SMTP id q20-20020a05622a04d400b002f3c5295f89mr1210026qtx.158.1652901102400; Wed, 18 May 2022 12:11:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYZgRv0g3JeofREFLmW2IgIGkmSDCryr1c3yqJ2yudxdlL8FGAuZutBYugwNKI3wVjL3Rslg== X-Received: by 2002:a05:622a:4d4:b0:2f3:c529:5f89 with SMTP id q20-20020a05622a04d400b002f3c5295f89mr1210003qtx.158.1652901102177; Wed, 18 May 2022 12:11:42 -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.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 12:11:41 -0700 (PDT) From: Adrien Thierry To: bcm-kernel-feedback-list@broadcom.com, Florian Fainelli , Greg Kroah-Hartman , Nicolas Saenz Julienne , Ray Jui , Scott Branden Cc: Stefan Wahren , Adrien Thierry , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev Subject: [PATCH v2 0/9] staging: vchiq_arm: remove some unnecessary global variables Date: Wed, 18 May 2022 15:11:11 -0400 Message-Id: <20220518191126.60396-1-athierry@redhat.com> X-Mailer: git-send-email 2.35.3 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_121150_395799_45BACCCB X-CRM114-Status: GOOD ( 10.63 ) 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 This patch series aims at removing some unnecessary global structures (namely, 'g_dev' and 'vchiq_states'), in order to make the driver more robust. 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". Changes since v1: - added more info in commit messages - split commit removing the 'vchiq_states' array into several changes to make the review easier. Adrien Thierry (9): staging: vchiq_arm: add reference to vchiq device in vchiq_state staging: vchiq_arm: get rid of global device structure staging: vchiq_arm: pass vchiq instance to service callbacks staging: vchiq_arm: pass vchiq instance to 'find_service_by_handle' staging: vchiq_arm: pass vchiq instance to 'vchiq_get_client_id' staging: vchiq_arm: pass vchiq instance to 'vchiq_get_service_userdata' staging: vchiq_arm: pass vchiq instance to 'handle_to_service' staging: vchiq_arm: use state from vchiq instance staging: vchiq_arm: remove global 'vchiq_states' array .../bcm2835-audio/bcm2835-vchiq.c | 40 +++++--- .../include/linux/raspberrypi/vchiq.h | 48 +++++---- .../interface/vchiq_arm/vchiq_arm.c | 92 ++++++++---------- .../interface/vchiq_arm/vchiq_arm.h | 8 +- .../interface/vchiq_arm/vchiq_core.c | 97 ++++++++++--------- .../interface/vchiq_arm/vchiq_core.h | 38 +++----- .../interface/vchiq_arm/vchiq_dev.c | 40 ++++---- .../vc04_services/vchiq-mmal/mmal-vchiq.c | 63 ++++++------ 8 files changed, 217 insertions(+), 209 deletions(-) base-commit: e41f7a5521d7f03dca99e3207633df71740569dd Tested-by: Stefan Wahren