Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9133464pxu; Mon, 28 Dec 2020 07:27:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAF/ZfAKFxpA1n24+UYnAapgbmezQobcfxKbhUc36db5CyxrWi7CUVBgsSxexdL+oOIPZq X-Received: by 2002:a17:906:31cb:: with SMTP id f11mr2839030ejf.468.1609169230126; Mon, 28 Dec 2020 07:27:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609169230; cv=none; d=google.com; s=arc-20160816; b=s2pizC6GUre3ZHptZ6sTbaB6YM8cua3MWa4QTZ40bgKDBXQWxGrFi3Rxpm+blUCg8C IZ5SNUuppYYXLE15MuiHQyPVzwusmOZu/mM5BVsd9OmvAaPqLjKcTU12WlgErHrwz0Fh YY/JevIKHdgT29Q+PhbPycoqI7yqEIFI1dJdlcvOVkcJ5ccofRokrGYqaDQSNmAW4bPz xrO5VXlgQ8XMTkpz5F0MFbRHO57xiOfiso13cSCtaEZbqR5r6Ck9jwC4IAwSZ5jo1Iwz z8Ay7t1jzERm0s03mfVCwwD8u3yMy1lWWML1fSI2/w7jNJ7yrB6e2JqY1XrNKxfmXPq5 DWBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D3mZQk1TOAcL7Yh5LoFwcEABECkdGWu0jWObEtL3Bs4=; b=IJadq1wZwKObRK+19P8LLXAr99SgrlEX5EfsLoPJ6Daa3hNruwFW6REjBuH3JAlc8g UcVGyvlnisJj0t/l4SUv0JeMJqgeOc0cL7XHi8E4xNXoNwIeE8w+/b50DDbG0tEgWjHL U8Y5LYOOFi9ma/Pe7beMx/6WCHr++8o9dKhTeQY+PNJZnYJ3vDwLInvLwHZt1bVwU5kB KxHChz/qTgd5PWRr5WGzOY0RW1l8Vw1AfhUd9MkPNaZue19LS62u0vR6vfFWFJY6DbZv jB7H6grkBOnrPTF4BsaLSPR13DHsxHz2jhOQdGc5yQ6xjcKgX9RUF5yXZCZouLFpdroj 8hzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jIwLzJdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si20667048edq.506.2020.12.28.07.26.44; Mon, 28 Dec 2020 07:27:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jIwLzJdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408123AbgL1PYM (ORCPT + 99 others); Mon, 28 Dec 2020 10:24:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:32768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436506AbgL1N7d (ORCPT ); Mon, 28 Dec 2020 08:59:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6E262205CB; Mon, 28 Dec 2020 13:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163958; bh=KYnaW5VT+LD4I7nr33q2mCTt112/n4SdXczon4C11ik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIwLzJdb8QrFK0RdztBwSMmw0BjxM0uMPwoawX5kSGrPr/6ZIfLGqkwZ2O1dYzwX0 OThgYanqno5Za08+hPMNAgmNgR19GuLxGmtpqdxqV+F1CCSrvZVW6HLMwiCoZqmYDs sAzTaPIQKLM4181AFc3TDBeu42nmLTvJsCTL4R3I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Alexandru Ardelean , Alexandre Belloni , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.10 003/717] iio: adc: at91_adc: add Kconfig dep on the OF symbol and remove of_match_ptr() Date: Mon, 28 Dec 2020 13:40:01 +0100 Message-Id: <20201228125021.150202290@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Ardelean [ Upstream commit f091d7c5fe6cc39e916b50f90e3cac67a032d0be ] This tries to solve a warning reported by the lkp bot: >> drivers/iio/adc/at91_adc.c:1439:34: warning: unused variable >> 'at91_adc_dt_ids' [-Wunused-const-variable] static const struct of_device_id at91_adc_dt_ids[] = { ^ 1 warning generated. This warning has appeared after the AT91_ADC driver compilation has been enabled via the COMPILE_TEST symbol dependency. The warning is caused by the 'of_match_ptr()' helper which returns NULL if OF is undefined. This driver should build only for device-tree context, so a dependency on the OF Kconfig symbol has been added. Also, the usage of of_match_ptr() helper has been removed since it shouldn't ever return NULL (because the driver should not be built for the non-OF context). Fixes: 4027860dcc4c ("iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver") Reported-by: kernel test robot Signed-off-by: Alexandru Ardelean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930135048.11530-4-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/adc/Kconfig | 2 +- drivers/iio/adc/at91_adc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 91ae90514aff4..17e9ceb9c6c48 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -295,7 +295,7 @@ config ASPEED_ADC config AT91_ADC tristate "Atmel AT91 ADC" depends on ARCH_AT91 || COMPILE_TEST - depends on INPUT && SYSFS + depends on INPUT && SYSFS && OF select IIO_BUFFER select IIO_TRIGGERED_BUFFER help diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 9b2c548fae957..0a793e7cd53ee 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -1469,7 +1469,7 @@ static struct platform_driver at91_adc_driver = { .id_table = at91_adc_ids, .driver = { .name = DRIVER_NAME, - .of_match_table = of_match_ptr(at91_adc_dt_ids), + .of_match_table = at91_adc_dt_ids, .pm = &at91_adc_pm_ops, }, }; -- 2.27.0