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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 3B41DC4743F for ; Mon, 7 Jun 2021 18:41:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15F2B61139 for ; Mon, 7 Jun 2021 18:41:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbhFGSnn (ORCPT ); Mon, 7 Jun 2021 14:43:43 -0400 Received: from mail-ua1-f47.google.com ([209.85.222.47]:42667 "EHLO mail-ua1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbhFGSnm (ORCPT ); Mon, 7 Jun 2021 14:43:42 -0400 Received: by mail-ua1-f47.google.com with SMTP id w5so10260320uaq.9 for ; Mon, 07 Jun 2021 11:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=SQVA8E6RjJLNBOL9dbK69hBHUkKdfRviB4kGidz9fKEEiBJ6C5ZZjhfjIdB1lfvKMI QWGNtGaV1E7wraHhURiulfcu4vYnfkdMdJqXR2b0BfUOFdBQdc8wGaqFuTJEdujkAGx4 n2k+Evx8s5Cqhdn47fmyOjzQtQQW4WVifnuo5k4HWsCcJiETqIDldhAhRtyfPyE8iQB5 3++KbIcSDtIrL+QJ27kLeiE9oz3PHIG1yA3PvDNB0/LnqMKrRfs6iI9shhxN0SmfZB/P Nx0ECO+UjFzcKKTww2Bu6Ace9rab1PQOB4BCI2mwbJ6u9GDzqw+b2uwQlMnkKhtosu9T fr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=T0KSac0l0LCiC8NBqpWzhsD5o+PIj5rCS2r5AGF6JAZCW1o58lVWZFduuQGR5eTCNf liQvx0RyB/U1yons/AkRhKuyUM+NoWZ4Y7Unnj/xSBYJjVXbWo7mLTlkganA+LROGMl6 SGd9NFB11TIdDSs9/DT0r45bVEDZi9lKEBZ5zAZ2TioqcfCKPkokRkHnL/kBBEAkt6FC xyueyhX4LyaDsi+YjrCiLsErqNVi8M6W6bbbFo8Pov6K74+6loFJbMqoapyXqMU2T4Uy YBRn3EoPMtQ7NfgdPCIePgx0IC/ao9M5aloRs0jTqXAoiMs6npVcIcVgpq2N/xRUiIZN ilxQ== X-Gm-Message-State: AOAM530ah2BJeFg2TiDfxU/IH2jIe/8L0InS2F6kPKzygmw+9KDgDGxb tnvpQfCZeo3zFzvvmPB7NYNEN6I0SBXxOqCojzg= X-Google-Smtp-Source: ABdhPJzmoZOJiKTKN2ANcor0bAuDPWhU5HM92R3OmDGVNSrGSdQr6wQRhWdD5xKfwOVxUsMyDCBnTWnkBESl93cfZD8= X-Received: by 2002:a9f:31b1:: with SMTP id v46mr10684948uad.22.1623091236278; Mon, 07 Jun 2021 11:40:36 -0700 (PDT) MIME-Version: 1.0 References: <20210602080212.4992-1-jrdr.linux@gmail.com> <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> In-Reply-To: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> From: Souptick Joarder Date: Tue, 8 Jun 2021 00:10:24 +0530 Message-ID: Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Robin Murphy Cc: hjc@rock-chips.com, Heiko Stuebner , David Airlie , Daniel Vetter , dri-devel , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy wrote: > > 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. Ok. Will remove of_match_ptr(). > > 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=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6D06DC47082 for ; Mon, 7 Jun 2021 18:40:58 +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 2E8E56108D for ; Mon, 7 Jun 2021 18:40:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E8E56108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1IZJsAKb8XaCuXzsKMV3iANhEUi+cRPWNJS63FrqmyQ=; b=hD4zHCrIQtixJq 4+A+EEvK9D6w7u8eXq0LrOPmP4V4Vz480EfFHlX81Vzsjz0qTTou6l9/SCiyzon/spH6iUg9qgnWn NT4Bme2gGlblO0h1kcNn90AHAvqK7vnAZN31ZpPVahLBD5wpeknVCvTSUaE9CO7TTRk4kKj0FvJ3P aP5BBvRUhQKCJAfp1+ditUYW6pU0xwv1DXy4Ut7ZYaA1mIhmE5AM2t9GKJFGToDgKGU8iLTSUBZBY ERd3NtlUFl3lf1SW567SA9Vwoq/lip4rY2nWG1CkjS9zOd1vNR7nVSRiO4rhw7P4yg4VEgoIiejxP fZVmlIWxiQZUhJTd6AyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqKBC-0054O7-EJ; Mon, 07 Jun 2021 18:40:54 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqKAy-0054Ls-Uw; Mon, 07 Jun 2021 18:40:42 +0000 Received: by mail-ua1-x931.google.com with SMTP id z13so5309947uai.12; Mon, 07 Jun 2021 11:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=SQVA8E6RjJLNBOL9dbK69hBHUkKdfRviB4kGidz9fKEEiBJ6C5ZZjhfjIdB1lfvKMI QWGNtGaV1E7wraHhURiulfcu4vYnfkdMdJqXR2b0BfUOFdBQdc8wGaqFuTJEdujkAGx4 n2k+Evx8s5Cqhdn47fmyOjzQtQQW4WVifnuo5k4HWsCcJiETqIDldhAhRtyfPyE8iQB5 3++KbIcSDtIrL+QJ27kLeiE9oz3PHIG1yA3PvDNB0/LnqMKrRfs6iI9shhxN0SmfZB/P Nx0ECO+UjFzcKKTww2Bu6Ace9rab1PQOB4BCI2mwbJ6u9GDzqw+b2uwQlMnkKhtosu9T fr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=TFvvhZRthm5TaLbvhXxATPMSz+HT5/H/AqrbCf5LmesFRX2K3v7yKu5bFEmCN24qSb aJ0Ot3DTiFHQqRayFoGzklkolkrE4PtEgIavHsF9w5A2m4SUDfBQMG7HMBzki5PybD1R sFwHn4TCEavvucUvvOBW34M0nCivBOOwOun7w5xkGxM7L+GQAkG4NsxZpTWuko/CAImj W8Bc5IeH/aTJjaerP1uWP44ZV5arAVEYDeaxX7VJyZ24bCiPItE7/wxKfefbtfLYyNs0 TjWNS5Xcu7blChsfMHrlYIRJT1NnYeLio2vueiATlGq8EltSjU0vQVdZMZ2s51jbHMlw 40lA== X-Gm-Message-State: AOAM530D8zov7ydIn9QOayl7/IJ3eJA/dAT4ZOdL2TgN3xqqTmLhvsfl 1vn8RnNMUML6porqnSQvubzSW6uQ8u/ZMNIh2As= X-Google-Smtp-Source: ABdhPJzmoZOJiKTKN2ANcor0bAuDPWhU5HM92R3OmDGVNSrGSdQr6wQRhWdD5xKfwOVxUsMyDCBnTWnkBESl93cfZD8= X-Received: by 2002:a9f:31b1:: with SMTP id v46mr10684948uad.22.1623091236278; Mon, 07 Jun 2021 11:40:36 -0700 (PDT) MIME-Version: 1.0 References: <20210602080212.4992-1-jrdr.linux@gmail.com> <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> In-Reply-To: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> From: Souptick Joarder Date: Tue, 8 Jun 2021 00:10:24 +0530 Message-ID: Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Robin Murphy Cc: hjc@rock-chips.com, Heiko Stuebner , David Airlie , Daniel Vetter , dri-devel , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210607_114041_042343_9898072D X-CRM114-Status: GOOD ( 20.01 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy wrote: > > 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. Ok. Will remove of_match_ptr(). > > 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=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 E2B9BC47094 for ; Mon, 7 Jun 2021 18:42:18 +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 AB3C661130 for ; Mon, 7 Jun 2021 18:42:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB3C661130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QjBvZHGwIt1qbDPsp9KkTlSbDCOMwwYZfVBDwGW4wng=; b=A7c5y+Lm+UA63k RcILVFDxLbvbXj0qEzB7iyJ9zoc9ArpXkiwZ1266xd8/OvfUpKseaxWt59Q6FVDcms4MraI+8MLnH QUE2aJ2MIVaWOX4He9LyszjtHw1dwu2GVWp7keq50QD5t+ZuX8pgsU0hFWvIg+UEMWDjQA7qqGeks hkG74/fy/6b5pYTsJl6V/gjlux90Y77mY8CYiE4m8OZ9/Fil/sRQ1pz9l/uNgiqfI4H+FnrmQabJb 6jCK8UXmQp/spFxNQnJi723e3et3yJKSSHLhTbCOCwdoZXyCJFLufKpYMJsGJuDeI8/4vbbpEBqbv IDvOtvSIGRNtrR1bqeWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqKB2-0054NC-LT; Mon, 07 Jun 2021 18:40:44 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqKAy-0054Ls-Uw; Mon, 07 Jun 2021 18:40:42 +0000 Received: by mail-ua1-x931.google.com with SMTP id z13so5309947uai.12; Mon, 07 Jun 2021 11:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=SQVA8E6RjJLNBOL9dbK69hBHUkKdfRviB4kGidz9fKEEiBJ6C5ZZjhfjIdB1lfvKMI QWGNtGaV1E7wraHhURiulfcu4vYnfkdMdJqXR2b0BfUOFdBQdc8wGaqFuTJEdujkAGx4 n2k+Evx8s5Cqhdn47fmyOjzQtQQW4WVifnuo5k4HWsCcJiETqIDldhAhRtyfPyE8iQB5 3++KbIcSDtIrL+QJ27kLeiE9oz3PHIG1yA3PvDNB0/LnqMKrRfs6iI9shhxN0SmfZB/P Nx0ECO+UjFzcKKTww2Bu6Ace9rab1PQOB4BCI2mwbJ6u9GDzqw+b2uwQlMnkKhtosu9T fr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=TFvvhZRthm5TaLbvhXxATPMSz+HT5/H/AqrbCf5LmesFRX2K3v7yKu5bFEmCN24qSb aJ0Ot3DTiFHQqRayFoGzklkolkrE4PtEgIavHsF9w5A2m4SUDfBQMG7HMBzki5PybD1R sFwHn4TCEavvucUvvOBW34M0nCivBOOwOun7w5xkGxM7L+GQAkG4NsxZpTWuko/CAImj W8Bc5IeH/aTJjaerP1uWP44ZV5arAVEYDeaxX7VJyZ24bCiPItE7/wxKfefbtfLYyNs0 TjWNS5Xcu7blChsfMHrlYIRJT1NnYeLio2vueiATlGq8EltSjU0vQVdZMZ2s51jbHMlw 40lA== X-Gm-Message-State: AOAM530D8zov7ydIn9QOayl7/IJ3eJA/dAT4ZOdL2TgN3xqqTmLhvsfl 1vn8RnNMUML6porqnSQvubzSW6uQ8u/ZMNIh2As= X-Google-Smtp-Source: ABdhPJzmoZOJiKTKN2ANcor0bAuDPWhU5HM92R3OmDGVNSrGSdQr6wQRhWdD5xKfwOVxUsMyDCBnTWnkBESl93cfZD8= X-Received: by 2002:a9f:31b1:: with SMTP id v46mr10684948uad.22.1623091236278; Mon, 07 Jun 2021 11:40:36 -0700 (PDT) MIME-Version: 1.0 References: <20210602080212.4992-1-jrdr.linux@gmail.com> <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> In-Reply-To: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> From: Souptick Joarder Date: Tue, 8 Jun 2021 00:10:24 +0530 Message-ID: Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Robin Murphy Cc: hjc@rock-chips.com, Heiko Stuebner , David Airlie , Daniel Vetter , dri-devel , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210607_114041_042343_9898072D X-CRM114-Status: GOOD ( 20.01 ) 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-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 Wed, Jun 2, 2021 at 3:37 PM Robin Murphy wrote: > > 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. Ok. Will remove of_match_ptr(). > > 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=-10.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 50C0FC47094 for ; Mon, 7 Jun 2021 18:40:39 +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 14EA06108D for ; Mon, 7 Jun 2021 18:40:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14EA06108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 62BA16E222; Mon, 7 Jun 2021 18:40:38 +0000 (UTC) Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D0FE6E222 for ; Mon, 7 Jun 2021 18:40:37 +0000 (UTC) Received: by mail-ua1-x92b.google.com with SMTP id p1so10243310uam.13 for ; Mon, 07 Jun 2021 11:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=SQVA8E6RjJLNBOL9dbK69hBHUkKdfRviB4kGidz9fKEEiBJ6C5ZZjhfjIdB1lfvKMI QWGNtGaV1E7wraHhURiulfcu4vYnfkdMdJqXR2b0BfUOFdBQdc8wGaqFuTJEdujkAGx4 n2k+Evx8s5Cqhdn47fmyOjzQtQQW4WVifnuo5k4HWsCcJiETqIDldhAhRtyfPyE8iQB5 3++KbIcSDtIrL+QJ27kLeiE9oz3PHIG1yA3PvDNB0/LnqMKrRfs6iI9shhxN0SmfZB/P Nx0ECO+UjFzcKKTww2Bu6Ace9rab1PQOB4BCI2mwbJ6u9GDzqw+b2uwQlMnkKhtosu9T fr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zN+Q8dgsMzp5svrusLksGWwBggAOjvLUcL+jRhmL2dI=; b=O+DipIlbzn64nYrO/0L5EZJOBFiakrHL1AFZXKooWSi7eZtFqHX8xDpd2PuWTjIbp6 T1SdGTMfuJKpcW0/wlxhDMq49SSTSc2ytfPhHlCIwL0MePEr2eV/6bTQNiRzVRZ3Isoq kzhURkSo4tJey6MtADogBQjX4u6tD82n7oz06FPEahqr0fAi32Mgxl5871lTetPxfZj6 uVJvnWzrEboEINjnFJZGjiovVdpXbgv0f8gebgf6+508KHJAJurKFtVO5h6mOOU6/Ee5 +CX6Lg2sPPJk7gwvjhTns/4EtdC3H9BVHXQgsr98VdARbSHoJk5Ccf7rmPj5AdAiF1I6 fhsA== X-Gm-Message-State: AOAM532OlWZkHq6a+Xq0TsRwUmuyA0bqKRg4yPqxpv4JyF6k5VWD4qbD 4PpsFQcVKSpMhORumnkmRuMHd9KwXU33/JAggmc= X-Google-Smtp-Source: ABdhPJzmoZOJiKTKN2ANcor0bAuDPWhU5HM92R3OmDGVNSrGSdQr6wQRhWdD5xKfwOVxUsMyDCBnTWnkBESl93cfZD8= X-Received: by 2002:a9f:31b1:: with SMTP id v46mr10684948uad.22.1623091236278; Mon, 07 Jun 2021 11:40:36 -0700 (PDT) MIME-Version: 1.0 References: <20210602080212.4992-1-jrdr.linux@gmail.com> <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> In-Reply-To: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> From: Souptick Joarder Date: Tue, 8 Jun 2021 00:10:24 +0530 Message-ID: Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF To: Robin Murphy Content-Type: text/plain; charset="UTF-8" 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: David Airlie , hjc@rock-chips.com, dri-devel , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kernel test robot Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy wrote: > > 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. Ok. Will remove of_match_ptr(). > > 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, > >