Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp784195ybh; Wed, 18 Mar 2020 09:04:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv/L3S00vh8aa59lst4IuAbnr7nBdXj5FxO5tZzJBz1yUGRzyRCzuzjVX/KPIpUAiWx3+CE X-Received: by 2002:a9d:247:: with SMTP id 65mr4618566otb.364.1584547454861; Wed, 18 Mar 2020 09:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584547454; cv=none; d=google.com; s=arc-20160816; b=gPKFd3pZAbDz4mIj9f/+rWCABoZG/QQEM+tg4jdFXqtBFGWCBnUCPz4s3eJxHv2udH yF1d392pZ5fyjHAu9Ccl9ECqDSwOn4zEe1gibWLGq2/7yBJp6ZpaKpY71v1LWAx6NUgw CbRKBP/x7Ka6U9QXwOXuLbcdrJBePYOcozi2qYInV0PQQiM5F2h4Iuvn9Hxhr2Xeia/y +VwcPhOY4AfGosn3HT0lhSjgAgLHg/vCFcqXovvJRzmIhMMuA8fBSs5bARt6Vc3eVVpH NoyMaauyiHgrRvX5zCCRz8gDcXy/kh+om8QeLa73rRvz3VIOefIp26rD24dE/ulSrIHl utIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=NBpTb0vw99e5S/IoMj3BB65KCm2t/wKof5fD6aPsMYM=; b=e+AOTVh8WU7cE4/IHGKWxr9oBHCATNrEFD9RoDHPj6NB1ExBXRFjq0I+cI/gpyYkQY U5wyBAWfExS7neqNSKgQejqZrzydvogMZreBES7EEKeODxoCxOFW6fTonyWC84JGFW+T qiZVjYb4Jkf5fIiYD4uafZxdy46hZFg2/yrTlUdd/SETGMhmoHsi3U3gtU6pnjbTdnnb 7N1hPHpG7/OpwnRY6ajqD4JY8dTCmZy0VeRvuA4+ap1QzaHk82t7nCH/busUwFwmHkgG 6B/jWUtlfsg6SO7Hd9YXscW7cjWhwQaI1I4lwCXjLP23IJRxljDG0Z/x9/s5y7vA/wyj wjGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u0abISc1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si3549424otj.281.2020.03.18.09.03.51; Wed, 18 Mar 2020 09:04:14 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u0abISc1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727065AbgCRQDH (ORCPT + 99 others); Wed, 18 Mar 2020 12:03:07 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40433 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbgCRQDH (ORCPT ); Wed, 18 Mar 2020 12:03:07 -0400 Received: by mail-wm1-f68.google.com with SMTP id z12so3967563wmf.5 for ; Wed, 18 Mar 2020 09:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=NBpTb0vw99e5S/IoMj3BB65KCm2t/wKof5fD6aPsMYM=; b=u0abISc1Df5MhDyW8KEO42x/KCYMmTKfDc8BS/ayA+W6nEhRCNqtr8oV5oR4XRWRDS mgR4WUxae29gsY4cmH5mTdL7eNo3P6V6lJOGMmAz3ktoS/HKhhGFMQfcMynma7MOCsP7 qHPhrBkIIeNADiVr2xnapnqQY95LCxDassg1c2jwjDvhNlgbNbG73TB1x9xvIY+LADb9 9Donw4KTpVfKRSpBX5RpG8EbxMmGmfkmqFcIf9OT4BodqaceriCFriKCXg1+RgQtLXte y0AtZ1GMovRoZS5OVcZrAs5rlP6kNrbg8opOC57T3WGRvEMwzriJwHeCiWVjVNAcvn1N lecw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=NBpTb0vw99e5S/IoMj3BB65KCm2t/wKof5fD6aPsMYM=; b=DofySMQOcM653hH11fMXL/WmFCPpof713g8wQzyp2bsbk9QGE/PTd9cjO8/vJZSe3a SJMhGJLYpfAlRf2allmddP4t1MywMcziwd0OGkfm0yVtkF2WwP29zG7RgJXRaUHIlCKb ZnQVAkF6F9memgRMyjX4FDkGxyScdVrftcQt30h3qIwNWxUA+UekRG5lS9QbTdBcgX4B lqgDG1k94QtKxQpcrIljvl6zCPVhC1OT9Nr0LnMXsvp+CXZcUC0dFJyedLT8SyVx1Yr0 H4JfVEYsw78CsAMug8v1oos5UTiSEhB/A953YjVX/uBNNBxK/k5taF6wv5Ll5mr9trLo PW0w== X-Gm-Message-State: ANhLgQ1jHLBDeg5j3i0ykbkaG1Pkb09QgF3Xjy6B9SkNh4+CbTm+4iqA VTesg9FOEdBQu22jqmxtfoE= X-Received: by 2002:a1c:9dc6:: with SMTP id g189mr6112861wme.91.1584547385078; Wed, 18 Mar 2020 09:03:05 -0700 (PDT) Received: from wambui.local ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id r18sm10097934wro.13.2020.03.18.09.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 09:03:04 -0700 (PDT) From: Wambui Karuga X-Google-Original-From: Wambui Karuga Date: Wed, 18 Mar 2020 19:02:47 +0300 (EAT) To: Wambui Karuga , airlied@linux.ie, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org cc: daniel@ffwll.ch Subject: Re: [PATCH v2 10/17] drm/vram-helper: make drm_vram_mm_debugfs_init() return 0 In-Reply-To: <20200318152627.GY2363188@phenom.ffwll.local> Message-ID: References: <20200310133121.27913-1-wambui.karugax@gmail.com> <20200310133121.27913-11-wambui.karugax@gmail.com> <20200318152627.GY2363188@phenom.ffwll.local> User-Agent: Alpine 2.21.99999 (LNX 375 2019-10-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Mar 2020, Daniel Vetter wrote: > On Tue, Mar 10, 2020 at 04:31:14PM +0300, Wambui Karuga wrote: >> Since 987d65d01356 (drm: debugfs: make >> drm_debugfs_create_files() never fail), drm_debugfs_create_files() never >> fails and should return void. Therefore, remove its use as the >> return value of drm_vram_mm_debugfs_init(), and have the function >> return 0 directly. >> >> v2: have drm_vram_mm_debugfs_init() return 0 instead of void to avoid >> introducing build issues and build breakage. >> >> References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html >> Signed-off-by: Wambui Karuga >> Acked-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/drm_gem_vram_helper.c | 10 ++++------ >> 1 file changed, 4 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c >> index 92a11bb42365..c8bcc8609650 100644 >> --- a/drivers/gpu/drm/drm_gem_vram_helper.c >> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c >> @@ -1048,14 +1048,12 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = { >> */ >> int drm_vram_mm_debugfs_init(struct drm_minor *minor) >> { >> - int ret = 0; >> - >> #if defined(CONFIG_DEBUG_FS) > > Just noticed that this #if here is not needed, we already have a dummy > function for that case. Care to write a quick patch to remove it? On top > of this patch series here ofc, I'm in the processing of merging the entire > pile. > > Thanks, Daniel Hi Daniel, Without this check here, and compiling without CONFIG_DEBUG_FS, this function is run and the drm_debugfs_create_files() does not have access to the parameters also protected by an #if above this function. So the change throws an error for me. Is that correct? Thanks, wambui karuga >> - ret = drm_debugfs_create_files(drm_vram_mm_debugfs_list, >> - ARRAY_SIZE(drm_vram_mm_debugfs_list), >> - minor->debugfs_root, minor); >> + drm_debugfs_create_files(drm_vram_mm_debugfs_list, >> + ARRAY_SIZE(drm_vram_mm_debugfs_list), >> + minor->debugfs_root, minor); >> #endif >> - return ret; >> + return 0; >> } >> EXPORT_SYMBOL(drm_vram_mm_debugfs_init); >> >> -- >> 2.25.1 >> > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch >