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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC2C1C47420 for ; Wed, 30 Sep 2020 08:47:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E7DD20708 for ; Wed, 30 Sep 2020 08:47:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qV54GwsH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728608AbgI3Ir4 (ORCPT ); Wed, 30 Sep 2020 04:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbgI3Ir4 (ORCPT ); Wed, 30 Sep 2020 04:47:56 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C3CBC061755; Wed, 30 Sep 2020 01:47:56 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id m13so1047727otl.9; Wed, 30 Sep 2020 01:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M6/fD/ws2aB3vrNVkLIayTVczz7s8A639840tTt+7MA=; b=qV54GwsH//FF7a/jDVo4dW5AZWss/+1CgW4VHSBtPMXelyll4eAJZK06hmTAg+M02p YdTp28LKyhb8tImkxQzs/8c2rJ4612qG8m/nLqE0He+aMUuvYqsj6YGlCQ9RsRe4i7q8 XpDM6MdGrtkfNtQbJr0dM2npiBVHPYF1cpE9a+pRTWZBfbqyBqFwJERXo2t/v391Eoj6 IKOk1ERYJL054EmPkLFQ4xCRepTbFf+DwKXGDZcGlUBjfTdBvvP7s+3hRFOCtIdwKXKG qj9QHCf4vQz+s5AtJiYajEd1p/ezRteEORFk1KKVgtR5lrwn5cc03WlQNwhzc0U5+Nuh +Ezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M6/fD/ws2aB3vrNVkLIayTVczz7s8A639840tTt+7MA=; b=cFIyw/XLFexWkv9QH7OwuZqp3NysmxHLSsEH/FuvWszyhgkw3jQPcVy7US+IHn7Gqd PLc1uUvby4mq0FOpXhXewwclxOlECZz2zqCN5eVNWCQ71S6ZhaBQa8qI8S316ftTADYo AskOV+lfRp45bgoMSNAxG5lbf0Jqu9KYX2XIn2WcpTLddboVQSZL2lr2vxBFypYo13Ok /oIt/DmesuuxHNTop+oYU86Ybk1IGdRnBpoQfkLKkVP5Fe/LNNj7XSzJ7XHh/DEafGfA JiHIq0W3305YV40nUmvb3seh9TZAReJffCwQ8o/gNVb7T1667zjDaLrlv9xi1lTsgSDx 98bQ== X-Gm-Message-State: AOAM53210A4tcWlg1nRNGczQQmcxaKakSx1NEm1qGhkZ4xVJpQc+IVhR U7J9cGgLs0aBPHd8/MQfXBoMdDqPcJ3zgcIiRn4FYU/0pBZHGw== X-Google-Smtp-Source: ABdhPJykpfyzYCxYNo9YM8F32H2Kq2PtOnT6utFOoLcrBo6wkRHkIp+Gq90hRG+NUNj9pThL5IZJ9Qi9Z7ZsLAivASA= X-Received: by 2002:a9d:4d0:: with SMTP id 74mr910764otm.119.1601455675619; Wed, 30 Sep 2020 01:47:55 -0700 (PDT) MIME-Version: 1.0 References: <20200930060008.42134-1-alexandru.ardelean@analog.com> <20200930060008.42134-4-alexandru.ardelean@analog.com> <20200930073727.GC2804081@piout.net> In-Reply-To: <20200930073727.GC2804081@piout.net> From: Alexandru Ardelean Date: Wed, 30 Sep 2020 11:47:44 +0300 Message-ID: Subject: Re: [PATCH v2 3/4] iio: adc: at91_adc: add Kconfig dependency on the OF symbol To: Alexandre Belloni Cc: Alexandru Ardelean , linux-iio , linux-arm-kernel@lists.infradead.org, LKML , Jonathan Cameron , Nicolas Ferre , Ludovic Desroches Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 10:39 AM Alexandre Belloni wrote: > > Hi, > > On 30/09/2020 09:00:07+0300, Alexandru Ardelean wrote: > > 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 shows up with 'compiler: clang version 12.0.0' and W=1 (as the bot > > mentions). > > > > Forward declarations for global variables can be a bit weird; forward > > function declarations are more common. > > > > Maybe another fix for this would have been to prefix with 'extern' the > > 'at91_adc_dt_ids' variable, thus making it more friendly as a forward > > declaration. It would look weird, but it would work. > > > > But, we can avoid that forward declaration altogether simply by obtaining > > the private data with of_device_get_match_data(). > > > > This appeared after commit 4027860dcc4c ("iio: Kconfig: at91_adc: add > > COMPILE_TEST dependency to driver"), which put this driver on the lkp's bot > > radar. > > > > Shouldn't all of that be part of the commit message for 1/4? This > doesn't explicitly explain why you add a dependency on OF. Hmm, I think I did this patch before drinking my morning coffee. Looks like it's also a bad commit description. > > > Fixes: 4027860dcc4c ("iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver") > > Reported-by: kernel test robot > > Signed-off-by: Alexandru Ardelean > > --- > > drivers/iio/adc/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig > > index 91ae90514aff..17e9ceb9c6c4 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 > > -- > > 2.17.1 > > > > -- > Alexandre Belloni, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com 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 X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C3FBC4727F for ; Wed, 30 Sep 2020 08:49:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFA0720708 for ; Wed, 30 Sep 2020 08:49:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HaKseb5m"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qV54GwsH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFA0720708 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zvbHuBu/37O6Ku+3W+96QJ+8v7YK5jmk0RIN9ARmRn8=; b=HaKseb5mX5dY7I3yyaAmxjl0T LwU/R7aEXuao3FOvH37Iyf+h3lzOjSOZ0i8IKQOl1cmK9JlMzDRvZ23Ww6aY66RtpqH0jHzP4urPK OernpJyp6/WYwXTVrXIHNgn6glcRPin5dG1kENV3sH0OB/jXkUReTUgtyNiTYAeENmoBGbYXdcFHY Y6OT3B/WxHxqxKMZCygpzlWBIKdNCyHv4mDhx8lXWExPJtFL3XYFKsLmCOUA8HP+0HqsBDAmrpR0d texTqf9jaQ9YZ1FEzzp6tpZxxcYaQyRd7BVpYpelCis3soK9DXv2+cHdSzBPrO0MYFm9tH/hSACWL Q6vcF7KPA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNXmU-0008TK-8X; Wed, 30 Sep 2020 08:48:10 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNXmH-0008N9-Qk for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 08:47:58 +0000 Received: by mail-ot1-x344.google.com with SMTP id c2so1052232otp.7 for ; Wed, 30 Sep 2020 01:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M6/fD/ws2aB3vrNVkLIayTVczz7s8A639840tTt+7MA=; b=qV54GwsH//FF7a/jDVo4dW5AZWss/+1CgW4VHSBtPMXelyll4eAJZK06hmTAg+M02p YdTp28LKyhb8tImkxQzs/8c2rJ4612qG8m/nLqE0He+aMUuvYqsj6YGlCQ9RsRe4i7q8 XpDM6MdGrtkfNtQbJr0dM2npiBVHPYF1cpE9a+pRTWZBfbqyBqFwJERXo2t/v391Eoj6 IKOk1ERYJL054EmPkLFQ4xCRepTbFf+DwKXGDZcGlUBjfTdBvvP7s+3hRFOCtIdwKXKG qj9QHCf4vQz+s5AtJiYajEd1p/ezRteEORFk1KKVgtR5lrwn5cc03WlQNwhzc0U5+Nuh +Ezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M6/fD/ws2aB3vrNVkLIayTVczz7s8A639840tTt+7MA=; b=mFbx3maJoVx2W/y4u7IJd4d3FVOBz2DfR+AGBrn8qCdArDo3WQTwj8/BUW/VFZt8aI VJ51m+xRAjNwf3qtZGp4BnClrUWU8QYtxIKoSKr4AjMwSbNqEypo0C8pbxt3DeZNR7lT qAYX73BxsAqb0IOAxCpr1fMKk8ELW/jJynJLzQZc8widVLEi0rFXQH1ng+GQsGyT+FU5 4EQ6Lc3wdnrr1M4UO2eklXEy6xnvm1QG2ESEGyovM2FF/CAUmQQNLIH8apc/+czMVfiK P5tlnO/y9Gb7o5fHQhdwDNnYw9TZ9rPGYJggXkh2fKT0DsnfOW7GQPulPc1Oz3g2gf6M anOA== X-Gm-Message-State: AOAM532Ed2TXXoTcyedy1q2ppponFkqUKPczlx2zHxMbfCg+nfNBfuZM 56gP63uQRrpitYrYZoCtUCIwt+X19IlbextWnNI= X-Google-Smtp-Source: ABdhPJykpfyzYCxYNo9YM8F32H2Kq2PtOnT6utFOoLcrBo6wkRHkIp+Gq90hRG+NUNj9pThL5IZJ9Qi9Z7ZsLAivASA= X-Received: by 2002:a9d:4d0:: with SMTP id 74mr910764otm.119.1601455675619; Wed, 30 Sep 2020 01:47:55 -0700 (PDT) MIME-Version: 1.0 References: <20200930060008.42134-1-alexandru.ardelean@analog.com> <20200930060008.42134-4-alexandru.ardelean@analog.com> <20200930073727.GC2804081@piout.net> In-Reply-To: <20200930073727.GC2804081@piout.net> From: Alexandru Ardelean Date: Wed, 30 Sep 2020 11:47:44 +0300 Message-ID: Subject: Re: [PATCH v2 3/4] iio: adc: at91_adc: add Kconfig dependency on the OF symbol To: Alexandre Belloni X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_044757_910971_92E884C5 X-CRM114-Status: GOOD ( 27.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-iio , LKML , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, Alexandru Ardelean , Jonathan Cameron 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, Sep 30, 2020 at 10:39 AM Alexandre Belloni wrote: > > Hi, > > On 30/09/2020 09:00:07+0300, Alexandru Ardelean wrote: > > 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 shows up with 'compiler: clang version 12.0.0' and W=1 (as the bot > > mentions). > > > > Forward declarations for global variables can be a bit weird; forward > > function declarations are more common. > > > > Maybe another fix for this would have been to prefix with 'extern' the > > 'at91_adc_dt_ids' variable, thus making it more friendly as a forward > > declaration. It would look weird, but it would work. > > > > But, we can avoid that forward declaration altogether simply by obtaining > > the private data with of_device_get_match_data(). > > > > This appeared after commit 4027860dcc4c ("iio: Kconfig: at91_adc: add > > COMPILE_TEST dependency to driver"), which put this driver on the lkp's bot > > radar. > > > > Shouldn't all of that be part of the commit message for 1/4? This > doesn't explicitly explain why you add a dependency on OF. Hmm, I think I did this patch before drinking my morning coffee. Looks like it's also a bad commit description. > > > Fixes: 4027860dcc4c ("iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver") > > Reported-by: kernel test robot > > Signed-off-by: Alexandru Ardelean > > --- > > drivers/iio/adc/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig > > index 91ae90514aff..17e9ceb9c6c4 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 > > -- > > 2.17.1 > > > > -- > Alexandre Belloni, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel