From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EBADC433E4 for ; Fri, 17 Jul 2020 05:53:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C09722071A for ; Fri, 17 Jul 2020 05:53:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VEFdnoYy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JxLXtCib" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C09722071A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=D2HtlWYau1b4V7dq0udGO4z4ssBFBTNPSlR88jXm+8k=; b=VEFdnoYyAKTnkP5ShSpL1irO8 nj7AU0L/SAxq/lj2nDKA8aqNH5tj1TJemPfyClGQWE3EvBz5OC5W7NIqH01hJhklgebBO4S+C9wPg 9PtSq103sms5sT7BbwXPZZo8IfC2eon0qMKFwp+ljiNjTNxKZazcecDCwraTBkjjuC1puiTSQ6Rfp 5Xnq91pylbi4AC2j0w1kkx2i0jDAEfEl7QDJ+BQIvfbDJHM1Irqbbo38es1kLBIY4oFmqmkIn+STg oto+dL9AMWZRZHcfQw+WgcIHRzSkFCxtQDMnTVA6pmhdCzIJvjpnUC4LLYmNza1MDJmv5SV+JIssb aWlyrdY+Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwJHJ-0002Ow-QE; Fri, 17 Jul 2020 05:51:26 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwJH2-0002JE-8r for linux-arm-kernel@lists.infradead.org; Fri, 17 Jul 2020 05:51:14 +0000 Received: by mail-pf1-x444.google.com with SMTP id m9so4885222pfh.0 for ; Thu, 16 Jul 2020 22:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1PFs+emTCjBmpzEcvwWiAu9ISkdboKsamgKoarfvfso=; b=JxLXtCib/kxCaAeC1ZCQXAhXzOploS0tTxAWwsZf63bgYIK+5LqwpXU3j8CSOekg3e iCR3BCpMsCeq/XKL5vd2wM0XXAdpHPzwsCvMYvADBL3SYQrmVwNBJAViMncCUbbe6ek1 hvtAM4MQEPxvnV02mDJ2w4JQx7OT0cFqSIubN1O+2odmatkGQAFuUxVyXUX/1okipHku dxKHU9PUSX1xZbJd/1IevMDV8zkpfNR0diEep+/+cXAWY/ndIvJ3rRg7+c9SbGh1TT/g 4Zy14qehCwoAFillT5CkI1+ujy8KisWJ8HfOt2YO0k2r6RrFjIvpo3JUd/elfrwZfip/ Mlpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1PFs+emTCjBmpzEcvwWiAu9ISkdboKsamgKoarfvfso=; b=CW0DoQ20jXuWXIwkbpQiSykbZp9NRXCPnLIMjIyJg9jJBU77ZtwjXkZYr6S2d9BRkJ v+rkCYgo+of06xtjW70gUd8wB8cK+yjGfRjtsNBsmzwo+ALnWL2AE6/HNHmE4kjUg7Zk TWl4WazV4u4HD1U3fAXHPJo4xRXuEkU87Q9J/7eW6UWC7r1rSZzQBU5I9R3ujDfeWWjt tzuTW4n6+nTPhUeDl1tC4mHDbYKXW3RwcFSl+8BGDdkm1dycNV3nSbEgrvXmWWb348EL v/tfwyUwhrDm59S4VBjNs0gyJ9l347ah/VM4D8ZDSuhUxJ0yJHe38w65szt35sZ4kGwI eWaw== X-Gm-Message-State: AOAM530T7D6UnCxsLISiGRCizfKAHsy2Fbr86F0cN1dyCzM3K0cKryvj 4aY7VJMNjEQn4j9Sd5lAUy9Ywg== X-Google-Smtp-Source: ABdhPJyg+5P3lnqItgVBbtEe0CH0gQWoQmMy9NmahOYi/S+3X7KKcvFRiGQwqRWQDPAbhkr54NZ3Aw== X-Received: by 2002:a63:a558:: with SMTP id r24mr7568200pgu.70.1594965064988; Thu, 16 Jul 2020 22:51:04 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id b128sm6443836pfg.114.2020.07.16.22.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 22:51:04 -0700 (PDT) Date: Thu, 16 Jul 2020 22:49:02 -0700 From: Bjorn Andersson To: Siddharth Gupta Subject: Re: [PATCH v4 2/2] remoteproc: core: Register the character device interface Message-ID: <20200717054902.GJ2922385@builder.lan> References: <1594148870-27276-1-git-send-email-sidgup@codeaurora.org> <1594148870-27276-3-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1594148870-27276-3-git-send-email-sidgup@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_015112_901858_B676C733 X-CRM114-Status: GOOD ( 19.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ohad@wizery.com, tsoni@codeaurora.org, corbet@lwn.net, linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, agross@kernel.org, rishabhb@codeaurora.org, psodagud@codeaurora.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue 07 Jul 12:07 PDT 2020, Siddharth Gupta wrote: > Add the character device during rproc_add. This would create > a character device node at /dev/remoteproc. Userspace > applications can interact with the remote processor using this > interface. > > Signed-off-by: Rishabh Bhatnagar > Signed-off-by: Siddharth Gupta > --- > drivers/remoteproc/remoteproc_core.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 0f95e02..ec7fb49 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -1966,6 +1966,13 @@ int rproc_add(struct rproc *rproc) > struct device *dev = &rproc->dev; > int ret; > > + /* add char device for this remoteproc */ > + ret = rproc_char_device_add(rproc); > + if (ret) { > + dev_err(dev, "Failed to add char dev for %s\n", rproc->name); Please move this error message into rproc_char_device_add(), to make it consistent with the other error handling in this function not printing. Apart from that it looks good. Regards, Bjorn > + return ret; > + } > + > ret = device_add(dev); > if (ret < 0) > return ret; > @@ -2241,6 +2248,7 @@ int rproc_del(struct rproc *rproc) > mutex_unlock(&rproc->lock); > > rproc_delete_debug_dir(rproc); > + rproc_char_device_remove(rproc); > > /* the rproc is downref'ed as soon as it's removed from the klist */ > mutex_lock(&rproc_list_mutex); > @@ -2409,6 +2417,7 @@ static int __init remoteproc_init(void) > { > rproc_init_sysfs(); > rproc_init_debugfs(); > + rproc_init_cdev(); > rproc_init_panic(); > > return 0; > @@ -2420,6 +2429,7 @@ static void __exit remoteproc_exit(void) > ida_destroy(&rproc_dev_index); > > rproc_exit_panic(); > + rproc_exit_cdev(); > rproc_exit_debugfs(); > rproc_exit_sysfs(); > } > -- > Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel