Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3820058imu; Mon, 7 Jan 2019 10:01:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/XxaC7H8pmBnWbNv8NryIGlSpbms5O4OqeLEYwZQ/0NSgURQPSxQFA1NR80EkyTVBFNgoDl X-Received: by 2002:a62:670f:: with SMTP id b15mr63676396pfc.212.1546884116237; Mon, 07 Jan 2019 10:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546884116; cv=none; d=google.com; s=arc-20160816; b=wcRFOyHrndCip3t01D8b3JVbful/V+ibSnZ3V9KNgApcwXfMUBP2DEGkbpw2d1pdc7 eHDur6KklkYMSPU0qdcsLBTbcQoGCP5ykh5HqQM/chmZjAaHXJRCq3l6ax1Zy1p8ujS5 sh8kPzJgI2v6FUD0yrW8IwYURJz81xCrzSYXUX8/nRhlQizOcH2PgANEoUO9JGlFlotX dRwSoXrRWjA2Y518NF/c7qJmOXQgMJfNlxgg3FDZC/eHI0Su+tORQ3KPapaWcWZ9mxD8 7PWVxOL1IkXL/hQlVV1FTDK9AQigzfYAnxCu8PchnIcrdrrlCzu+D/cc0RqX/bZpjA5x Z8gQ== 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; bh=6dUkEj4ZZxQ9vxw5QW913TBhgzXNin802GKzNATT7Bo=; b=tbBvXd5vdEj5aHh8cbrdNEf56sXR5chiUlK1ALIq5wAUzkmX8mCuhtBJtPAWN0L/UN xvbiv/5U0ulqiQB91zg6hAm8gHvwkYtsO78RAcR19Xeshrez20mGvWEqDL1rLieKGGzn XF+WvW8dw28k9vflMIC6Z2142RDUtTD4CF5qzAPCL+8wf8CtLcDWi1+H2ohSTPiaFKvv 3YP0pjW+tjASW1K6hBm/lMs60FIKC1nsIrKUPtwPhkU600Q1nE3KhvaJfVT+LD0y+gbI sd5EHJ7HlJwfSwBRBW/5Q4N71RNYW6SPZdAsT/70ih0Va4S+5WF3AP8R/AVZRwc2yoEm VuIg== 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 g83si7730814pfb.278.2019.01.07.10.01.40; Mon, 07 Jan 2019 10:01: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 S1727694AbfAGQz1 (ORCPT + 99 others); Mon, 7 Jan 2019 11:55:27 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:37880 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbfAGQz1 (ORCPT ); Mon, 7 Jan 2019 11:55:27 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.91 #2 (Red Hat Linux)) id 1ggYBJ-0004Uf-Pc; Mon, 07 Jan 2019 16:55:17 +0000 Date: Mon, 7 Jan 2019 16:55:17 +0000 From: Al Viro To: Malathi Gottam Cc: stanimir.varbanov@linaro.org, hverkuil@xs4all.nl, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, acourbot@chromium.org, vgarodia@codeaurora.org Subject: Re: [PATCH v2] media: venus: add debugfs support Message-ID: <20190107165517.GS2217@ZenIV.linux.org.uk> References: <1546871340-13009-1-git-send-email-mgottam@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1546871340-13009-1-git-send-email-mgottam@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 07, 2019 at 07:59:00PM +0530, Malathi Gottam wrote: > +static struct dentry *venus_debugfs_init_drv(void) > +{ > + bool ok = false; > + struct dentry *dir = NULL; > + > + dir = debugfs_create_dir("venus", NULL); > + if (IS_ERR_OR_NULL(dir)) { > + dir = NULL; > + pr_err("failed to create debug dir"); > + goto failed_create_dir; > + } Huh? When does debugfs_create_dir() return ERR_PTR()? Any interface that mixes returning NULL for error-reporting with returning ERR_PTR(...) for the same needs to be put out of its misery. As it happens, debugfs_create_dir() returns NULL on all errors. And if you've meant the above as "future-proofing"... don't do that, please. That only breeds confusion down the road, as the code gets cut'n'pasted around. > - if (ret) > + if (ret) { > + dprintk(ERR, > + "Failed to set actual buffer count %d for buffer type %d\n", > + buf_count.count_actual, buf_count.type); > return ret; > > buf_count.type = HFI_BUFFER_OUTPUT; > buf_count.count_actual = output_bufs; > *blink* Does that even compile?