From patchwork Tue Nov 20 14:53:35 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: 10690549 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 DB6E014E2 for ; Tue, 20 Nov 2018 15:49:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C77432A197 for ; Tue, 20 Nov 2018 15:49:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB6AE2A270; Tue, 20 Nov 2018 15:49:14 +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 52D4C2A197 for ; Tue, 20 Nov 2018 15:49:14 +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=yzz4E3s67s/6BqnalgEQLNW0RKsa9M2KCyFnkf2RksU=; b=FCck5gXpUlLcsX u8eLhwmouj1NL7zZeXz6gUNdkzQcswE2YNQ4HtAcNVTqu2GLlQeBlvu9ac6WZKPIYBs9nI9w6Y3aw K2FFCwcHUytxG1cSgmbDztibsXo0OhLhf6jQAI4vvVet6NaHngbD1/FXPyy8nzzpNe0t7gk/s1Kuq DFoqwGdNjZotLmS/tHoZhH9/mjKpyyRps6DNbmhe0mj6zT6rMB0CLcKABQpyg550+mUe+zj62mS5p Hqjm1GqSmB7IdjQfUl28cjSQ64Is3IHC/LyR865/aEGIYr64wVcv2Xkr4Mkx+6ZCdHYi5cUyBeXTX MKY7UjtvcCGwQCRdhmxw==; 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 1gP8H3-0005eW-5F; Tue, 20 Nov 2018 15:49:13 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8Fe-0003nl-KD; Tue, 20 Nov 2018 15:47:46 +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=6bBl0extUKb+i97qElkS1gt5B7glpJLaRqQfl2qLAgg=; b=eaIzfWxm2bHbu5PvhaiCCYP6tj 8y3EstiRvpdZyd9qJ/dSF0WXQkd1Gv9e3vUVYjKuKLiH/wuVHk/8KWF/7stpueji7jUXaAJiBhqwQ Sj/i46oTejX4tAZT1lUdiSUYGAYJWQJdyM1ZvOwWGwIGSX83/yw5yMEtX1cAkmtE8hxQ3ESRqi3NG A+Nqwf+PgbS9v2cyeeWZFxRPXd20Lq1UTSf6flVufJKHHax20TQQ6Ay0DAn2mz7KovVMlgUxKbIR+ dk/K6bZxko+EIwZMz3C89bL/HVYyflYyGJESbEsMTPIEBtcc9wwOwPwna9fEvd6n5Ap35XwJnjUtg +DyXeUdA==; 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 1gP7Py-0000Qi-Gi; Tue, 20 Nov 2018 14:54:23 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ABB74AC24; Tue, 20 Nov 2018 14:54:06 +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: Tue, 20 Nov 2018 15:53:35 +0100 Message-Id: <20181120145351.30390-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-20181120_095422_666958_896CCD40 X-CRM114-Status: GOOD ( 12.88 ) 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 RFC -> PATCH, as per Stefan's comments: - Remove semaphore initialization from remove_event_create() (commit 9) - Join all three semaphore to completion patches (commit 11) - Update probe/init commit message (commit 14) - Update TODO commit message and clean up (commit 16) - Fix spelling on some of the patches === 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 Acked-by: Stefan Wahren