From patchwork Mon Aug 21 11:43:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9912253 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 46412602A0 for ; Mon, 21 Aug 2017 11:45:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D459286E4 for ; Mon, 21 Aug 2017 11:45:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 220CC2875B; Mon, 21 Aug 2017 11:45:28 +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=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 CF163286E4 for ; Mon, 21 Aug 2017 11:45:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753750AbdHULo3 (ORCPT ); Mon, 21 Aug 2017 07:44:29 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33026 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753725AbdHULoZ (ORCPT ); Mon, 21 Aug 2017 07:44:25 -0400 Received: by mail-pg0-f68.google.com with SMTP id n4so8576845pgn.0; Mon, 21 Aug 2017 04:44:25 -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=Y0mqhBoi9IFjqqgYpSnOxEVZdvAHx2DO90ovFITD0W4=; b=KGvsKvxEg1PO/I6AYhtrpz/K5ZIPuOyUZwgL3VrbifhRMkIPceJX9DLjw/M3K9MuRV JKTqYjKSpXg5wFbNQRw++ahdxVY0FTvSXV/i449MRU3/+mlNEzemeW+UQgVOCFAfKUH4 5DuUz3cOrSymAbxXd9e6YTvmFQW1uztMH7dMSA+zWPtz/iFBclBfGqDc02X85lI5JncV p5QvmLAwfs5cOz+vqHc1Mmx1+I2L6UDrpSq8qCrwRi+WOZKwG6fOakhfi0iHkPZjPT+P Vgh5H/09j2oTQ/uiw6B2Dcb7c+yeOmZi4KSB7ieE/WKor6m5FLxPobuI2MXnSJu53tta 604g== 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=Y0mqhBoi9IFjqqgYpSnOxEVZdvAHx2DO90ovFITD0W4=; b=bNShOGd+FDVhB69QzF89XU4ZNTlIAoi/rEmrpgWCH/wFUAgYINSIcVzXWscGcCh/ej NSvNv4eImtPBADJuQEE74RcF+M2My5PObL5+AHQE8YYa6QwpcCMH9FAIPJ/7bBvSQSwG m7JYfIjhSA0deCTwke//AklTPG2L/DnhKN6Vpz2Ndm7WsgRNz3x1vBZ1KP45Ndm5gAWV 2+IAMfGZ+KDQEKconFqqk53Ummriz+Ef1CByF6fnauQHkzfIN8o573kOhGslQU1C6wBt J0RWhrpXWvWMvkoUw8LQKAutysHzLon52/WnW+CIJOQbKUqhdayg2g9tQKmd29OTN3OV ZmNQ== X-Gm-Message-State: AHYfb5jYjx+dzKso3bUay3hx9lY3ro/JEVwNR/47duvHFlH5D0D7Rua3 M6xc9fKIeIgBug== X-Received: by 10.84.128.46 with SMTP id 43mr19285742pla.113.1503315864681; Mon, 21 Aug 2017 04:44:24 -0700 (PDT) Received: from gmail.com ([117.196.124.142]) by smtp.gmail.com with ESMTPSA id e16sm24602030pfb.182.2017.08.21.04.44.15 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 04:44:23 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 21 Aug 2017 17:14:12 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, rjw@rjwysocki.net, lenb@kernel.org, jbacik@fb.com, jikos@kernel.org, benjamin.tissoires@redhat.com, manish.chopra@cavium.com, rahul.verma@cavium.com, Dept-GELinuxNICDev@cavium.com, harish.patil@cavium.com, cascardo@holoscopio.com, don@syst.com.br, dvhart@infradead.org, andy@infradead.org, sre@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, nbd-general@lists.sourceforge.net, linux-input@vger.kernel.org, netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 4/6] qlogic: make device_attribute const Date: Mon, 21 Aug 2017 17:13:10 +0530 Message-Id: <1503315792-14837-5-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> References: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these const as they are only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal --- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index 827de83..f2e8de6 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -2828,7 +2828,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev) return sprintf(buf, "%d\n", bridged_mode); } -static struct device_attribute dev_attr_bridged_mode = { +static const struct device_attribute dev_attr_bridged_mode = { .attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)}, .show = netxen_show_bridged_mode, .store = netxen_store_bridged_mode, @@ -2860,7 +2860,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev) !!(adapter->flags & NETXEN_NIC_DIAG_ENABLED)); } -static struct device_attribute dev_attr_diag_mode = { +static const struct device_attribute dev_attr_diag_mode = { .attr = {.name = "diag_mode", .mode = (S_IRUGO | S_IWUSR)}, .show = netxen_show_diag_mode, .store = netxen_store_diag_mode, diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c index 82fcb83..287d89d 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c @@ -1174,19 +1174,19 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp, return size; } -static struct device_attribute dev_attr_bridged_mode = { +static const struct device_attribute dev_attr_bridged_mode = { .attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)}, .show = qlcnic_show_bridged_mode, .store = qlcnic_store_bridged_mode, }; -static struct device_attribute dev_attr_diag_mode = { +static const struct device_attribute dev_attr_diag_mode = { .attr = {.name = "diag_mode", .mode = (S_IRUGO | S_IWUSR)}, .show = qlcnic_show_diag_mode, .store = qlcnic_store_diag_mode, }; -static struct device_attribute dev_attr_beacon = { +static const struct device_attribute dev_attr_beacon = { .attr = {.name = "beacon", .mode = (S_IRUGO | S_IWUSR)}, .show = qlcnic_show_beacon, .store = qlcnic_store_beacon,