From patchwork Wed Aug 2 15:27:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9876931 X-Patchwork-Delegate: bhelgaas@google.com 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 0FEC7602BC for ; Wed, 2 Aug 2017 15:27:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 039A5287E8 for ; Wed, 2 Aug 2017 15:27:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC7F8287EB; Wed, 2 Aug 2017 15:27: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=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 8F9ED287E8 for ; Wed, 2 Aug 2017 15:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbdHBP1h (ORCPT ); Wed, 2 Aug 2017 11:27:37 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36955 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbdHBP1g (ORCPT ); Wed, 2 Aug 2017 11:27:36 -0400 Received: by mail-pg0-f65.google.com with SMTP id 83so6792416pgb.4; Wed, 02 Aug 2017 08:27:36 -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=AUUnX0/mBbYRZqTN+2fbuhW0vQ2btsDPmw4JrOQU094=; b=faNCn+6+YkHFCnmpxfMBIhWKm9s2GreZVSKjO5oUJi5d3W0DLIwx8Rd9np5Enk4AK0 CwwFjxLyDLtSPOKV52Ki4ywETG9ifSYvogg/ztleVJEUkcc4OknZxbB7XOykJbKkzEeI CeJXmGFGTD+lB7ca1zrhdFC8C2l1H7jChmDJN9l8OGHrgJ8mPH43pn8SDWbhVgCBQWmF yAef8+tIkZXPxXDWjUSq+qZ8yAgaAgDtqyEyg5xdg5dwjatMK1sBoi2ehRgu8IT5rBK6 c9i7lR02C/yXy2XD58ZcJigMvMgQ/GjeyOy3sDDrGRWjh/4PHHgYIpBeuCgl6QSWZJlA Ny1g== 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=AUUnX0/mBbYRZqTN+2fbuhW0vQ2btsDPmw4JrOQU094=; b=It/CcVZxSgsMV5G5WE6grS7OOjtlUBP0WqGK0EUgctBodTVz1jXAPWLzS/lHjOFy8T blKfsQE/2Kp3kYgQzUFhcM6+pYd+1wcI2MCQM7wgI5D+ft5o69UU4+UYlo5yF99OTfHk yakT6lGne1LfY5SlU43rUxq8vsol3vGdX3TcOnBvnrEyv8N1vsi4bmw3i+KSANdbE1/q 5URabWEq3T17WlPhLgL+be0N9DeVspAtVnNHrTThGQkZhGki2QGveet63I16iqoufEl6 jZOgBe11C+E3qiYGPB/j7DOrsw3YbMvcWVMu9jsQFdcUV62vZuqX42lzEeeEk6PBIT9z 2fIg== X-Gm-Message-State: AIVw110+txWnxVI3VYmhebd0YqWL2Fl0a0BBbDKYJ4H6fEiWHvI0mnWU cJHlOjnjXspWpA== X-Received: by 10.98.218.84 with SMTP id w20mr22718089pfl.240.1501687656075; Wed, 02 Aug 2017 08:27:36 -0700 (PDT) Received: from gmail.com ([59.94.202.47]) by smtp.gmail.com with ESMTPSA id q76sm11496994pfg.42.2017.08.02.08.27.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 02 Aug 2017 08:27:35 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Wed, 02 Aug 2017 20:57:29 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] PCI: Add const to bin_attribute structures Date: Wed, 2 Aug 2017 20:57:27 +0530 Message-Id: <1501687647-4462-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add const to bin_attribute structures as they are only passed to the functions sysfs_{remove/create}_bin_file. The corresponding arguments are of type const, so declare the structures to be const. Signed-off-by: Bhumika Goyal --- drivers/pci/pci-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 2f3780b..2fc358c 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1431,7 +1431,7 @@ static ssize_t pci_read_rom(struct file *filp, struct kobject *kobj, return count; } -static struct bin_attribute pci_config_attr = { +static const struct bin_attribute pci_config_attr = { .attr = { .name = "config", .mode = S_IRUGO | S_IWUSR, @@ -1441,7 +1441,7 @@ static ssize_t pci_read_rom(struct file *filp, struct kobject *kobj, .write = pci_write_config, }; -static struct bin_attribute pcie_config_attr = { +static const struct bin_attribute pcie_config_attr = { .attr = { .name = "config", .mode = S_IRUGO | S_IWUSR,