From patchwork Fri Mar 10 22:28:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A3A60C6FA99 for ; Fri, 10 Mar 2023 22:50:52 +0000 (UTC) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=csOKLLZb1pzhbiYlh9XttqMpGrtxxgLjRH55PkydgKY=; b=BbgAXAQbTj8RH7 UEaJusmHg1iCn5qVEBD3tHfvOjZAeWDkKOZQdQIuKbOpVSwF5Yc64oi8krEzCi03rHgAYUY+BIg8Z RlKk77ri4I9aFRwTWervrzMZxntNhscsbv2wc3gF2C0/MkkxT9ZVHgx8LmlTQvyqi6VHbF1JlFkn2 HvU5jM7ST7/kQAtI/D8ZMHcq8rubcrYZRkNTIxkTtsGnnhBGN2Mj96P0zJ0UQfroK859/pKLXsVxr 9Lg0Fw/DLgHbJXa91wQutkdYhk12wj2sOSL/3jCj7lDQjMsWrGTEzEZv6I6A2SdatgVo061eKb3r0 VGksY25L8oAOVpu/nNPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1palZS-00GW0s-Sv; Fri, 10 Mar 2023 22:50:42 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1palWz-00GUkW-Hh for linux-amlogic@bombadil.infradead.org; Fri, 10 Mar 2023 22:48:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=p4C8ul8r4FTTSiZJ472TZ7PsXvPEhmFf5+M7zLcSIw8=; b=KWUusMqrox4//a4xNKWoB4RVE/ rWZNAstD/sthsamlzkAKDL/MUsSxEgzm1m/EqPKI13zswkMaoKmyRCv87PxKLBu1ip7vOUwtgJpEz SOIlrVS0gDERwLqe4quXWjaTeypkcJZRQOUHLTEpH+FEnC2RCmKIVcomelrYkEvwg7BohJ/dvyj0f XCP0Ek79qAWXePsnVSn+a14noXjaGzL6+Cl0zcA86rZOPpXdiLDd/SmObKcvyL/J1wrpKSUz/35u5 3I5Zze97Sn2ejLx3nkI0wJD9zdToAhW7bZHtlCypgKD5ckcvaJsgpcZgNnIqfOV7KHJVLUwwLTpUo T6Lbrgqw==; Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1palEm-000ar4-2b for linux-amlogic@lists.infradead.org; Fri, 10 Mar 2023 22:29:26 +0000 Received: by mail-ed1-x52c.google.com with SMTP id a25so26665033edb.0 for ; Fri, 10 Mar 2023 14:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678487360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=p4C8ul8r4FTTSiZJ472TZ7PsXvPEhmFf5+M7zLcSIw8=; b=rrEwy1/EkKM2hXYDjXm39vr4v4A3eFp0vxvvErw0JyGtOLyGzIPJjSe+i9/9yBHwBo ggaHhX0ARMHrz05m76okNh3eCxxkXswhGfFQlh8eLEaz5q4totxmsxrVKzzBcVPBlD/r 43Om/8th0/4GENyp64/VX1I0z8locQldE8GoKn//2LSXEUixCVdNQJcwBsfbBKvRF4Nw 1L0+7vFPvhd6M4ExGtj4xFecNGFGuBJbBwpaN5Ez6o4kPkYXI5CclN4jOfC5FSg96/K5 A3HVNgymCz5jus/z1ws+Kq28D+AiPQyBaTjxTt2vechjWxkcXHoPWEnZqCMB8j+ZvSaF TWUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678487360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p4C8ul8r4FTTSiZJ472TZ7PsXvPEhmFf5+M7zLcSIw8=; b=U4wrwanx7uSSOdDcXZsWxgnppmd0fqIdGHZKGmawX6/bzBMRHWelwRhNMDh1GwFmaT A7uME54EFlGsTOSW+U3WQ3fYvTD1BkQbUkp82YTTyZ/WqdeQzH4877MRwoudjbSseL4V 47/2nDwM8IJZdBl0oMsUZOq82uqZIqePF46vAnouBZrUxuFor00r5EJNiMc+IXy8CrBA gsXF7IxfS49C/3NRL9NNqtmCaQC1OkCFrYtNFfTrH69Bt2y8LAqAxlc3HUJr4/T0ub8P mPgg5wvwauemR3aKlYGE3J/xrEu2/7P4NqoXwk7yFpkJyLQT2pprEJvm6McECKcjU5Su Frsg== X-Gm-Message-State: AO0yUKXv4pwhX8aIsBvkUZBH/w21Bearx/fqGuqvZtsXq4GqU4GgBeBX oSzMiOnXyoq3eCa0PTV8CXtjZQ== X-Google-Smtp-Source: AK7set9Dxapp5m7YmqmEU473go9gZsJAewh+nBqHr15xGDvrxDQqScmrTjf4oppgDcLOYI+pKl+ozg== X-Received: by 2002:a17:906:3002:b0:8b2:fb3d:9f22 with SMTP id 2-20020a170906300200b008b2fb3d9f22mr25973054ejz.33.1678487360596; Fri, 10 Mar 2023 14:29:20 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:34:52e3:a77e:cac5]) by smtp.gmail.com with ESMTPSA id x101-20020a50baee000000b004aeeb476c5bsm525467ede.24.2023.03.10.14.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 14:29:20 -0800 (PST) From: Krzysztof Kozlowski To: Mark Brown , Kamal Dasu , Broadcom internal kernel review list , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Heiko Stuebner , Krzysztof Kozlowski , Andi Shyti , Alim Akhtar , Stephen Boyd , Matthias Brugger , AngeloGioacchino Del Regno , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 16/16] spi: rspi: Mark OF related data as maybe unused Date: Fri, 10 Mar 2023 23:28:57 +0100 Message-Id: <20230310222857.315629-16-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230310222857.315629-1-krzysztof.kozlowski@linaro.org> References: <20230310222857.315629-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_222921_160232_1582B00C X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Driver can match via ID or OF ID table, thus several OF-related methods will be unused. Mark the OF structures as __maybe_unused so compiler can drop them: drivers/spi/spi-rspi.c:1203:29: error: ‘qspi_ops’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- drivers/spi/spi-rspi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index f494c86bafea..4724854e6726 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -1190,7 +1190,7 @@ static const struct spi_ops rspi_ops = { .num_hw_ss = 2, }; -static const struct spi_ops rspi_rz_ops = { +static const struct spi_ops rspi_rz_ops __maybe_unused = { .set_config_register = rspi_rz_set_config_register, .transfer_one = rspi_rz_transfer_one, .min_div = 2, @@ -1200,7 +1200,7 @@ static const struct spi_ops rspi_rz_ops = { .num_hw_ss = 1, }; -static const struct spi_ops qspi_ops = { +static const struct spi_ops qspi_ops __maybe_unused = { .set_config_register = qspi_set_config_register, .transfer_one = qspi_transfer_one, .extra_mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | @@ -1212,8 +1212,7 @@ static const struct spi_ops qspi_ops = { .num_hw_ss = 1, }; -#ifdef CONFIG_OF -static const struct of_device_id rspi_of_match[] = { +static const struct of_device_id rspi_of_match[] __maybe_unused = { /* RSPI on legacy SH */ { .compatible = "renesas,rspi", .data = &rspi_ops }, /* RSPI on RZ/A1H */ @@ -1225,6 +1224,7 @@ static const struct of_device_id rspi_of_match[] = { MODULE_DEVICE_TABLE(of, rspi_of_match); +#ifdef CONFIG_OF static void rspi_reset_control_assert(void *data) { reset_control_assert(data);