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=-15.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 7E4E5C47083 for ; Wed, 2 Jun 2021 10:07:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 690FB61263 for ; Wed, 2 Jun 2021 10:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231649AbhFBKI6 (ORCPT ); Wed, 2 Jun 2021 06:08:58 -0400 Received: from foss.arm.com ([217.140.110.172]:40214 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230178AbhFBKI4 (ORCPT ); Wed, 2 Jun 2021 06:08:56 -0400 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 C349E1042; Wed, 2 Jun 2021 03:07:13 -0700 (PDT) Received: from [10.57.73.64] (unknown [10.57.73.64]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22D5A3F73D; Wed, 2 Jun 2021 03:07:12 -0700 (PDT) Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Souptick Joarder , hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot References: <20210602080212.4992-1-jrdr.linux@gmail.com> From: Robin Murphy Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> Date: Wed, 2 Jun 2021 11:07:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-02 09:02, Souptick Joarder wrote: > Kernel test robot throws below warning when CONFIG_OF > is not set. > >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] > static const struct of_device_id rockchip_dp_dt_ids[] = { > > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF. I think the __maybe_unused annotation is generally preferred over #ifdefs these days. However, since these drivers only work with devicetree anyway, it probably makes more sense to just remove the of_match_ptr() uses which lead to these warnings in the first place. Robin. > Reported-by: kernel test robot > Signed-off-by: Souptick Joarder > --- > drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > index ade2327a10e2..9b79ebaeae97 100644 > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = { > .chip_type = RK3288_DP, > }; > > +#ifdef CONFIG_OF > static const struct of_device_id rockchip_dp_dt_ids[] = { > {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp }, > {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp }, > {} > }; > MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); > +#endif > > struct platform_driver rockchip_dp_driver = { > .probe = rockchip_dp_probe, > 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=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 5D8B7C4708F for ; Wed, 2 Jun 2021 10:10:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 287B361263 for ; Wed, 2 Jun 2021 10:10:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 287B361263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HXGaa5S/L2xzqvhWstv+Eygu00zvG9oH9T1A6PUprl4=; b=z7n6rwtOPpY5oPMP25pUIg1Gdw 12dJAGrt6uWTLJCQ50nb35axvsK51zfZJXnmwgLtH+Kk+ClxdnP+MXzG2yB9sbG0yQnO/R5nakgBi bTmDG3FgTsuiIcnXDHSeW/ag9IGb3vnHT9QzruNJkWjOpaLCfp4Wl7Ead1mZuNGtgYa2IsaeO0qSe CSaDgQPWRdtm4aoX6bj+wCjWSx7ceYh+XECGPWtA+jV5NT4n/IO3GQoWbGJt9pJ7ZCe4nLXg2VpMM 0GzHirJ+qXI6nzEyAOZWpDw3o68YdNEf7SZ9InKoZOyk6Y1IJuzd3LijOiD9al4UsPXn7I1ZJJ8UD KaDSfvzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loNpe-003Cv7-NF; Wed, 02 Jun 2021 10:10:38 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loNmQ-003BBP-2G; Wed, 02 Jun 2021 10:07:20 +0000 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 C349E1042; Wed, 2 Jun 2021 03:07:13 -0700 (PDT) Received: from [10.57.73.64] (unknown [10.57.73.64]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22D5A3F73D; Wed, 2 Jun 2021 03:07:12 -0700 (PDT) Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Souptick Joarder , hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot References: <20210602080212.4992-1-jrdr.linux@gmail.com> From: Robin Murphy Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> Date: Wed, 2 Jun 2021 11:07:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_030718_260718_411DE880 X-CRM114-Status: GOOD ( 18.08 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On 2021-06-02 09:02, Souptick Joarder wrote: > Kernel test robot throws below warning when CONFIG_OF > is not set. > >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] > static const struct of_device_id rockchip_dp_dt_ids[] = { > > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF. I think the __maybe_unused annotation is generally preferred over #ifdefs these days. However, since these drivers only work with devicetree anyway, it probably makes more sense to just remove the of_match_ptr() uses which lead to these warnings in the first place. Robin. > Reported-by: kernel test robot > Signed-off-by: Souptick Joarder > --- > drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > index ade2327a10e2..9b79ebaeae97 100644 > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = { > .chip_type = RK3288_DP, > }; > > +#ifdef CONFIG_OF > static const struct of_device_id rockchip_dp_dt_ids[] = { > {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp }, > {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp }, > {} > }; > MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); > +#endif > > struct platform_driver rockchip_dp_driver = { > .probe = rockchip_dp_probe, > _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 71312C47083 for ; Wed, 2 Jun 2021 10:11:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 40F7661263 for ; Wed, 2 Jun 2021 10:11:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40F7661263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=v5OoHAwG0A7yRGooDygGX+y93GDJJsEdtDasXuHki6Y=; b=Aol7C7u6UehB+im/LXlsJTEWCg AjW2zq54fvg3Ut1rbev8UtjU+yWkRxGOyM01w02hoxncbnIOdE4kmwEg44hohxAb//WdSJuQ6Nn5s oUQ3RxM3DgAwbfrZEfeOaKw7UMQnJtafOUAj1ntdXHccKqi28ZPhoDVuoYP94IjHQg6KoVViqurjc 8nHN1eStz5u6igapNFwIpisApfC14GoC5WjFZxR0jD+dO+hHqJvyMvj6z+UHkG2a3ff3xDl7suGvF jfXh01nFuOyX4urxEv6sCWCtpsxn606kapEYUotc2BWyBwCOxEWuBeq2Fhz9UBuA+aRfY/+vDyeXK 6CoQ727w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loNnx-003Bz7-6Q; Wed, 02 Jun 2021 10:08:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loNmQ-003BBP-2G; Wed, 02 Jun 2021 10:07:20 +0000 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 C349E1042; Wed, 2 Jun 2021 03:07:13 -0700 (PDT) Received: from [10.57.73.64] (unknown [10.57.73.64]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22D5A3F73D; Wed, 2 Jun 2021 03:07:12 -0700 (PDT) Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Souptick Joarder , hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot References: <20210602080212.4992-1-jrdr.linux@gmail.com> From: Robin Murphy Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> Date: Wed, 2 Jun 2021 11:07:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_030718_260718_411DE880 X-CRM114-Status: GOOD ( 18.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-06-02 09:02, Souptick Joarder wrote: > Kernel test robot throws below warning when CONFIG_OF > is not set. > >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] > static const struct of_device_id rockchip_dp_dt_ids[] = { > > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF. I think the __maybe_unused annotation is generally preferred over #ifdefs these days. However, since these drivers only work with devicetree anyway, it probably makes more sense to just remove the of_match_ptr() uses which lead to these warnings in the first place. Robin. > Reported-by: kernel test robot > Signed-off-by: Souptick Joarder > --- > drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > index ade2327a10e2..9b79ebaeae97 100644 > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = { > .chip_type = RK3288_DP, > }; > > +#ifdef CONFIG_OF > static const struct of_device_id rockchip_dp_dt_ids[] = { > {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp }, > {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp }, > {} > }; > MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); > +#endif > > struct platform_driver rockchip_dp_driver = { > .probe = rockchip_dp_probe, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-15.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 BC401C47092 for ; Wed, 2 Jun 2021 10:07:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 6EDE6613B4 for ; Wed, 2 Jun 2021 10:07:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EDE6613B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F202C6E0CB; Wed, 2 Jun 2021 10:07:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 816A56E0CB for ; Wed, 2 Jun 2021 10:07:15 +0000 (UTC) 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 C349E1042; Wed, 2 Jun 2021 03:07:13 -0700 (PDT) Received: from [10.57.73.64] (unknown [10.57.73.64]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22D5A3F73D; Wed, 2 Jun 2021 03:07:12 -0700 (PDT) Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Souptick Joarder , hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie, daniel@ffwll.ch References: <20210602080212.4992-1-jrdr.linux@gmail.com> From: Robin Murphy Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> Date: Wed, 2 Jun 2021 11:07:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, kernel test robot , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 2021-06-02 09:02, Souptick Joarder wrote: > Kernel test robot throws below warning when CONFIG_OF > is not set. > >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] > static const struct of_device_id rockchip_dp_dt_ids[] = { > > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF. I think the __maybe_unused annotation is generally preferred over #ifdefs these days. However, since these drivers only work with devicetree anyway, it probably makes more sense to just remove the of_match_ptr() uses which lead to these warnings in the first place. Robin. > Reported-by: kernel test robot > Signed-off-by: Souptick Joarder > --- > drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > index ade2327a10e2..9b79ebaeae97 100644 > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = { > .chip_type = RK3288_DP, > }; > > +#ifdef CONFIG_OF > static const struct of_device_id rockchip_dp_dt_ids[] = { > {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp }, > {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp }, > {} > }; > MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); > +#endif > > struct platform_driver rockchip_dp_driver = { > .probe = rockchip_dp_probe, >