lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87cyz4he2u.wl-tiwai@suse.de>
Date:   Wed, 30 Aug 2023 15:09:13 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@...il.com>
Cc:     James Schulman <james.schulman@...rus.com>,
        David Rhodes <david.rhodes@...rus.com>,
        Richard Fitzgerald <rf@...nsource.cirrus.com>,
        Lee Jones <lee@...nel.org>, alsa-devel@...a-project.org,
        patches@...nsource.cirrus.com, linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        regressions@...ts.linux.dev
Subject: Re: mainline build failure due to ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")

On Wed, 30 Aug 2023 13:29:57 +0200,
Sudip Mukherjee (Codethink) wrote:
> 
> Hi All,
> 
> The latest mainline kernel branch fails to build alpha, csky and s390
> allmodconfig with the error:
> 
> drivers/mfd/cs42l43.c:1138:12: error: 'cs42l43_runtime_resume' defined but not used [-Werror=unused-function]
>  1138 | static int cs42l43_runtime_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~~~~~
> drivers/mfd/cs42l43.c:1124:12: error: 'cs42l43_runtime_suspend' defined but not used [-Werror=unused-function]
>  1124 | static int cs42l43_runtime_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/mfd/cs42l43.c:1106:12: error: 'cs42l43_resume' defined but not used [-Werror=unused-function]
>  1106 | static int cs42l43_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~
> drivers/mfd/cs42l43.c:1076:12: error: 'cs42l43_suspend' defined but not used [-Werror=unused-function]
>  1076 | static int cs42l43_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~
> 
> git bisect pointed to ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
> 
> I will be happy to test any patch or provide any extra log if needed.

Adding __maybe_unused for those PM functions should work around it,
something like below.  Could you check it?
If it's confirmed to work, I'll submit properly.


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@...e.de>
Subject: [PATCH] mfd: cs42l43: Fix unused function errors for PM callbacks

Add __maybe_unused prefix for suppressing the build errors due to
defined-but-not-used PM callbacks.

Reported-by: Sudip Mukherjee (Codethink) <sudipm.mukherjee@...il.com>
Fixes: ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Takashi Iwai <tiwai@...e.de>
---
 drivers/mfd/cs42l43.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index 37b23e9bae82..e94b73e6869a 100644
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -1073,7 +1073,7 @@ void cs42l43_dev_remove(struct cs42l43 *cs42l43)
 }
 EXPORT_SYMBOL_NS_GPL(cs42l43_dev_remove, MFD_CS42L43);
 
-static int cs42l43_suspend(struct device *dev)
+static int __maybe_unused cs42l43_suspend(struct device *dev)
 {
 	struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
 	int ret;
@@ -1103,7 +1103,7 @@ static int cs42l43_suspend(struct device *dev)
 	return 0;
 }
 
-static int cs42l43_resume(struct device *dev)
+static int __maybe_unused cs42l43_resume(struct device *dev)
 {
 	struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
 	int ret;
@@ -1121,7 +1121,7 @@ static int cs42l43_resume(struct device *dev)
 	return 0;
 }
 
-static int cs42l43_runtime_suspend(struct device *dev)
+static int __maybe_unused cs42l43_runtime_suspend(struct device *dev)
 {
 	struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
 
@@ -1135,7 +1135,7 @@ static int cs42l43_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int cs42l43_runtime_resume(struct device *dev)
+static int __maybe_unused cs42l43_runtime_resume(struct device *dev)
 {
 	struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
 	unsigned int reset_canary;
-- 
2.35.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ