Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp355449lqt; Thu, 6 Jun 2024 05:57:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOxu/3ODz6k9rlCA3CRcZPh2PlkV2OXhrDNN7tsAWPWKRC1azq4oFl3DKAa3NayMYMHD/FdMymlNu7NnjKZyKGf5vEJiF0NK0FkixfpQ== X-Google-Smtp-Source: AGHT+IGlzEgw6VNxMEEx9N1MqQ+YcHC8EtFdCYSB8e2I6jIM8pVGeVQy7KQBRPXnS2WjB8S0N6Kj X-Received: by 2002:a17:903:182:b0:1f6:1f90:987a with SMTP id d9443c01a7336-1f6a5a05262mr73764955ad.3.1717678667114; Thu, 06 Jun 2024 05:57:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717678667; cv=pass; d=google.com; s=arc-20160816; b=cRzaaKNxk0aoUA3olOv1bGgEZNlEqpz3RTDBx+5Vbar5ve3eldC7AryviFTIgBrbof +DrUgYCUIV6yZWanzi77ZTk6X1jUbPOSRqz6MmjQa5PdKNnHviW2SFiGBmKIdeEkrvYb 1Wi1rFz1WwatZ/C4Qo5Lhlat2KwrkRVXmM98pHUwetjXzrs6nI0b/uSyNSNIAbQj65Fp WwQssJKH+Ryesda26J720ro2h8/5GyY1JoxzntfI5mrcBSPrsm01JM1q6sQWk4hS1Lej npBAoA+daR7Js7+Yvd03WNN6Q+uTYFtgbYHxjUb/1oayDFQXPsjm13ptt/UUAf44ikSU UwWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=ojTg9/lYcWtWj9hd67aaQwjqgMdG5ulLuUHU31Q7XKo=; fh=cCyYMNun7KPOZL/h6j5m2WRc1Smv7PHfNfyEGx6V3bg=; b=ufQjqdgph32tTOFsX+q8PV4p+ykrZSoVtsACg2h1+AziIjqc8ybTps/bh9y0nVBKwj vtMbz7JDz4IYvDOw8uPdFa48jw04u8I35fehDAdlV/Z1ryOpqSYdPf6YjTA6mnK05iVn 14b6ePZsmmYUmuoFpxm2lEh3CnaXbZOwSzQhlZ2cf2QtwWXhuKPKNpuXS+3uTafiW17g rF/J9+cI3qOrgce05pwYocMHVFrrQcs0jwEfqHL3oeheZncOCCyensk4OazNq89tOy3Q F95Zx8UZPppY3RU9vsY37hCNFJ6a81R2EafaBQ2TX4YBLrCry33d/yx54Gnw6T5rNpbQ 090g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-204291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd76f58fsi11362545ad.191.2024.06.06.05.57.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 05:57:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-204291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8F0022888FE for ; Thu, 6 Jun 2024 12:48:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5964E195B22; Thu, 6 Jun 2024 12:48:51 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AD2C146A88 for ; Thu, 6 Jun 2024 12:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717678130; cv=none; b=nkl4RcC8cJAtCew/ekvzXBfdgJCC0vJbGjLzT4WooHtmH5F2w1qcV9oWEYOAd9CnrfudoIEyw1n2vjeTN7zuzyzgxWyG5qU63AD1d7ZNIM6HUh0it7HQqgR8aiXSO9UvpzfFwjBe5IeFfxcA/VSL9YZW3cgwjxJ/6e4V5uMOEIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717678130; c=relaxed/simple; bh=uBZ1J5Ot805NQZQaljecl8c+En8awwIsyopnMg/3MUw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pbHqBEbGc+LMtVvJu4UOFIAj/cYus5TzWaRSXpO4iVAtXxiALBCrlxYLXK62pv9Va++7ohgzJRzqFAh1shhnvMuWymRdUvBGn1H1tqqyVqsa5pLAaY9080ArIGFfXPvXLg7ife+El6411OGOc2EzTzGSxbdeFMqXaymPSLQmxCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4BB97339 for ; Thu, 6 Jun 2024 05:49:13 -0700 (PDT) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AA3A23F64C for ; Thu, 6 Jun 2024 05:48:48 -0700 (PDT) Date: Thu, 6 Jun 2024 13:48:41 +0100 From: Liviu Dudau To: pengfuyuan Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, k2ci Subject: Re: [PATCH] arm/komeda: Remove all CONFIG_DEBUG_FS conditional compilations Message-ID: References: <20240606120842.1377267-1-pengfuyuan@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240606120842.1377267-1-pengfuyuan@kylinos.cn> On Thu, Jun 06, 2024 at 08:08:42PM +0800, pengfuyuan wrote: > Since the debugfs functions have no-op stubs for CONFIG_DEBUG_FS=n, > the compiler will optimize the rest away since they are no longer referenced. > > The benefit of removing the conditional compilation is that the build > is actually tested for both CONFIG_DEBUG_FS configuration values. > Assuming most developers have it enabled, CONFIG_DEBUG_FS=n is not tested > much and may fail the build due to the conditional compilation. > > Reported-by: k2ci > Signed-off-by: pengfuyuan Acked-by: Liviu Dudau Thanks for the cleanup! Best regards, Liviu > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > index 14ee79becacb..5ba62e637a61 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > @@ -12,10 +12,8 @@ > #include > #include > #include > -#ifdef CONFIG_DEBUG_FS > #include > #include > -#endif > > #include > > @@ -43,7 +41,6 @@ static int komeda_register_show(struct seq_file *sf, void *x) > > DEFINE_SHOW_ATTRIBUTE(komeda_register); > > -#ifdef CONFIG_DEBUG_FS > static void komeda_debugfs_init(struct komeda_dev *mdev) > { > if (!debugfs_initialized()) > @@ -55,7 +52,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev) > debugfs_create_x16("err_verbosity", 0664, mdev->debugfs_root, > &mdev->err_verbosity); > } > -#endif > > static ssize_t > core_id_show(struct device *dev, struct device_attribute *attr, char *buf) > @@ -265,9 +261,7 @@ struct komeda_dev *komeda_dev_create(struct device *dev) > > mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS; > > -#ifdef CONFIG_DEBUG_FS > komeda_debugfs_init(mdev); > -#endif > > return mdev; > > @@ -286,9 +280,7 @@ void komeda_dev_destroy(struct komeda_dev *mdev) > > sysfs_remove_group(&dev->kobj, &komeda_sysfs_attr_group); > > -#ifdef CONFIG_DEBUG_FS > debugfs_remove_recursive(mdev->debugfs_root); > -#endif > > if (mdev->aclk) > clk_prepare_enable(mdev->aclk); > -- > 2.25.1 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯