Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6647393imu; Wed, 14 Nov 2018 05:01:17 -0800 (PST) X-Google-Smtp-Source: AJdET5c9k2G1XxrWwjLmB2T3y9OozWsU7lsVVZojU7rXSTrDdyl0FU01rK6iNBhThiSVk/17oi6c X-Received: by 2002:a17:902:f08f:: with SMTP id go15mr1857161plb.332.1542200476958; Wed, 14 Nov 2018 05:01:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542200476; cv=none; d=google.com; s=arc-20160816; b=Vcp7EQoizLmoS5DLx69mwdcqIWpkMQFlW72t7yPHCp9c19PW77Ug4P4Eftn7dhdkEv Nl6PruEFm5VIfXjB7HV8z8EQgInnz55Mcs74lwiI/Ws5vqqxIKMum/r3kHMLUwGMSopL kcP2+78PhhICYovk5YzngNceZ5VetMQHhWXfUiU69Fbn713Pily0l49eR2CKTfSzd0XV kIDBtFVjZK/21VF8aHDq/YNvMlwK+qidJ7YDUpGyxiOGu5lBq7PPQFKP7hbHCERFOtwI w/33igSqarmoJ9fvuqduxMXxCs7c9LQvsY3HydpR8JSVz6VPf0SHODeT8a6FRTuxzPuJ RSFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PS/PxEYJRJXURg5T50v47cLsPvNeLgf6REc93JaolTo=; b=V3+shs1r0u9IyhdwytrnRxTkfm9jln/bPYuk9fjJD+5yVTLOjy9Y8v2yz2FzwVn6fO CVhEBgfx9FBabtprEBFVW8ToJcNxciga1rNyIYSw52F97LmhUKLmP1ib4lN+InwL70xd sALc3olRI40QDttde5GCqWYSjJMDeUS4yZKP+tAzdT+rnLJbbE65P8lRsYIOLiYqcNo/ Pn08Fa8VmeDyas4Xy/qL7il/RFlM+DPMg07d++MIyq2xedh4hZVgTGYlPu0jNULMFfnF sWKDSd/RuFS/r8FCc8JEJP6eerQPkAGgkcPOg+gZpXa+gnbmkZvlriQyIQx3U36DpG+0 mOyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si23995160pgm.420.2018.11.14.05.01.01; Wed, 14 Nov 2018 05:01:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733013AbeKNXDi (ORCPT + 99 others); Wed, 14 Nov 2018 18:03:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:44580 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727731AbeKNXDg (ORCPT ); Wed, 14 Nov 2018 18:03:36 -0500 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 4DDA1B0F6; Wed, 14 Nov 2018 13:00:26 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, eric@anholt.net, dave.stevenson@raspberrypi.org Cc: linux-rpi-kernel@lists.infradead.org, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Nicolas Saenz Julienne Subject: [PATCH 16/16] staging: vchiq: add more tasks to the TODO list Date: Wed, 14 Nov 2018 13:59:42 +0100 Message-Id: <20181114125942.25163-17-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181114125942.25163-1-nsaenzjulienne@suse.de> References: <20181114125942.25163-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The TODO list was missing some tasks needed before upstreaming the device. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/TODO | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/staging/vc04_services/interface/vchi/TODO b/drivers/staging/vc04_services/interface/vchi/TODO index 0b3ec75ff627..fc2752bc95b2 100644 --- a/drivers/staging/vc04_services/interface/vchi/TODO +++ b/drivers/staging/vc04_services/interface/vchi/TODO @@ -49,3 +49,45 @@ such as dev_info, dev_dbg, and friends. A short top-down description of this driver's architecture (function of kthreads, userspace, limitations) could be very helpful for reviewers. + +7) Review and comment memory barriers + +There is a heavy use of memory barriers in this driver, it would be very +beneficial to go over all of them and, if correct, comment on their merits. +Extra points to whomever confidently reviews the remote_event_*() family of +functions. + +8) Get rid of custom function return values + +Most functions use a custom set of return values, we should force proper Linux +error numbers. Special care is needed for VCHIQ_RETRY. + +9) Reformat core code with more sane indentations + +The code follows the 80 characters limitation yet tends to go 3 or 4 levels of +indentation deep making it very unpleasant to read. This is specially relevant +in the character driver ioctl code and in the core thread functions. + +10) Reorganize file structure: Move char driver to it's own file and join both +platform files + +The cdev is defined alongside with the platform code in vchiq_arm.c. It would +be nice to completely decouple it from the actual core code. For instance to be +able to use bcm2835-audio without having /dev/vchiq created. One could argue +it's better for security reasons or general cleanliness. It could even be +interesting to create two different kernel modules, something the likes of +vchiq-core.ko and vchiq-dev.ko. This would also ease the upstreaming process. + +The code in vchiq_bcm2835_arm.c should fit in the generic platform file. + +12) Get rid of all the struct typedefs + +Most structs are typedefd, it's not encouraged in the kernel. + +13) Get rid of all non essential global structures and create a proper per +device structure + +The first thing one generally sees in a probe function is a memory allocation +for all the device specific data. This structure is then passed all over the +driver. This is good practice since it makes the driver work regardless of the +number of devices probed. -- 2.19.1