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=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 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 88580C433B4 for ; Sat, 8 May 2021 15:41:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64B1861261 for ; Sat, 8 May 2021 15:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229640AbhEHPmR (ORCPT ); Sat, 8 May 2021 11:42:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:33244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhEHPmN (ORCPT ); Sat, 8 May 2021 11:42:13 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3177B61261; Sat, 8 May 2021 15:41:10 +0000 (UTC) Date: Sat, 8 May 2021 16:42:08 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Guenter Roeck , linux-iio , Linux Kernel Mailing List , kernel test robot , Hans de Goede Subject: Re: [PATCH] iio:accel:stk8312: Remove ACPI support Message-ID: <20210508164208.7481e013@jic23-huawei> In-Reply-To: References: <20210506035659.765109-1-linux@roeck-us.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 May 2021 12:29:44 +0300 Andy Shevchenko wrote: > On Thu, May 6, 2021 at 6:57 AM Guenter Roeck wrote: > > > > With CONFIG_ACPI=n, W=1 and -Werror, 0-day reports: > > > > drivers/iio/accel/stk8312.c:644:36: error: > > 'stk8312_acpi_id' defined but not used > > > > Apparently STK8312 is not a valid ACPI ID. Remove it and with it > > ACPI support from the stk8312 driver. > > Reviewed-by: Andy Shevchenko > > For the record, point finger on me in case somebody complains about > any of such patches. > > > Reported-by: kernel test robot > > Cc: Andy Shevchenko > > Cc: Hans de Goede > > Signed-off-by: Guenter Roeck > > --- > > There is another patch pending which makes whitespace changes in struct > > acpi_device_id stk8312_acpi_id. This will result in a conflict if this > > patch is applied. In that patch, it is claimed that the driver would > > possibly only be used based on its ACPI ID (even though that ACPI device > > ID is not official). > > Link: https://patchwork.kernel.org/project/linux-iio/patch/20210401144226.225928-1-jic23@kernel.org/ > > I can not determine if that claim has any truth in it. Still, it appears > > that the device ID is not an official device ID. So this is a fun corner case and I suspect reflects most that the device isn't in common use with mainline Linux outside of the hobbyist community. The other type of ID in the driver was in capitals whereas those IDs are always lowercase. That rather implied that it had been copied over from the ACPI binding. Anyhow, I've applied this with the commit message adjusted to suggest that if anyone does want ACPI binding support for this and doesn't have control of a vendor ID then they should add the of_match_table and use PRP0001. Jonathan > > > > drivers/iio/accel/stk8312.c | 9 --------- > > 1 file changed, 9 deletions(-) > > > > diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c > > index 157d8faefb9e..2fc30cfe1457 100644 > > --- a/drivers/iio/accel/stk8312.c > > +++ b/drivers/iio/accel/stk8312.c > > @@ -7,7 +7,6 @@ > > * IIO driver for STK8312; 7-bit I2C address: 0x3D. > > */ > > > > -#include > > #include > > #include > > #include > > @@ -640,18 +639,10 @@ static const struct i2c_device_id stk8312_i2c_id[] = { > > }; > > MODULE_DEVICE_TABLE(i2c, stk8312_i2c_id); > > > > -static const struct acpi_device_id stk8312_acpi_id[] = { > > - {"STK8312", 0}, > > - {} > > -}; > > - > > -MODULE_DEVICE_TABLE(acpi, stk8312_acpi_id); > > - > > static struct i2c_driver stk8312_driver = { > > .driver = { > > .name = STK8312_DRIVER_NAME, > > .pm = STK8312_PM_OPS, > > - .acpi_match_table = ACPI_PTR(stk8312_acpi_id), > > }, > > .probe = stk8312_probe, > > .remove = stk8312_remove, > > -- > > 2.25.1 > > > >