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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D732C6FA8F for ; Wed, 30 Aug 2023 18:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232122AbjH3S5n (ORCPT ); Wed, 30 Aug 2023 14:57:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244391AbjH3NJR (ORCPT ); Wed, 30 Aug 2023 09:09:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3CF4124 for ; Wed, 30 Aug 2023 06:09:14 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 91A7B1F74B; Wed, 30 Aug 2023 13:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1693400953; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+QuVvhURDtGRQlvTadeA6aCDvBZgXloZzfcYZfjtuzM=; b=KfadQ7yIrlUDo2YW9sOO9D5qxJMv8qRcoZQ7ACOzgg6XPfrJ22yJnsnLNcVsta2dwPmpsc jc1uqDxLZVH8CPiVodVT5LY8TVdE2kmkuzmWgsLPw8g1/e1F2+o5xLwdAxU6DqBUMfj90u AMPsW6DjM9ltvRHKzS8dqv9xiZ4FBCw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1693400953; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+QuVvhURDtGRQlvTadeA6aCDvBZgXloZzfcYZfjtuzM=; b=1V1dpfHcczSnaLtK8dcEzEwlziQ2b1sVXbXN6IbJFbPrJdf87mBPil+65a2eXQ9QwB1yhL se1NyP3K/EYjnEDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 737D513441; Wed, 30 Aug 2023 13:09:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G0qzG3k/72QqXgAAMHmgww (envelope-from ); Wed, 30 Aug 2023 13:09:13 +0000 Date: Wed, 30 Aug 2023 15:09:13 +0200 Message-ID: <87cyz4he2u.wl-tiwai@suse.de> From: Takashi Iwai To: "Sudip Mukherjee (Codethink)" Cc: James Schulman , David Rhodes , Richard Fitzgerald , Lee Jones , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Linus Torvalds , regressions@lists.linux.dev Subject: Re: mainline build failure due to ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver") In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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) Fixes: ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver") Signed-off-by: Takashi Iwai --- 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