From patchwork Wed Jul 5 05:22:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9825845 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 BCDE7602F0 for ; Wed, 5 Jul 2017 05:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B29A426BE9 for ; Wed, 5 Jul 2017 05:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6F1B26E3A; Wed, 5 Jul 2017 05:22:32 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 56D7326BE9 for ; Wed, 5 Jul 2017 05:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbdGEFWb (ORCPT ); Wed, 5 Jul 2017 01:22:31 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36017 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069AbdGEFWb (ORCPT ); Wed, 5 Jul 2017 01:22:31 -0400 Received: by mail-pg0-f67.google.com with SMTP id u36so29879527pgn.3; Tue, 04 Jul 2017 22:22:30 -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=wRrdMS4TGvQUBaDNtvI+Na/C7IHsIgoida8wjXCvo7w=; b=Z6zLW+vXPadsjA/zaI3t0s4niu48nJx1EfYWSPMHAJ315gNIwQdrM7PdCxXOMnSVEa ul19YqbF9i9kf8fb1okRv8GHr3881bC33iwHSpW195pX3VK2fjVFKlV50Ew7iDiJiZIU tA+CkwfiNYnbPVV2eTLJNypdyL7wNZfp6HpPVWypsN7FLLGaLOWGqwu91hRUDrDRgcON ytoP62ljAcmRRvY0BaRvZhBYJG7eataVhvsiT8at3Xiay11YxvXvpEIYVyAEzZcOzwLp yZ/P4L1VcnITKRHAOX+vvuK6oubuFUUBF0hoyS2HYKnhgbfgUU/sHHrmV8bQcpYySae0 CJCQ== 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=wRrdMS4TGvQUBaDNtvI+Na/C7IHsIgoida8wjXCvo7w=; b=E1jlJG18DuIDFoZNvfWQVj3M62R3p3Xhv4sECVBYGdau+uRybbh/HGd0Bx611ARsqk /lfrzYomvGEfTEOTCBtQ7iOEgMwsbt8oUJpRKleYbInGSLxI6u/TBPmYf5+hJXl5LEh1 3i3c9dLoxSavEyoVEmmcx+VynceppO1bRJsBm2iFmsRic6KWzRK6WQMZvGDSmsdQ3cWF lTfyIHEQxL9aBzkxoMLdKVXjp5C4TxSpL88nH75FWPlw6ZhmYWB5G+0Gj6N1VY00EaRM jzLLpjR28DGefU870X8rRYpXeCwfoHN73zGMUAYEQLAk+1I7mVlkmKQV4TRp/YaC+lIJ YWGQ== X-Gm-Message-State: AIVw113+Q7ZvmiZvTb8gDBQEC/4nv/Hp50JIDaBNZEPKg6DXw/IbbgzO Wz2mOcVs238qcw== X-Received: by 10.99.153.26 with SMTP id d26mr19369314pge.241.1499232150484; Tue, 04 Jul 2017 22:22:30 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id d70sm9396221pfg.132.2017.07.04.22.22.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jul 2017 22:22:29 -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: adc128d818: constify attribute_group structures. Date: Wed, 5 Jul 2017 10:52:13 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 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 attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 2304 2936 0 5240 1478 drivers/hwmon/adc128d818.o File size After adding 'const': text data bss dec hex filename 2344 2872 0 5216 1460 drivers/hwmon/adc128d818.o Signed-off-by: Arvind Yadav --- drivers/hwmon/adc128d818.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adc128d818.c b/drivers/hwmon/adc128d818.c index a557b46..bd2ca31 100644 --- a/drivers/hwmon/adc128d818.c +++ b/drivers/hwmon/adc128d818.c @@ -384,7 +384,7 @@ static SENSOR_DEVICE_ATTR(temp1_max_hyst, S_IWUSR | S_IRUGO, NULL }; -static struct attribute_group adc128_group = { +static const struct attribute_group adc128_group = { .attrs = adc128_attrs, .is_visible = adc128_is_visible, };