From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D4486EB60; Wed, 3 Apr 2024 09:15:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712135726; cv=none; b=l8hOL1ywRTmM9q17jeE6HRLh8JenkZtecdCTJKJIBMHTgD1cYi42WgmNeGBPidbNvRZy5qqBdFORNSDSJq4q3dy/YoSp21JC8uaMCsg3++WeDDOLq5h7kHRRc3p0YvvzZCrJbarR/jamn6nAwAIkbDOEp6Oh2Ymj4KnmYECjqZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712135726; c=relaxed/simple; bh=ZM/3Byxpxed4P8WSswonfevzf2brOiTU9TshRQSMaj0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cjBen5D7rE5O6A1syZqpYOu33T8hMrMNjI+UU5B7Flhcr7TnHZaWAlVu5QMFDWNHedAjzCxXg4VF/6ECmsJXhirjsljjPaVcQsMJUbkFrqMYgdvx9QBznJpi1HShzbc3CHcAHTTYUUxQw9HRUHOv/6O7eRNUoNeHPskvOvs/Ynk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dGAjwkYH; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dGAjwkYH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712135725; x=1743671725; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZM/3Byxpxed4P8WSswonfevzf2brOiTU9TshRQSMaj0=; b=dGAjwkYH5I0ZQvQufBH62Bhm+DYc5fVK0ul+WcdtHWsPLLg8pvceO2dT 0f0BJLwfgETlaV24hLp48fLFBPl645fQ1r9TzUJZKMfeKRKPhaMdN8XjQ GqFntr4CFo2fG80BKWl6MYQqW9mOLQAS8vGnbc2SmN5K70dWphnAAIlYt jHt4XKOW9xpVMgReY6SWkdUpbmkQ5VP5DVZRfRBVeWeeQwmFBbQtGTwi0 5kMrsAnk8FsAg8za7OGyJXMQn/gLL+3Q+BmQ47GZpmhSvh+pykOrVAURi cZkIBr/jhdl+M/vf+T7A/R/2b6W8yC9qW7ltVPi0p0gxhYcroqtkbAW/U g==; X-CSE-ConnectionGUID: rWKwYGhjTtWEeIfcwE9vaA== X-CSE-MsgGUID: RIsAhhNwT3KNaQTfJ7NIPg== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="7217305" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="7217305" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 02:15:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="915175371" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="915175371" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 02:15:17 -0700 Received: from andy by smile with local (Exim 4.97) (envelope-from ) id 1rrwiA-000000014UU-0axT; Wed, 03 Apr 2024 12:15:14 +0300 Date: Wed, 3 Apr 2024 12:15:13 +0300 From: Andy Shevchenko To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Claudiu Beznea , Nicolas Ferre , Alexandre Belloni , Oder Chiou , Srinivas Kandagatla , Banajit Goswami , Sylwester Nawrocki , Arnd Bergmann , Alper Nebi Yasak , Kuninori Morimoto , Akihiko Odaki , Linus Walleij , Yinchuan Guo , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Rob Herring , AngeloGioacchino Del Regno , Krzysztof Kozlowski , linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 32/34] ASoC: remove incorrect of_match_ptr/ACPI_PTR annotations Message-ID: References: <20240403080702.3509288-1-arnd@kernel.org> <20240403080702.3509288-33-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240403080702.3509288-33-arnd@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Apr 03, 2024 at 10:06:50AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > When building with CONFIG_OF and/or CONFIG_ACPI disabled but W=1 extra > warnings enabled, a lot of driver cause a warning about an unused > ID table: > > sound/soc/atmel/sam9x5_wm8731.c:187:34: error: unused variable 'sam9x5_wm8731_of_match' [-Werror,-Wunused-const-variable] > sound/soc/codecs/rt5514-spi.c:496:34: error: unused variable 'rt5514_of_match' [-Werror,-Wunused-const-variable] > sound/soc/samsung/aries_wm8994.c:524:34: error: unused variable 'samsung_wm8994_of_match' [-Werror,-Wunused-const-variable] > > The fix is always to just remove the of_match_ptr() and ACPI_PTR() wrappers > that remove the reference, rather than adding another #ifdef just for build > testing for a configuration that doesn't matter in practice. ... > index d6cdb6d9fdd6..ffc105759994 100644 > --- a/sound/soc/amd/acp3x-rt5682-max9836.c > +++ b/sound/soc/amd/acp3x-rt5682-max9836.c > @@ -543,7 +543,7 @@ MODULE_DEVICE_TABLE(acpi, acp3x_audio_acpi_match); > static struct platform_driver acp3x_audio = { > .driver = { > .name = "acp3x-alc5682-max98357", > - .acpi_match_table = ACPI_PTR(acp3x_audio_acpi_match), > + .acpi_match_table = acp3x_audio_acpi_match, > .pm = &snd_soc_pm_ops, > }, > .probe = acp3x_probe, Replace acpi_match_device() by device_get_match_data() and acpi.h by mod_devicetable.h + property.h. I really would like to see agnostic drivers (when they don't need of*.h/acpi.h to be included as "proxy" headers). With this, the change probably needs to be separated from this patch. If you address as suggested, Reviewed-by: Andy Shevchenko ... The rest I haven't checked, it might be possible to do something similar there as well. -- With Best Regards, Andy Shevchenko 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 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 26B36CD1288 for ; Wed, 3 Apr 2024 09:15:47 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gJ1Qx1sQvPYehDSBJ9LW6HZto4xUp6NwzInBNbUsU+w=; b=G48qYAHGV0ubq/ 0nRJMD3pg8EliTwIVfABf6NV5dcJxbD+R6fbhEPuuEFxQY31WwxIXP6UHBU00PiyPIbWBN+l1Ml74 zus8s1Jb3qK4H0OrQ2wDeraTjU7PGsShhqrFzXQnH/HKkbPnbsPFvda10D3l9R+QgZKAhl0X78NtJ 2cBf5CaLTpHLNdHls/3/RyjrBBZUFllmgvfT8LJfARIJB0Rg+XS0QU2zYwve6ngLeWa6k4lNym1jo T3ThdsiHK0SrweCfmoAShh3owakxu2N4uIBus7enhroymWcUroji9gBiST08aPB2kB5nePvIqcV4d JERWsSfOb0oQziEforYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrwiQ-0000000F9MW-3l85; Wed, 03 Apr 2024 09:15:30 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrwiN-0000000F9LE-2Vmr for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2024 09:15:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712135727; x=1743671727; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZM/3Byxpxed4P8WSswonfevzf2brOiTU9TshRQSMaj0=; b=c1IYM2HRYew+1z9crGrtr2RzmJ90aL6K2V2ra+heQBPRizrqPYJKVZVw 8ZqtLpOwUI23uFtteZ3tkqEJcmz1HbqAk0liSMLB+LW5OVPQWXP7ur1dx 21jay38X+11ydy13jF63MvoUxjPa/xZOpTanA7b7gvyRvTnuLYPA3TVGx XXiYgbmAnCApVLhGvhknBIfutMhD5lea6rRbgQJ9Xo030fMCJO+vOGdsN yOIe7Vz1A/qwWk24MlzXey3msreHLK9dDMReQk/Cz5Lnp69PdVrW+gLn+ jNppz3Q3gxWgwWtAeka1DDSau+HH5yoQwxqOHkGdNTYQhzB0M821ilJ1e w==; X-CSE-ConnectionGUID: 3vdxBm4+QFuM2IRP9ULGSw== X-CSE-MsgGUID: IEhplC+wTtqEtQHRMyPXWg== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="7217308" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="7217308" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 02:15:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="915175371" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="915175371" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 02:15:17 -0700 Received: from andy by smile with local (Exim 4.97) (envelope-from ) id 1rrwiA-000000014UU-0axT; Wed, 03 Apr 2024 12:15:14 +0300 Date: Wed, 3 Apr 2024 12:15:13 +0300 From: Andy Shevchenko To: Arnd Bergmann Subject: Re: [PATCH 32/34] ASoC: remove incorrect of_match_ptr/ACPI_PTR annotations Message-ID: References: <20240403080702.3509288-1-arnd@kernel.org> <20240403080702.3509288-33-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240403080702.3509288-33-arnd@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_021527_789116_D3787779 X-CRM114-Status: GOOD ( 23.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Akihiko Odaki , Kuninori Morimoto , Linus Walleij , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla , Sylwester Nawrocki , Claudiu Beznea , Rob Herring , Yinchuan Guo , Takashi Iwai , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Arnd Bergmann , linux-sound@vger.kernel.org, Alper Nebi Yasak , Mark Brown , Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , Oder Chiou , Liam Girdwood , Krzysztof Kozlowski , Banajit Goswami Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 03, 2024 at 10:06:50AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > When building with CONFIG_OF and/or CONFIG_ACPI disabled but W=1 extra > warnings enabled, a lot of driver cause a warning about an unused > ID table: > > sound/soc/atmel/sam9x5_wm8731.c:187:34: error: unused variable 'sam9x5_wm8731_of_match' [-Werror,-Wunused-const-variable] > sound/soc/codecs/rt5514-spi.c:496:34: error: unused variable 'rt5514_of_match' [-Werror,-Wunused-const-variable] > sound/soc/samsung/aries_wm8994.c:524:34: error: unused variable 'samsung_wm8994_of_match' [-Werror,-Wunused-const-variable] > > The fix is always to just remove the of_match_ptr() and ACPI_PTR() wrappers > that remove the reference, rather than adding another #ifdef just for build > testing for a configuration that doesn't matter in practice. ... > index d6cdb6d9fdd6..ffc105759994 100644 > --- a/sound/soc/amd/acp3x-rt5682-max9836.c > +++ b/sound/soc/amd/acp3x-rt5682-max9836.c > @@ -543,7 +543,7 @@ MODULE_DEVICE_TABLE(acpi, acp3x_audio_acpi_match); > static struct platform_driver acp3x_audio = { > .driver = { > .name = "acp3x-alc5682-max98357", > - .acpi_match_table = ACPI_PTR(acp3x_audio_acpi_match), > + .acpi_match_table = acp3x_audio_acpi_match, > .pm = &snd_soc_pm_ops, > }, > .probe = acp3x_probe, Replace acpi_match_device() by device_get_match_data() and acpi.h by mod_devicetable.h + property.h. I really would like to see agnostic drivers (when they don't need of*.h/acpi.h to be included as "proxy" headers). With this, the change probably needs to be separated from this patch. If you address as suggested, Reviewed-by: Andy Shevchenko ... The rest I haven't checked, it might be possible to do something similar there as well. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel