Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp33488lqp; Thu, 4 Apr 2024 06:30:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkyNtuBFFBp1VexTwZg6x9+/6N0bNmmMyg2Nd8KkRIKX55R92o3ISGJhUWPFmeSGBuSPoJBnZlyN2HeBY+lXFEedqcA81XBVjxOaMfAA== X-Google-Smtp-Source: AGHT+IHzihs1J+rJXHZFORCHMoQbmob99bdJX9kKWrv29FR6QLcIQ1WIanVCJYLaoHswecfroGEG X-Received: by 2002:a05:622a:13d0:b0:432:b6da:6042 with SMTP id p16-20020a05622a13d000b00432b6da6042mr2648268qtk.1.1712237440306; Thu, 04 Apr 2024 06:30:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712237440; cv=pass; d=google.com; s=arc-20160816; b=kIcvKc5p7tPeYCGJTXzVb7h9LtlJuHuqxTDaojy/IDS9cJAXqIjw9yxYxQsk6Klkj6 rbqYaq0HM69i8mwB5yz4ikR/EDNQouxWeOpPM28LukjU7BiSeNUm2TPy1ADzNrle1Rtl SqxLs0BdKPqjSmQOU/dtjACW5p6OFMSkN2nnft8FlYOy/BDiyCLX43fr9x2mvZCWYiQS BoZR9Ep0ZkN8HVoIGNxIyAWjJPBN7EPhHwo/ONQVhCIPW/BmTHu2FOUFHFDDcmQyZDTp Heh4NL54EDYR3LVJ7l/nMVBo4K6emgjTI52R8RpO58EP024/OntXTExCy4LFWhZx153S TdUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=3EXfWN8P5VuDS2tBKaeYIlzaBwuTnbSXHh8enyfbC6U=; fh=KR1kmIXl6DgNKYla9ERc7JTa5RJNRErUCtvVjnQu7Y8=; b=K7TnBhA/3CPXGYVQQmaUhtxEYUIaW/jTyOWsMKkp01ZGUPr13+MSMFLQCDKTevfIrp tAkIDERmq/PvdF5ql56fJ/0wgjT8Z6ksiMLiibQG0rGleSEiW6DbjvbMiz40izFoP6aG 9cluuE9ESN+2rNCKBemnNieMqC0m8pvDsUjSCrgrGaKUfqfRUMFgabIdkSqDU2ezxJiU MRrOmgbE/k4xhWnaVmK65YO+/7Qml8atJFL7Ls1B/M1fv9pVALUK2kjZHhjmhZ0mlsSn DXkl7voc9RmuEfpPHk9ywTlFhbrQCwIA0RjOv5pJA7e5YN6TYGj3Hd10Y/x4VJvTNtwm RpXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ba7UF+8J; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-131504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g16-20020ac87d10000000b0043182dd0573si16749201qtb.503.2024.04.04.06.30.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ba7UF+8J; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-131504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9F5B21C210F9 for ; Thu, 4 Apr 2024 13:30:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEBB5127B4D; Thu, 4 Apr 2024 13:30:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ba7UF+8J" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 84AA8433A8; Thu, 4 Apr 2024 13:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237434; cv=none; b=YNG99r75NItcgBpYnwlOc5n/yA1jPh6G8pn4ErlJL5QG0Vj6kY3HemzeB4yRh2764cEJy+oKzNgu2HnwXtqo4OzVs4Ekh2qHnfMsTKN/ifw+FDmZfnOkuAd5MBGisviXepiExlLhzqyjXEqoWP3VnUsc+Xuhq0g0MX0wZ74PwfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237434; c=relaxed/simple; bh=V05vvnqU1BcexcFjfW4W3SDJUB2OtOy3KSr5NabUMAg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EeOX0frf6BhgPIHOsQsyuciMzYh5z3Kc3FEgHL8h9ONAQmY3RlnX+DKEIp90ZeyuMs4y/XozzUCTM9tzTKDYxamqhKeJc3LNl8hI/iE37gaXin58CvbJm/hV7pADgT96nVs3A/IoCf7nvfvyZpB9e6qcd91xVmFyQaaw0f2FGeo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=ba7UF+8J; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 01761E0007; Thu, 4 Apr 2024 13:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712237428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3EXfWN8P5VuDS2tBKaeYIlzaBwuTnbSXHh8enyfbC6U=; b=ba7UF+8JV+FUxeINhwDSQnK1ILQ48DdDGJ5chAH1bbH0a9rSIAGu+dlfF6S3nEONdeOMDM FQFWH8doHp71yQhqmce2cqPN3JBMWdAB0DTw+a5DdLjysOuFskJIfTV22wc124gbZur2d4 rM+ClKUdebYrTTLGCFb7Z1o9P7tB2CWAaG/zY957p3b1fnfIjitn8UsrMllSmeibvNs/bn 3r2z2MFlSWnY7Rbxt8zhghje8vK5U1dHp44F84Ex2hcrrFFEkRul09F6O1OLT80RhP23w8 DC2OFAbhtwcyrSqe1XNEUF0CHlQBBddet1uNmyYYR4KdAJ0AG2L+xJqIZbDYvw== Date: Thu, 4 Apr 2024 15:30:26 +0200 From: Luca Ceresoli To: Arnd Bergmann Cc: Mark Brown , Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: codecs: rk3308: fix building without CONFIG_OF Message-ID: <20240404153026.2aaa3797@booty> In-Reply-To: <20240404095755.650364-1-arnd@kernel.org> References: <20240404095755.650364-1-arnd@kernel.org> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit X-GND-Sasl: luca.ceresoli@bootlin.com Hello Arnd, On Thu, 4 Apr 2024 11:57:34 +0200 Arnd Bergmann wrote: > From: Arnd Bergmann > > The newly added codec has an extraneous of_match_ptr() annotation for > the ID table: > > sound/soc/codecs/rk3308_codec.c:956:34: error: 'rk3308_codec_of_match' defined but not used [-Werror=unused-const-variable=] > 956 | static const struct of_device_id rk3308_codec_of_match[] = { > > Remove it to avoid introducing a warning when -Wunused-const-variable > gets enabled by default: > > Fixes: 4ed0915f5bc4 ("ASoC: codecs: Add RK3308 internal audio codec driver") > Signed-off-by: Arnd Bergmann > --- > sound/soc/codecs/rk3308_codec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c > index 9d3e4691a7b5..6b1cb92997b4 100644 > --- a/sound/soc/codecs/rk3308_codec.c > +++ b/sound/soc/codecs/rk3308_codec.c > @@ -962,7 +962,7 @@ MODULE_DEVICE_TABLE(of, rk3308_codec_of_match); > static struct platform_driver rk3308_codec_driver = { > .driver = { > .name = "rk3308-acodec", > - .of_match_table = of_match_ptr(rk3308_codec_of_match), > + .of_match_table = rk3308_codec_of_match, Thanks for your report! The warning has already been reported by the kernel test robot and I have sent a patch to fix it: https://lore.kernel.org/linux-sound/20240403-rk3308-audio-codec-fix-warning-v2-1-816bae4c1dc5@bootlin.com/ The approach I took is different though: I have added __maybe_unused instead, which has the advantage of not adding a struct of_device_id array to kernel built without CONFIG_OF. My patch has already been taken by Mark. I hope this is fine as well for you. Best regards, Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com