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,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 66D12C388F7 for ; Thu, 5 Nov 2020 09:13:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC5AB206FB for ; Thu, 5 Nov 2020 09:13:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IttUDjlT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730361AbgKEJNS (ORCPT ); Thu, 5 Nov 2020 04:13:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725320AbgKEJNJ (ORCPT ); Thu, 5 Nov 2020 04:13:09 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F955C0613D2 for ; Thu, 5 Nov 2020 01:13:09 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id d142so802722wmd.4 for ; Thu, 05 Nov 2020 01:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ppYF0PlErbRwfu8mEHF7wqc9jdX4m5kx1kPLbT7peag=; b=IttUDjlTiYiGPb0c5L/usFI9KKlI5FGGTYkpqXQRVcDYOmEHfwHcdcpHZHXlj/CUmd mI1zRNsW15M6Ga+fV2uIBZAabTC4bS8o6ifnFzbK2r2JDvSaBnpFXH8eTgWUkhgeg9yC CUGAiYM+cZUrTy879BMVrpxQMa/sVLAqVLmaKjN9lOnK6v/AuTkDT027AqrfF8otY8y2 1jgLd9zYccP0nT43isgCkcIcVjYrKBgayW+iCMX87a41BtPzuyl+E1VUrWjFFQsW9hs+ k8q6/6lDlD1VSNaHrrcyw/k7zXv4Eusjh4gHumas/7Hcz7zH5sJGIwo8fIWnYlewFlkI pP4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ppYF0PlErbRwfu8mEHF7wqc9jdX4m5kx1kPLbT7peag=; b=EC8/MvZLXx86uisjGuPvtDB+xa2lAgTV4wgz9MVRn0mjP1t/TVJRUkjDIZaLVWS1tU ptzA5MWXmnhthq8ZGnyZ+Zn+uBpuN7mNo9cKKIG3GLse+b3AvgB99ppRvMJGy3WDeepI 9vftad1gvyMPrri4enDCENPUmzuBLMLUutpl3WUqxwT1CVks2x6V8v9o8jEX0k5Z8UDm 1jyO3rXB/5/ha7g0+04BYATAfTi2yrpE1VjTt2s4DRiMfsLT3cdLBDeiEuFF3z603W30 ejecMBJIX1080QHsjpwZ9ikfJyt17FKxpnbdQ4SmxBePC0uPMhp1tlZCqWXzcmcYk2VL NAxQ== X-Gm-Message-State: AOAM533lZZNK849AyF8lhcoKby2uRChWr6g4wkAEn/0aBJi1lznlI3vt nRc0zQVQEhijCFogYMLePToRhjjvIYMFmKFj X-Google-Smtp-Source: ABdhPJzwvxvC55mfhNxs1rZhTHZFiQyUhDp2eRPI3OFsmvNmIkibkr1lXvdEhVgU6KPpcLyTBYaaeA== X-Received: by 2002:a1c:9a0e:: with SMTP id c14mr1603242wme.35.1604567587575; Thu, 05 Nov 2020 01:13:07 -0800 (PST) Received: from dell ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id y10sm1453811wru.94.2020.11.05.01.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 01:13:06 -0800 (PST) Date: Thu, 5 Nov 2020 09:13:05 +0000 From: Lee Jones To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, dusonlin@emc.com.tw, KT Liao , linux-input@vger.kernel.org Subject: Re: [PATCH 06/20] include: input: elan-i2c-ids: Mark 'elan_acpi_id' as __maybe_unused Message-ID: <20201105091305.GH4488@dell> References: <20201104162427.2984742-1-lee.jones@linaro.org> <20201104162427.2984742-7-lee.jones@linaro.org> <20201104225054.GC1003057@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201104225054.GC1003057@dtor-ws> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 04 Nov 2020, Dmitry Torokhov wrote: > Hi Lee, > > On Wed, Nov 04, 2020 at 04:24:13PM +0000, Lee Jones wrote: > > Some drivers which include 'elan-i2c-ids.h' make use of > > 'elan_acpi_id', but not all do. Tell the compiler that this is > > expected behaviour. > > > > Fixes the following W=1 kernel build warning(s): > > > > include/linux/input/elan-i2c-ids.h:26:36: warning: ‘elan_acpi_id’ defined but not used [-Wunused-const-variable=] > > > > Cc: Dmitry Torokhov > > Cc: dusonlin@emc.com.tw > > Cc: KT Liao > > Cc: linux-input@vger.kernel.org > > Signed-off-by: Lee Jones > > --- > > include/linux/input/elan-i2c-ids.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linux/input/elan-i2c-ids.h b/include/linux/input/elan-i2c-ids.h > > index 520858d126808..b6976d99b6b75 100644 > > --- a/include/linux/input/elan-i2c-ids.h > > +++ b/include/linux/input/elan-i2c-ids.h > > @@ -23,7 +23,7 @@ > > > > #include > > > > -static const struct acpi_device_id elan_acpi_id[] = { > > +static const struct acpi_device_id __maybe_unused elan_acpi_id[] = { > > { "ELAN0000", 0 }, > > { "ELAN0100", 0 }, > > { "ELAN0600", 0 }, > > I think I'd prefer something like this instead: > > diff --git a/drivers/input/mouse/elan_i2c_core.c > b/drivers/input/mouse/elan_i2c_core.c > index c599e21a8478..65d21a050cea 100644 > --- a/drivers/input/mouse/elan_i2c_core.c > +++ b/drivers/input/mouse/elan_i2c_core.c > @@ -34,7 +34,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -1413,6 +1412,7 @@ static const struct i2c_device_id elan_id[] = { > MODULE_DEVICE_TABLE(i2c, elan_id); > > #ifdef CONFIG_ACPI > +#include > MODULE_DEVICE_TABLE(acpi, elan_acpi_id); > #endif Moving an #include file to the bottom of a source file, really? I can do as you wish, but it's a pretty 'interesting' solution. :) -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog