Received: by 10.223.176.46 with SMTP id f43csp2381248wra; Thu, 25 Jan 2018 09:00:56 -0800 (PST) X-Google-Smtp-Source: AH8x225ea41wg6hCsq/GUrSytXHjjeeQ7DqvaMu3UyD2Mj7QlhyBzIdY2U7P4Thoxu/KVNa1QNZ4 X-Received: by 10.98.232.14 with SMTP id c14mr16870603pfi.215.1516899656568; Thu, 25 Jan 2018 09:00:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516899656; cv=none; d=google.com; s=arc-20160816; b=ThVTUkurDueIhvQ7J/UGHsjmJxKBa02U3S3fX4einChUprTqFkaZTQGCriRxJEB4da WT0KYsVQswkopbHye7ea1UL27BWLeHnf51VqZPRMg0zgQOUcvq+EOoGuEerunygTUcjI iiRyAo16a69DKT3HW0wWs7APp6BjEyZUM6kWRDiikgqx1psAPhOQn62niJNgb4AiFboR b8KdCe4kWwtwVV9sO5jiJ2AoDcXy58j1N29XI0wSXoE7S8FOhQXPEGHTNKJKU9lI67SI rR7jaAM8tWah922BX+AExP1nuoGhSbmfHu/c4lt39Rs58Lez363QHtReCBFihCagFUAL ENig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=MQNhyKQ13nWK+0wLpVDrXkgDjkKFO0UJGUI6fWIaMDA=; b=VRBFm7qxXi2KGWb8ikzvHRNdKD0EovHd3uF6ljY8hcPdg1sFiprq6XEtvbsHRspHlM 7lDzTxRD7wqEg8WZqlLP3LJ/8tV/eSlqY9t00hmJJG9MdjVR0iMBBqobainMQj8pXvcE xm/gHr5onXs5K9qibKbOrnfaauY55pMaJs+VmOGHrxu+UTwBqxpvF7WkrgYBJvEuvHwJ VSNGdBBQBU5w/4kBqzg81ykILPPhKSuXJBk/BOan0GtRQmN0ljDtYx/CtsErV4hAp1sm NtLmFOonGuBS9tOkmcQCJ4JzCe0HezE1q+gD/rHlU8gKB4PDozIY4fUEpoG51FwlZNMD +gHQ== 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 d92-v6si2218292pld.406.2018.01.25.09.00.41; Thu, 25 Jan 2018 09:00:56 -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 S1751385AbeAYQ6T (ORCPT + 99 others); Thu, 25 Jan 2018 11:58:19 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45614 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbeAYQ6G (ORCPT ); Thu, 25 Jan 2018 11:58:06 -0500 Received: from localhost (unknown [37.171.117.151]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A1047F8F; Thu, 25 Jan 2018 16:58:05 +0000 (UTC) Date: Thu, 25 Jan 2018 17:58:02 +0100 From: Greg KH To: richard.gong@linux.intel.com Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, richard.gong@intel.com Subject: Re: [PATCHv1] driver: misc: add Intel Stratix10 service layer driver Message-ID: <20180125165802.GD21640@kroah.com> References: <1516898344-20020-1-git-send-email-richard.gong@linux.intel.com> <1516898344-20020-2-git-send-email-richard.gong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516898344-20020-2-git-send-email-richard.gong@linux.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 25, 2018 at 10:39:04AM -0600, richard.gong@linux.intel.com wrote: > +static LIST_HEAD(svc_cons); > +static LIST_HEAD(svc_private_mem); > +static DEFINE_MUTEX(svc_mutex); > + > +svc_invoke_fn *invoke_fn; A global variable for a single .c file? No. > + > +struct intel_svc_chan *request_svc_channel_byname( > + struct intel_svc_client *client, const char *name) > +{ > + struct device *dev = client->dev; > + struct intel_svc_controller *controller; > + struct intel_svc_chan *chan; > + unsigned long flag; > + int i; > + > + chan = ERR_PTR(-EPROBE_DEFER); > + controller = list_first_entry(&svc_cons, > + struct intel_svc_controller, node); > + for (i = 0; i < SVC_MAX_CHANNEL; i++) { > + if (!strcmp(controller->chans[i].name, name)) { > + chan = &controller->chans[i]; > + break; > + } > + } > + > + if (chan->scl || !try_module_get(controller->dev->driver->owner)) { > + dev_dbg(dev, "%s: svc not free\n", __func__); > + return ERR_PTR(-EBUSY); > + } > + > + spin_lock_irqsave(&chan->lock, flag); > + chan->scl = client; > + spin_unlock_irqrestore(&chan->lock, flag); > + > + return chan; > +} > +EXPORT_SYMBOL_GPL(request_svc_channel_byname); Exporting functions with no users? No. Please fix up and make this stand-alone. Or, if you are going to have framework that others use, then submit those others at the same time. I'm stopping reviewing here, sorry. Please fix up and resend. Also, please get some signed-off-by: from some internal Intel people. Don't rely on me to do this type of work when you have lots of good people inside that could have told you all of this already. Without other developer's sign-offs, I'm not going to look at future submissions, sorry. thanks, greg k-h