Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp860372imu; Tue, 20 Nov 2018 08:03:32 -0800 (PST) X-Google-Smtp-Source: AJdET5d+bl5OCmTLcyh3GjF7V6s8PffL8zjmJVTBq2yrt6+w23/qGoXTqLaAcp+HJWqmOAJI41LU X-Received: by 2002:aa7:804e:: with SMTP id y14-v6mr2700863pfm.73.1542729812124; Tue, 20 Nov 2018 08:03:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542729812; cv=none; d=google.com; s=arc-20160816; b=MZQlPsLAER72lTBUiO+LTR0ONraiF17pKYgcN3hsvg9s9ZxfDU4SMfPEpQ21m2qNiX 2RcON8QSg3OnPyCoEeBIQb7CA89jMA6CnI3IG0v2EWUXHWkz1ZpsXuNxnh/BdaI97Rm/ JIMdBNL1OpP5Wuqn7CuJKX+isQ0gtxsHsaLkqpfiKK9kBz+VCoQQWeEl614IAMsZ/mSY l1wC/OLB4RFqb+4ed428o5Fg26j83xujMXVY7GmIWHMIVZ3l1zPLT9pgnZKi3imPGeJH mGCS6Ib3rNlEyl0oeYyPSh683Nu+lw0Rk//p36zL0IRjwWFDIm3TG1gdcpo8cIdXWV22 Gbrw== 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=iKJyxEJ1aR3/GFxEszz+ZHa4xU0E4Pb22/D+X2epfkrogSTelaaed9bz36IGV2yKt2 YECu4IR+hQSVrQ02MOVYmJYfE+Ehken15yCMtVcScgRnI7OoYNVcaeZdeAaAz6DTaSFJ wQTy/u0zgbDdXd46X/FAzk7LfQccYEwqBDbxer87C9AlMFPPiZ/1Cmz1zaYLLevtlSyn NYU5Tsei1BLFZCiiOG1S1T8unSjox6GbJWJxplGNzNOM/w9NqkfgHfga2ws0sM0tvGoP AEXZiEZNFQaim45giVbE8qGn/6RO0P/Ex3XivEk41PuND0U2SnjBkgPdejjLYHR7m+4/ YVxA== 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 x8si9795094pll.187.2018.11.20.08.03.15; Tue, 20 Nov 2018 08:03:32 -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 S1730027AbeKUBXr (ORCPT + 99 others); Tue, 20 Nov 2018 20:23:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:39262 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729411AbeKUBXr (ORCPT ); Tue, 20 Nov 2018 20:23:47 -0500 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 A4C94B0CE; Tue, 20 Nov 2018 14:54:14 +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: Tue, 20 Nov 2018 15:53:51 +0100 Message-Id: <20181120145351.30390-17-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120145351.30390-1-nsaenzjulienne@suse.de> References: <20181120145351.30390-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