From patchwork Mon Jul 17 16:25:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9845703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A826460392 for ; Mon, 17 Jul 2017 16:25:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B57A284E3 for ; Mon, 17 Jul 2017 16:25:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90075284FF; Mon, 17 Jul 2017 16:25:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A10E284E3 for ; Mon, 17 Jul 2017 16:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751374AbdGQQZY (ORCPT ); Mon, 17 Jul 2017 12:25:24 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36767 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbdGQQZX (ORCPT ); Mon, 17 Jul 2017 12:25:23 -0400 Received: by mail-pf0-f196.google.com with SMTP id a11so3816899pfj.3; Mon, 17 Jul 2017 09:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MY4rfM8bXblG+yubyyT0h89NTIfJ2aSH64KeFQIqcTI=; b=bdCKBgyfnrqrx97jnR3SFgQQdKxS1dBCW4sgrotuFyHf1Sz5xL4PE86oPdpC8XX/dU CRWdcUwMYeRhRtN5eu2pabt5CVtw1noiQ6SkFil4qJ9ivGCZvOkP0WdrilfqcH2l++9z n+zqgdg32QPdCkMe5JHsWhiefvENOPwl1vDicMO1f2Rcnis0r2o6PG5C2AhVEbL8PDcg h3Kpy9k+U4uaYz2/c43BduEgpmYux3wylhf4ay82ADGd6/RTjXP7fqRRboIQmCoAqEBx RjfDRGDlsVCg8EuTfLir5wOde6VxepE5LX8bXymSlVjITLIqXYtxiezn/0EqqC+SfHa5 7UTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MY4rfM8bXblG+yubyyT0h89NTIfJ2aSH64KeFQIqcTI=; b=kI2/d+28wsLlqKeso4s8UkJElCUuyXppNRSTGdIMcZx5UcrVpU2HbHp2lzq6ZqNFjT sTa6CTBT0ac01m+QuYNLZklj/ytOYBQvYmTLcZ7j7p3cmLErGSY+8KC3FLoX1JfMtSDz bqUyyLYgeyLWOpG449s5Si2vNa6e9bd70saZ9BsPqSIfVfWJ/+Fs/0lnwRL1AlfPmovS tbwUVmTHCgyCjOrvTpG/Ke+QLMuY4cH6nxBsyDDx0MlSYYDuUmq4wiaCV2FpztOzELkC IvGo6BdWigxrP3Yvo77McGQ1CMSddrP6967J3P87PLLJAOH0yS6uQ+hWKfnV39R69yKx o9yg== X-Gm-Message-State: AIVw1127ZBOXcKAJ0dvXlKoHMn6A+ZZjbKJsgXJ9X2STMN6kP6ocT4tD 2SlDfMQnuiYsFw== X-Received: by 10.84.228.200 with SMTP id y8mr6989202pli.102.1500308722692; Mon, 17 Jul 2017 09:25:22 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.163]) by smtp.gmail.com with ESMTPSA id v70sm37028161pfi.110.2017.07.17.09.25.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 09:25:22 -0700 (PDT) From: Arvind Yadav To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: i5k_amb: constify pci_device_id. Date: Mon, 17 Jul 2017 21:55:10 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 3562 320 8 3890 f32 drivers/hwmon/i5k_amb.o File size After adding 'const': text data bss dec hex filename 3658 224 8 3890 f32 drivers/hwmon/i5k_amb.o Signed-off-by: Arvind Yadav --- drivers/hwmon/i5k_amb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index a5a9f45..9397d2f 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c @@ -495,7 +495,7 @@ static struct { }; #ifdef MODULE -static struct pci_device_id i5k_amb_ids[] = { +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, }