From patchwork Wed Nov 14 12:59:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 10682485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63C0914E2 for ; Wed, 14 Nov 2018 13:01:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 542872B096 for ; Wed, 14 Nov 2018 13:01:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 437552B0B2; Wed, 14 Nov 2018 13:01:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E0CE2B096 for ; Wed, 14 Nov 2018 13:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=uQna3MUZYIJI/y5nvieDdHQElkT1gyczhSYvxi0K/Zs=; b=TBKLvgeoz87NJe YiJ716Meg6dCJdpD9ra6800+xTks0z8itF1zbty+pu1IyW5OetZLO2OEAU3LAGVVCeOJiW8jD9l4S Dfq773OSupbviuPDoXE3PF/StpWdO9btcDcQHB5+brHwu/36TzRTq/Gxn51FZCJmmLSD+J0Px+E4o ljI6V88BknN2WJQCxXBBEp32Jz3du77rOIUsEJsi7hIVNSpOdPOHdTNc0BLhavTXldR+VcBw+w0S3 R2DC4OAxrlc0olBkpsNsNG12kgarTJJhjYoFajCCR5YLDEvMLTrHK9ahcEbbPFd/dageI1HGDZOZ4 IvH1ad4yXAoWnbKblGcg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMunD-0000C6-Cs; Wed, 14 Nov 2018 13:01:15 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMuma-00085g-N4; Wed, 14 Nov 2018 13:00:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KD76rgWd80+aLSVPQC0oQ9BKj0BU48MSwkSVs39alfs=; b=k9l4Ia3ssMIRVDo2JXhZXHXTso dOnyg1Da2iyhlaDtTvK2GFDapqwmUROFuLO+V3qmw8J/l88/JZlWRipD8UazXVwjXNJkXf1iU7Vy5 c7YXp8+yvPDZopP+p1mqpHObkrALtaEe5JyDXYPUnghxfcXkGcTckfQ0m7A3V69juLNwzJ75xB57c Obs1/mG28VQRwAfPvgP3bC6V63CcnTZiELiqQ0AMFA3icvQBqgT44lBloS7sfTHCmZCHv54iNvts8 3Uzdcw0yLOJPT7fdsPkv2BzJgIXo7Zy/xKGFxcQCquLEOraHX0LPhnfOTutjRIsLDN6/kL6ctb8WH N1WdMlYQ==; Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMumW-0004pM-Sc; Wed, 14 Nov 2018 13:00:34 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BA10BB082; Wed, 14 Nov 2018 13:00:15 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, eric@anholt.net, dave.stevenson@raspberrypi.org Subject: [PATCH 00/16] staging: vchiq: dead code removal & misc fixes Date: Wed, 14 Nov 2018 13:59:26 +0100 Message-Id: <20181114125942.25163-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181114_080033_070778_152E2273 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All, This series was written in parallel with reading and understanding the vchiq code. So excuse me for the lack of logic in the sequence of patches. The main focus was to delete as much code as possible, I've counted around 550 lines, which is not bad. Apart from that there are some patches enforcing proper kernel APIs usage. The only patch that really changes code is the vchiq_ioc_copy_element_data() rewrite. The last commit updates the TODO list with some of my observations, I realise some of the might be a little opinionated. If anything it's going to force a discussion on the topic, which is nice. It was developed on top of the latest linux-next, and was tested on a RPIv3B+ with audio, video and running vchiq_test. Regards, Nicolas === Nicolas Saenz Julienne (16): staging: vchiq_core: rework vchiq_get_config staging: vchiq_arm: rework close/remove_service IOCTLS staging: vchiq_shim: delete vchi_service_create staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list staging: vchiq_arm: get rid of vchi_mh.h staging: vchiq_arm: rework vchiq_ioc_copy_element_data staging: vchiq-core: get rid of is_master distinction staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state staging: vchiq_core: do not initialize semaphores twice staging: vchiq_core: don't add a wmb() before remote_event_signal() staging: vchiq: use completions instead of semaphores staging: vchiq_util: get rid of unneeded memory barriers staging: vchiq_core: fix logic redundancy in parse_open staging: vchiq_arm: rework probe and init functions staging: vchiq_arm: fix open/release cdev functions staging: vchiq: add more tasks to the TODO list .../staging/vc04_services/interface/vchi/TODO | 42 ++ .../vc04_services/interface/vchi/vchi.h | 8 - .../vc04_services/interface/vchi/vchi_mh.h | 42 -- .../interface/vchiq_arm/vchiq_2835_arm.c | 18 +- .../interface/vchiq_arm/vchiq_arm.c | 598 ++++++++---------- .../interface/vchiq_arm/vchiq_core.c | 523 ++++----------- .../interface/vchiq_arm/vchiq_core.h | 47 +- .../interface/vchiq_arm/vchiq_if.h | 11 +- .../interface/vchiq_arm/vchiq_shim.c | 32 - .../interface/vchiq_arm/vchiq_util.c | 48 +- .../interface/vchiq_arm/vchiq_util.h | 6 +- 11 files changed, 435 insertions(+), 940 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface/vchi/vchi_mh.h