From patchwork Fri Jul 14 08:23:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9840151 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 128F760381 for ; Fri, 14 Jul 2017 08:25:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 022F027FB6 for ; Fri, 14 Jul 2017 08:25:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB0822874F; Fri, 14 Jul 2017 08:25:14 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable 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 B2B4E27FB6 for ; Fri, 14 Jul 2017 08:25:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbdGNIY4 (ORCPT ); Fri, 14 Jul 2017 04:24:56 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35796 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753382AbdGNIYU (ORCPT ); Fri, 14 Jul 2017 04:24:20 -0400 Received: by mail-pg0-f66.google.com with SMTP id d193so9858381pgc.2; Fri, 14 Jul 2017 01:24:20 -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:in-reply-to:references; bh=3a3HAo1yE0Y0oiEo3kZMSvMeaRevev9AyeNAdxorwOQ=; b=nk80MevNtNvNlomJrwgpioswMOmiCLJ8Vzq0OMmsw1EprdVJc/vaKay1hKYz1jMuet 6Yzs/UG6WZ3mH6ZtN86iXXKi6Pn9OaSnuS781ZKTDs9UswP08M/XMAE99RLX3QeXyZYL 8RtxuAJJLTLlK0WLv+6YC95KUVfrXl3BHBxBbpdcWLlS88sJ2G+hqlCo7/vE6Hp95bPL oO6ciVygOQUKFeYrPM4ICEL1bs5/Cj/L6I2SJra2Yl5ruA6VLela/D62pg6ihxrKIyqM MBnXXkpg7c6kLmwwdUM0lQe9j39h2j2tsbrnttiQNsi2mDXwkSGT0gFEgVjGz4EuGMlS 5YUA== 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:in-reply-to :references; bh=3a3HAo1yE0Y0oiEo3kZMSvMeaRevev9AyeNAdxorwOQ=; b=GpeMR9yv+qfYtFvGl5hu5N/dbcC8WDVTYEYrwaRKxpggEBrTO8Y5Mii6nBFdEJ+ijh 2Y5+ApsVGogcjbKkMrkT/1foCozlgEIzmFYHE2E1uO1ppa5TFe1b9Kg0ZrOnKyOq7xl7 aRrFw/ifop0WkKoWSbbBeaTTHzqcfK7w5TakmhozpfvJti8Lgzd39jPfCaKkP+P+RdCx 0In1xT0lnPm1kPcOrRflEt9AFfPV1gXTy26QKMLXw5TMcTD7I0UDfLu51eQ08P0upw5J ft1EFMTWX4BBw5QhxjvtsxZSxoObm14MFtaHkz+YhFLbEobzMCbtl+Al9glGy+u9eG8R qVwg== X-Gm-Message-State: AIVw113F5Lu8wr1bv+zu3mrGsHgwmO3u7HIW3oKa7IUSHxhfHlFWzKp0 Fg8ixl77Li4Fqtff X-Received: by 10.98.91.71 with SMTP id p68mr3858526pfb.209.1500020655138; Fri, 14 Jul 2017 01:24:15 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id d18sm22925586pgn.27.2017.07.14.01.24.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Jul 2017 01:24:14 -0700 (PDT) From: Arvind Yadav To: lduncan@suse.com, cleech@redhat.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] scsi: scsi_transport_fc: constify attribute_group structures. Date: Fri, 14 Jul 2017 13:53:29 +0530 Message-Id: <1500020610-15973-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500020610-15973-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500020610-15973-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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 34122 1932 4 36058 8cda drivers/scsi/scsi_transport_fc.o File size After adding 'const': text data bss dec hex filename 34186 1868 4 36058 8cda drivers/scsi/scsi_transport_fc.o Signed-off-by: Arvind Yadav --- drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 7e24aa3..eda39cc 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -1808,7 +1808,7 @@ static FC_DEVICE_ATTR(host, reset_statistics, S_IWUSR, NULL, NULL }; -static struct attribute_group fc_statistics_group = { +static const struct attribute_group fc_statistics_group = { .name = "statistics", .attrs = fc_statistics_attrs, };