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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFA35C43334 for ; Sat, 18 Jun 2022 15:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232320AbiFRPYt (ORCPT ); Sat, 18 Jun 2022 11:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbiFRPYs (ORCPT ); Sat, 18 Jun 2022 11:24:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2040860C7; Sat, 18 Jun 2022 08:24:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9BE64B801B8; Sat, 18 Jun 2022 15:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FBC7C3411A; Sat, 18 Jun 2022 15:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655565884; bh=Z+Twh7SwZ6hXrHT+LtD17vA7anfjZRx7HRgnzaj2hcc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=W10YYF/j5Fblb6/DQIT2vu2EzpS+MIBRDckLUPsmILaMIKfjSiqrg6gpAIFYJs+1L 4VDrcKi85+UoNs7tbx3sJYXxxpaaIy+fQlAW3rzwFtMV152PRQrh/YnpJwF/KFJVYA 0yVQDbeWzD3MH/7cN1wsGojhTyJOGW6Slyt0cEnLnRr4fwzhXErdaLq1dX3VgqZmGI DVpw+jY4YKV8kSn7sWGv4hQXqLxyOrTrAMIFHTuo38hOY/xGsaR9OVCSmKvzHzeDAL 3vNxUB1bpJrmi73dLJTkBc9G1HSLDKKrE0A0R1THX3VRGBVIV1TbyQe/Sb4/qEU+Gv EZnCemqWDdJBA== Date: Sat, 18 Jun 2022 16:34:01 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH v1 1/1] iio: accel: mma7660: Drop wrong use of ACPI_PTR() Message-ID: <20220618163401.0c603cc5@jic23-huawei> In-Reply-To: <20220616142451.10322-1-andriy.shevchenko@linux.intel.com> References: <20220616142451.10322-1-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; 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-iio@vger.kernel.org On Thu, 16 Jun 2022 17:24:51 +0300 Andy Shevchenko wrote: > ACPI_PTR() is more harmful than helpful. For example, in this case > if CONFIG_ACPI=n, the ID table left unused which is not what we want. > > Instead of making linker to drop a section, drop ACPI_PTR(). > > As a side effect this makes driver ACPI and OF clean. > > Signed-off-by: Andy Shevchenko Applied. Thanks, Jonathan > --- > drivers/iio/accel/mma7660.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c > index 112a5a33c29f..794f2f383303 100644 > --- a/drivers/iio/accel/mma7660.c > +++ b/drivers/iio/accel/mma7660.c > @@ -7,8 +7,8 @@ > * IIO driver for Freescale MMA7660FC; 7-bit I2C address: 0x4c. > */ > > -#include > #include > +#include > #include > #include > #include > @@ -255,7 +255,7 @@ static const struct of_device_id mma7660_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, mma7660_of_match); > > -static const struct acpi_device_id __maybe_unused mma7660_acpi_id[] = { > +static const struct acpi_device_id mma7660_acpi_id[] = { > {"MMA7660", 0}, > {} > }; > @@ -267,7 +267,7 @@ static struct i2c_driver mma7660_driver = { > .name = "mma7660", > .pm = pm_sleep_ptr(&mma7660_pm_ops), > .of_match_table = mma7660_of_match, > - .acpi_match_table = ACPI_PTR(mma7660_acpi_id), > + .acpi_match_table = mma7660_acpi_id, > }, > .probe = mma7660_probe, > .remove = mma7660_remove,