From patchwork Sun Mar 19 14:13:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13180392 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 D70E3C7618A for ; Sun, 19 Mar 2023 14:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230304AbjCSOOB (ORCPT ); Sun, 19 Mar 2023 10:14:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbjCSOOA (ORCPT ); Sun, 19 Mar 2023 10:14:00 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB71014E9A for ; Sun, 19 Mar 2023 07:13:58 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id eg48so37317708edb.13 for ; Sun, 19 Mar 2023 07:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679235237; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Q5h5ofl9KKUhrjR7negFQ4f5ler/o7Dhg36fLIrhRAc=; b=Ai7++6+aY05cVSDp59+T7LeeF+Cun1dhLEcqFosyhAc7I034fOOznPXcVIQlrfl1D4 lqnGnSZewjrygIFJxoPDi4H16xWzFCfbg30AeW0+AJo8B9uIl2uzFpcIAFX6+lD8mCgr Z+C9Yhe032vSB9NsHf4MN7kipOjbk/BYbrYb+lKlAWW7ZX6HlVRUilNo1n2JZ+CB+mI0 /p7S0TugbN6YdU3J0DwzDmDHioac3LQMqturckMbbK9K/kaS5PKuE77wi5bZEscaHoYz l891EVtKKQC47NR/0FBw5g1zsziJ6hkSXRjWJ6++bR3vygzJlmhuXimU9aTFf7DF62lW zNJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679235237; 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=Q5h5ofl9KKUhrjR7negFQ4f5ler/o7Dhg36fLIrhRAc=; b=F7Cqr+dEnO1VmbvCQOGlvk7JImJSDFMxVaWykn4vmoZhn6KzrciuxHQEPxGM+wmUTc 3KJz3CngEoyhPu+cb2vzRNV95wU7CutAKvDPxnjoEZdmfBHs69wJGORyA1audAYVGnQt 9RuonSgMI8/fXerxo0X538Fz8Tz8qxat1qnGpt4kpvonvTZD+9xGQKXsdsJ9Vg4uVeWH zfvr/PDgrOl6ioFK0pHE3/lDYYlks09cR7SCcwMwPvr66zPI1kMU+BMbW7mglsrMKW9w Rh0IQAAhyabcTVhRworZ/vf4yfpTdroy2HRbW+ByzGKPAmLK4o3KEPRxcBHGsfkP0nYo s7uw== X-Gm-Message-State: AO0yUKV3x/xrLcw4aV6Hf17Fbs/FbpE7e6KhcEGpHXQo6E/FbcaqPWNn HCu/k/lM1tZWrmULW7I8CQ21CMI/qwncA1mTY+w= X-Google-Smtp-Source: AK7set9VLgLOFLpI9k8tMUp+EUnJsYP+QKe0Ps442caQ2pD4i0SM2QXtqQduQ+MgDAWL/o+RJWkYfQ== X-Received: by 2002:aa7:cc09:0:b0:4fc:e605:556a with SMTP id q9-20020aa7cc09000000b004fce605556amr9678786edt.5.1679235237279; Sun, 19 Mar 2023 07:13:57 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:5b5f:f22b:a0b:559d]) by smtp.gmail.com with ESMTPSA id t21-20020a50d715000000b004af7191fe35sm3540689edi.22.2023.03.19.07.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 07:13:56 -0700 (PDT) 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 v2 1/2] tpm: st33zp24: Mark ACPI and OF related data as maybe unused Date: Sun, 19 Mar 2023 15:13:53 +0100 Message-Id: <20230319141354.22907-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 unused. This fixes compile tests with W=1 by annotating device ID table as possibly unused: 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 Reviewed-by: Jarkko Sakkinen --- Changes since v1: 1. Enhance commit msg. --- 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 Sun Mar 19 14:13:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13180393 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 68EFFC76195 for ; Sun, 19 Mar 2023 14:14:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbjCSOOD (ORCPT ); Sun, 19 Mar 2023 10:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjCSOOB (ORCPT ); Sun, 19 Mar 2023 10:14:01 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93603196AB for ; Sun, 19 Mar 2023 07:13:59 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id z21so37485808edb.4 for ; Sun, 19 Mar 2023 07:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679235238; 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=5P8vV5SdTC8v0eY1KGmdi5SpQmO/V0KvzXuxG5KBGwI=; b=eLvpMkifkBIdXQ7UetfEpMemmF379+5kf09TjY2d6rTkkpv4pDW1mMCQDGrxV2UeqB L9Zkmufygw4svPq9s6pFUWnRJFdd0NCbX+51vy5mJ0HHWmDIdZmS6ipebhtaY6mOBUMR hmGNamy0stqDW6xt9o0t+pctMP3GvmKgYWajnzQFj94SYMy8ayD+lhv7D0by3bSN0dwN 9HxXuqqg53hJB20+esXKlhckwnC4AZAept26uMo1QXE/kP6eXVjHxOJSa83pn983O0Xd K9Y39t2cNChcd67fPjQUPnCnX/HDXzOB3PceXqxM5fNmKGGiIcpSB/ahkwGBtloVPTpM oQeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679235238; 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=5P8vV5SdTC8v0eY1KGmdi5SpQmO/V0KvzXuxG5KBGwI=; b=hXCWR5YbXcaz/MxPQfzq72qN+fkUfZ8VM/0UZBb/EBt3BGR4tJAgjXPSk78KHsWB4E hvwBa5UuCa9OM8IMgBpB6yXfWT20IvNj1pxzhZmxeI0E4+vlTYUDrkHu3R9d4QwX/mce j5Njn8gXXIoP5wENtH1FVXeHiDuhbhgC1qrigh+1rFNoOlWpEkMeW1YQT2j/KTJ4DFRe Vyrch+3yVEXTMyVinARbAOd4VuqEUMFA5A2CUwDuJFxwGlpvmsXAPEP4nE5lHfakq6kf YoFY+HZdHZL5g9mGWD57iTp2t/JE0LyInVAoY2gBmiF/y29faudkk/2H5HDVKxT9MCrI jupA== X-Gm-Message-State: AO0yUKUoGug9zZWdGKyExbhIeWuvkSgI7hdr7jTSmPCJQNmMINhQ/mk8 FG/I7Fc5KxoyEW7xHNJa0nO2zQ== X-Google-Smtp-Source: AK7set+7F5xYj57Uc7OdJB7x1zl+UTYlUcK21nOpfQqu9S3MJ+xiyrr4s/wKj3rZ3zx7povZD0tcJQ== X-Received: by 2002:aa7:c043:0:b0:500:2a15:f86b with SMTP id k3-20020aa7c043000000b005002a15f86bmr8791029edo.42.1679235238119; Sun, 19 Mar 2023 07:13:58 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:5b5f:f22b:a0b:559d]) by smtp.gmail.com with ESMTPSA id t21-20020a50d715000000b004af7191fe35sm3540689edi.22.2023.03.19.07.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 07:13:57 -0700 (PDT) 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 v2 2/2] tpm: tpm_tis_spi: Mark ACPI and OF related data as maybe unused Date: Sun, 19 Mar 2023 15:13:54 +0100 Message-Id: <20230319141354.22907-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230319141354.22907-1-krzysztof.kozlowski@linaro.org> References: <20230319141354.22907-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. This fixes compile tests with W=1 by annotating device ID table as possibly 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 --- Changes since v1: 1. Enhance commit msg. --- 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}, {} };