Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7462730ybi; Wed, 5 Jun 2019 18:37:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKlPfCZJTGATvZtDMPs260l7Rz7Cfi8KBJCvBNyTV30jQKWkTduCCareqJEQKAQVkZVxEm X-Received: by 2002:a62:5a47:: with SMTP id o68mr49297834pfb.149.1559785025916; Wed, 05 Jun 2019 18:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559785025; cv=none; d=google.com; s=arc-20160816; b=0rmtJd0cEDO2f47Qb1GQUmSyWAEjui7uN4hLLsjA29yrVipf4T+EsftgnQaKCI0Ac+ 1dQy8j+YwmD1xD4+6xH3qjA2Mv/WUkxp8B4Uc5cErlnA0i6Hqsq9MsOUma0BS3bTYSYI Oa29TZybXavzhd9MKWUwhuCo9DELUAsgFlk1MVWQi5L9frym7J6q1xo/dyaKH7nypJZB addLckw6auuw2ip5tGZIFuBskUhcJ5UmimpDCyLZ2QWFJttTcBh82Kv557/k7TqA/f8J x0hMko2HUPze4uez/WdjLre4oeNPKfFPSoOZhOQZCkRH7biTq/M1Kule2yAyNgDJosrr 1wjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/QxdqYoMgOzIx2YVy8fAWt2ho9RD+sHh6bkx2lXobUc=; b=tsase+tMv/cwPfsCAZGiqjALztP9OvynMpxlfvsH7BKL4y+EY4r8fQrw8CYcwLRJXO u2Q29+NmdvzRX+J0RQo+sAbR/4HKciCGB13bYyy3WXFck42FuWx+OHPjhFnBf3gzKa2M eGgQOvfpq8rVjmux2DPCuVBamhOiKq1bYtM/9pNMLwmMZslQCjBdZznje23/iYdcfrM2 aTZ94UJABO86eYgzca9tc6yygk8QnMeLcX/lNpkMv1F4ik7ken7TSS9eLdUzzBSyL79v r0ug7xWucB+8NvhognRCTihb6arkUqQoQV+rucuSp2UF6G3jiybrZN4Y8q9Yb5vi4a1H vifw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=scdo9fwo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci5si207447plb.433.2019.06.05.18.36.50; Wed, 05 Jun 2019 18:37:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=scdo9fwo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbfFFBfc (ORCPT + 99 others); Wed, 5 Jun 2019 21:35:32 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42455 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbfFFBfc (ORCPT ); Wed, 5 Jun 2019 21:35:32 -0400 Received: by mail-pg1-f196.google.com with SMTP id e6so342990pgd.9; Wed, 05 Jun 2019 18:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/QxdqYoMgOzIx2YVy8fAWt2ho9RD+sHh6bkx2lXobUc=; b=scdo9fwoyDWgCiLeWlCocSXX8chUMiPIhNZpPAKowgNRzG1R8Dy3x9SE1CgkbzhNZg fmn2MgtKtuOpBhYiXDg9XQWSwYYUN3IKiZFis/6tPpYO5ZDsQRzwAgZSk5YZEGRgN/Q4 RIFqN8t5eeVdCbwTLNoq+Eo67lyVOaGWdGmjTtSsDNfg0do+c9V2dmJhKLAyj1+e068c joRs4TFnzFp7+xJt8KNcjMKcJNWwonPRqapKoAUDJaxpD96pKaPCnDxhpuuASdDLIPLm mbFyvZ1iABUiT+x15uEyJ8nFulDQwix1CtIo0CtzkHZ03rI7YKG9jQc5sw9WQfsqHmqw NdhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/QxdqYoMgOzIx2YVy8fAWt2ho9RD+sHh6bkx2lXobUc=; b=nGi7gvRP16LUBTrqB2KyAsJlreLHFXBYWdZ5SbUOhCOl/u9xH6zmYrSoa8ocOyPGrC Sy198jvimRgLVpwuhr4loSmuS5E80ga3BmKtYwFQWf+VrmDrz908FuJlf50B/C4CZvqW XWLMb1LppDVJ+56kLu00OAFIijWzkjefZ9SdOQDoeGunCnNul6A/8yrkOzWxNskYUztO i1hBYNByz1O5iQNJqqwUd0bl8hZ3klBIdcHXL9bBMy5lM2kTdVkpV45HFyM21Qm5zNBq peYuVPrcnTC6P4G/6QlUmKY9Hj8B5A+jcybVmtxM9rOk/VX2Ilnw36Cop43XmEcs9MCN OP8A== X-Gm-Message-State: APjAAAVlcZPuD/9/LkxBct7tVnWCv4oGbkVSTtqEPBRyp4jMG5zuIsPZ xBK7Lzjthp/fYbwchMoFqKFrBdjK X-Received: by 2002:a62:3287:: with SMTP id y129mr44663628pfy.101.1559784931144; Wed, 05 Jun 2019 18:35:31 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id a22sm188409pfn.173.2019.06.05.18.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 18:35:29 -0700 (PDT) Subject: Re: [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary #ifdef MODULE To: "Enrico Weigelt, metux IT consult" , "Enrico Weigelt, metux IT consult" Cc: linux-kernel@vger.kernel.org, rjw@rjwysocki.net, viresh.kumar@linaro.org, jdelvare@suse.com, khalid@gonehiking.org, jejb@linux.ibm.com, martin.petersen@oracle.com, aacraid@microsemi.com, linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-scsi@vger.kernel.org References: <1559397700-15585-1-git-send-email-info@metux.net> <1559397700-15585-4-git-send-email-info@metux.net> <20190601224946.GA6483@roeck-us.net> From: Guenter Roeck Message-ID: Date: Wed, 5 Jun 2019 18:35:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/5/19 4:59 PM, Enrico Weigelt, metux IT consult wrote: > On 01.06.19 22:49, Guenter Roeck wrote: >> On Sat, Jun 01, 2019 at 04:01:40PM +0200, Enrico Weigelt, metux IT consult wrote: >>> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined, >>> so the extra check here is not necessary. >>> >>> Signed-off-by: Enrico Weigelt >>> --- >>>   drivers/hwmon/i5k_amb.c | 2 -- >>>   1 file changed, 2 deletions(-) >>> >>> diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c >>> index b09c39a..b674c2f 100644 >>> --- a/drivers/hwmon/i5k_amb.c >>> +++ b/drivers/hwmon/i5k_amb.c >>> @@ -482,14 +482,12 @@ static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id) >>>       { 0, 0 } >>>   }; >>> -#ifdef MODULE >>>   static const struct pci_device_id i5k_amb_ids[] = { >>>       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) }, >>>       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) }, >>>       { 0, } >>>   }; >>>   MODULE_DEVICE_TABLE(pci, i5k_amb_ids); >>> -#endif >> >> I'd rather know what this table is used for in the first place. > > Seems it's really just used for the module loader, while actual probing > is using a different table. IMHO, the worst thing my patch could do is > introducing a warning on unused variable (IMHO shouldn't happen when > it's static const). > You are wrong. You'll need __maybe_unused qualifiers for those variables to avoid the warning. Guenter > I've just rewritten it to move everything into i5k_amb_ids ... just need > to run build tests on it (unfortunately can't run-test, as I don't have > that device). > > > --mtx >