From patchwork Mon Jul 17 09:16:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9844321 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 3A1296037F for ; Mon, 17 Jul 2017 09:18:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CCAA28338 for ; Mon, 17 Jul 2017 09:18:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21BB628408; Mon, 17 Jul 2017 09:18:38 +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 CDF4C28338 for ; Mon, 17 Jul 2017 09:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751280AbdGQJRU (ORCPT ); Mon, 17 Jul 2017 05:17:20 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33409 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbdGQJRR (ORCPT ); Mon, 17 Jul 2017 05:17:17 -0400 Received: by mail-pf0-f196.google.com with SMTP id e199so18969495pfh.0; Mon, 17 Jul 2017 02:17:17 -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=chDCMmVWXRsIqRujgqeBap4+EcUHlamCiXWFJCYnpKU=; b=r+74LK4ksNcVTCOyICNQS8cX2OAdTXJwnm7MK7GBRIHuEjFku/ITQ3plEyZc9duwx5 ucpedV73qC2RdwcOkZeJy6v5eH5vfcowpLKERa+biMFCEhyJAvc76QNU8lROASr+n9hz +dxth4rt4pZD0MhXPHWoDdbKAZpJR0QBRU2mN2tARg+18e+fWYFOkc/yF6tMZZtq55Un xsU5IBNupXloSr5wrd3NaPbQpOkqg52AO7CBBdvGgsSTUBXcl4UuM1iZ/nAlL0BbHzhw 3wh21jz4uiLPQ/ryezruZ53jk/OmuXCLKpBwgGfRX/cOdbloORROfEcX9/oKH4u5jNh1 vjBQ== 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=chDCMmVWXRsIqRujgqeBap4+EcUHlamCiXWFJCYnpKU=; b=V7x4WQizYsnPU6HMF24KLYLjkSRsInoHQg+5V0IOeMJSNAGYxN4b9L2AGbvkX3HM1C JvwQ76bSUVyCUeAZly0lrs/MoBYdx1gvl1a3rMS/uOsxhdIBQ6zmoWnzowad4Pl0cDL1 xE/9LJDP1zcINTuhvMPZQ51gqe24eJmNttmFjznF6HntaI5wg+bPcw5vT+T0/8vfUtfS SFKdu52ihyBrROB57/LqEqQirn55+5+y4FbGVT92Qkih0cWqlKJUo92cTcLTdHPob8nw vFjAfdVdRU4LbUXKMe+9OMbZKzahMcTqsWxbckYbK6NyzIvAcwdIypyBoV4GCcim9/bC K0Cw== X-Gm-Message-State: AIVw112y+J5IFzSrVbbVEc19LIKbSkqIyzyownBjqMFsS84QuUdZDDa4 ugqCeFKp4m5YDv1RQR8= X-Received: by 10.84.176.131 with SMTP id v3mr30147653plb.142.1500283036938; Mon, 17 Jul 2017 02:17:16 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id y5sm14977246pge.38.2017.07.17.02.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 02:17:16 -0700 (PDT) From: Arvind Yadav To: dvhart@infradead.org, andy@infradead.org, jwoithe@just42.net, cezary.jackiewicz@gmail.com, corentin.chary@gmail.com, laforge@gnumonks.org, coproscefalo@gmail.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] staging: lustre: obdclass: linux: constify attribute_group structures. Date: Mon, 17 Jul 2017 14:46:30 +0530 Message-Id: <1500282990-23929-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500282990-23929-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500282990-23929-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@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. Signed-off-by: Arvind Yadav --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 9f5e829..eb88bd9 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -405,7 +405,7 @@ static int obd_device_list_open(struct inode *inode, struct file *file) struct kobject *lustre_kobj; EXPORT_SYMBOL_GPL(lustre_kobj); -static struct attribute_group lustre_attr_group = { +static const struct attribute_group lustre_attr_group = { .attrs = lustre_attrs, }; diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index e6c785a..814334b 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -151,7 +151,7 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr, NULL, }; -static struct attribute_group lustre_attr_group = { +static const struct attribute_group lustre_attr_group = { .attrs = lustre_attrs, };