From patchwork Sat Mar 11 17:35:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170923 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2349C61DA4 for ; Sat, 11 Mar 2023 17:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbjCKRht (ORCPT ); Sat, 11 Mar 2023 12:37:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbjCKRhr (ORCPT ); Sat, 11 Mar 2023 12:37:47 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF52D4DBF3 for ; Sat, 11 Mar 2023 09:37:10 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id ek18so1913641edb.6 for ; Sat, 11 Mar 2023 09:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678556143; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v+m9ntVT6zRyn4E2lUXnQpNIrwyEGSazrrlPjQH0kBc=; b=evEJOqDUyhyJ4BAxvgh/2/8+QmDu+PYl70SiOXoV4jJoIVGtGsy/l7uB5lUAMVQ6Wt Fj3Vw2Zk47tLRDt8W5FfVgiW0nRF1C/T/09UItZ9xoIX/sqhwrHOWDszPY5o9YWb54BY /9pkJBSRp/ykglCVzUMs9vup46r8NL9emZ/DRtDRMST2IG5Ke4RPzMSGAYF3QNn8+IPo KarlnAsUZJvZqsY2CIgvu6YS0+d2+T2FDjob3J1qBR8mJoWdDhZHVIaop59w56aegGCc XDX02LvNHRHKAbjpboRqZamGwyrBSlM5Ag+Qwi5J7pR4HczeVA0FW2IpczCMaptZMoU3 llsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678556143; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v+m9ntVT6zRyn4E2lUXnQpNIrwyEGSazrrlPjQH0kBc=; b=Y9nIvECt0qpYAKcMuYH27tdFEW4j0q0fb0M3hQDF13l6YOmi/sR8B2JwI6zSFWll8z 5OIPj7mPXofyhhzvNAPW0XetlEYk3BsXP2uXcZtn2ZCwZXSObe5Vatdxo/14CAQtBPdZ Pw2ilRy5zyCh8AbDAXWuJD3ZlNdmUJd1VTFv2q/Au2d31UtxyCoO0RB2S4Y+IEe2SLZW kIJS2cU33dc1bO6Ud/MkamH5IF8zyvTkKj3KLFHc9XRlJUCsddYynnqdYhDppiy+NBrI U6+0jT8106hBYuzd1wrZAAyVTz4FnQVzOBjuWyAazR5K7G1Cacw574dDXOR+JN0Wzdnl OOkg== X-Gm-Message-State: AO0yUKX7X0lTu3e8ThWbL0HVqI7g/FVhUmU6wZRe2OpxOeHSoAII7G08 tsvqRV9Ry03CEYaC4AFEEiVK0w== X-Google-Smtp-Source: AK7set80VWxHVxYHu+wGmqGEYQ65EZyVH8EpLxy1MCkaCXxmE5sRxnJehdZdW9zWvh4uIdLJpizVlg== X-Received: by 2002:a17:907:110b:b0:921:d539:1a3a with SMTP id qu11-20020a170907110b00b00921d5391a3amr1816638ejb.58.1678556143149; Sat, 11 Mar 2023 09:35:43 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:6927:e94d:fc63:9d6e]) by smtp.gmail.com with ESMTPSA id v12-20020a170906b00c00b008c76facbbf7sm1311364ejy.171.2023.03.11.09.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 09:35:42 -0800 (PST) From: Krzysztof Kozlowski To: Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] tpm: st33zp24: Mark ACPI and OF related data as maybe unused Date: Sat, 11 Mar 2023 18:35:40 +0100 Message-Id: <20230311173541.262949-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making drivers/char/tpm/st33zp24/i2c.c:141:34: error: ‘of_st33zp24_i2c_match’ defined but not used [-Werror=unused-const-variable=] drivers/char/tpm/st33zp24/spi.c:258:34: error: ‘of_st33zp24_spi_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- drivers/char/tpm/st33zp24/i2c.c | 4 ++-- drivers/char/tpm/st33zp24/spi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c index c4d0b744e3cc..2d28f55ef490 100644 --- a/drivers/char/tpm/st33zp24/i2c.c +++ b/drivers/char/tpm/st33zp24/i2c.c @@ -138,13 +138,13 @@ static const struct i2c_device_id st33zp24_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id); -static const struct of_device_id of_st33zp24_i2c_match[] = { +static const struct of_device_id of_st33zp24_i2c_match[] __maybe_unused = { { .compatible = "st,st33zp24-i2c", }, {} }; MODULE_DEVICE_TABLE(of, of_st33zp24_i2c_match); -static const struct acpi_device_id st33zp24_i2c_acpi_match[] = { +static const struct acpi_device_id st33zp24_i2c_acpi_match[] __maybe_unused = { {"SMO3324"}, {} }; diff --git a/drivers/char/tpm/st33zp24/spi.c b/drivers/char/tpm/st33zp24/spi.c index 2154059f0235..f5811b301d3b 100644 --- a/drivers/char/tpm/st33zp24/spi.c +++ b/drivers/char/tpm/st33zp24/spi.c @@ -255,13 +255,13 @@ static const struct spi_device_id st33zp24_spi_id[] = { }; MODULE_DEVICE_TABLE(spi, st33zp24_spi_id); -static const struct of_device_id of_st33zp24_spi_match[] = { +static const struct of_device_id of_st33zp24_spi_match[] __maybe_unused = { { .compatible = "st,st33zp24-spi", }, {} }; MODULE_DEVICE_TABLE(of, of_st33zp24_spi_match); -static const struct acpi_device_id st33zp24_spi_acpi_match[] = { +static const struct acpi_device_id st33zp24_spi_acpi_match[] __maybe_unused = { {"SMO3324"}, {} }; From patchwork Sat Mar 11 17:35:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170954 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97943C61DA4 for ; Sat, 11 Mar 2023 17:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbjCKRuM (ORCPT ); Sat, 11 Mar 2023 12:50:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbjCKRuK (ORCPT ); Sat, 11 Mar 2023 12:50:10 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C27CB5BC87 for ; Sat, 11 Mar 2023 09:50:05 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id da10so33204245edb.3 for ; Sat, 11 Mar 2023 09:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678557004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h6QRvqIPqhwfkaL7qJCNUGtwyaLEhOy0ZykrT/r18uU=; b=avy2XnQ5ee8d83UnInhhNy0BVYj7vPJIzRtKhW6y2UcEyybTuFPa1xQ56X0w4VH9zX rHBxtksuweWQY2ULdQsSBIUJj4fjrcyZN3vDXktUbz73hePujflqghTq7TgNrP+pzkAd /QtST5bdC/lI0VW/bUe+CHADE1A74/LskJ/VOVlaJH9HCMZD3su9LxMh5ZYYjh/nr2jq YDM0G+hnjIwFYPa9VbftDqL5iAsAul+JdiwI3NEJu0SQSlKt1xz2vEmdlVO0nnpvtIoU EWKd3UlZhv0H5cQBia0R8zqEIk+0VPXKpa9dtT60veKtjrN4924L3MkAtyYB62pa/8Se 3yaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678557004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h6QRvqIPqhwfkaL7qJCNUGtwyaLEhOy0ZykrT/r18uU=; b=ZJ2kSZMgZDWzny9VPhrz9GuUGCncauk5y72KccVng3ytb+jfqEMgf6BTrS+C868bfN hPjmPY798MlXHpmeQGDHRlDMLVpRxzAA6fIzNGW+cXJ9t5PVxsgSmGHFH6/VS+tzKnm7 OCHQeKSwvomo+ZErSWhAj0naKnNaLPJbGTIofojrGHsUSiHqFIzhahtZI2ROydlpJwQg 8IFsZ4v1JEsitZ3KAWq5iC4jYpgISt1AezueD1r5W1ePf4aMmCVo7JHvqdtTGwEEb6IU jWd84q0npOgbzgfIke6b4kV7XGHxTAZsdPSN+QGeOSUwBXEhDPRIqHNW6oPVX1yyWelk 9CBg== X-Gm-Message-State: AO0yUKVn9iTBZLvy5Gz0T1kVphb41BxNKoQGb90o+2/nwfr+FVYaAEHE Yip1IFzak0+4pWgRXk23vi9N6yxGHmjobkS7m5w= X-Google-Smtp-Source: AK7set8G/4BR94DteJ8al719zG2ZLW4GhFbY4KlxWdeiielUMmGVUrP1PmeO8ZDcbEXIIrdlTQcCAA== X-Received: by 2002:a17:907:c22:b0:919:7f81:22a8 with SMTP id ga34-20020a1709070c2200b009197f8122a8mr6980742ejc.24.1678556144183; Sat, 11 Mar 2023 09:35:44 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:6927:e94d:fc63:9d6e]) by smtp.gmail.com with ESMTPSA id v12-20020a170906b00c00b008c76facbbf7sm1311364ejy.171.2023.03.11.09.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 09:35:43 -0800 (PST) From: Krzysztof Kozlowski To: Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] tpm: tpm_tis_spi: Mark ACPI and OF related data as maybe unused Date: Sat, 11 Mar 2023 18:35:41 +0100 Message-Id: <20230311173541.262949-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230311173541.262949-1-krzysztof.kozlowski@linaro.org> References: <20230311173541.262949-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making unused: drivers/char/tpm/tpm_tis_spi_main.c:234:34: error: ‘of_tis_spi_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- drivers/char/tpm/tpm_tis_spi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_spi_main.c b/drivers/char/tpm/tpm_tis_spi_main.c index a0963a3e92bd..1f5207974a17 100644 --- a/drivers/char/tpm/tpm_tis_spi_main.c +++ b/drivers/char/tpm/tpm_tis_spi_main.c @@ -231,7 +231,7 @@ static const struct spi_device_id tpm_tis_spi_id[] = { }; MODULE_DEVICE_TABLE(spi, tpm_tis_spi_id); -static const struct of_device_id of_tis_spi_match[] = { +static const struct of_device_id of_tis_spi_match[] __maybe_unused = { { .compatible = "st,st33htpm-spi", .data = tpm_tis_spi_probe }, { .compatible = "infineon,slb9670", .data = tpm_tis_spi_probe }, { .compatible = "tcg,tpm_tis-spi", .data = tpm_tis_spi_probe }, @@ -240,7 +240,7 @@ static const struct of_device_id of_tis_spi_match[] = { }; MODULE_DEVICE_TABLE(of, of_tis_spi_match); -static const struct acpi_device_id acpi_tis_spi_match[] = { +static const struct acpi_device_id acpi_tis_spi_match[] __maybe_unused = { {"SMO0768", 0}, {} };