From patchwork Tue Aug 1 14:21:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9874747 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 A743B60361 for ; Tue, 1 Aug 2017 14:21:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A945274B4 for ; Tue, 1 Aug 2017 14:21:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F50828666; Tue, 1 Aug 2017 14:21:39 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 544D12864F for ; Tue, 1 Aug 2017 14:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751339AbdHAOV0 (ORCPT ); Tue, 1 Aug 2017 10:21:26 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33630 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbdHAOVZ (ORCPT ); Tue, 1 Aug 2017 10:21:25 -0400 Received: by mail-pg0-f68.google.com with SMTP id u185so2945322pgb.0; Tue, 01 Aug 2017 07:21: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; bh=mcVC+8FmLAbcB++xb9smc/a6bS6W+/wGtilvZbNQu9U=; b=Nfkc8i75NWRa5npNFnw0q9OUjH67yuUfsvmz4txs1wx5SsAh7cW5EQGmBrfvptwPNV ShtO//oPLDKqzNNITc2IiA/R+ecmbcHuVwbBjd/2PO0aLb3MAjy1vFhU28avgaaijKw4 Qmyt1vXqmDDZJpTeMHexHDLGVGqX5C4xnqXKSHjWbIwxA74m01KlAq6mxt4iNFpNJgku dgtdKVxlPyT6meGo0UqkOi014VGfHd88YSxtHs/BR8hUQStJKjVKIN45XJaGeJlRQE6/ IH3XmZSKUYSGPfE3/tpaETdnkhfj4hYmAt9B6ZsJ2QPui21AFUtY5K00L203rPeAQzfl rSWA== 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=mcVC+8FmLAbcB++xb9smc/a6bS6W+/wGtilvZbNQu9U=; b=oynmQg9qwizNOCkkoxhhF1qaUznahuhaN7dj01To3g2dZEMTyuhPUqlx77o4k/xns5 KTTD2Tzw/2TdQQMSPIcPZYeFMKgshAIjMAWRBE0VnamBKcQZXQgCL8aU5Bt1QQHofLVJ qPnatlTVrrjlk4IxU1t5oEXsmVg5iZ8KmB0P0L2N2zmNO4lvX242RAMmfPKbMr01lYi2 GFQyCEjQH5GWzeQ2M5yT5iDgoNz5Uhp86TP/Soe96vjSXoJ9UDtNC6rK2esw+hC+aXGZ RIStebIvlyby3mKftDJHN7ntr0pS3Yt20dM1kdgXzn6OXiFJBfsrvelwXuKhSPP8J5SN 883w== X-Gm-Message-State: AIVw112hoDgSzbgdpoWT114P/QHJXmL+6Vnr+H6KmmlNXzShbuIWWRrk IUdFVZfOt4Riqctq X-Received: by 10.84.232.7 with SMTP id h7mr21264304plk.360.1501597284661; Tue, 01 Aug 2017 07:21:24 -0700 (PDT) Received: from gmail.com ([117.196.101.28]) by smtp.gmail.com with ESMTPSA id 133sm754717pge.29.2017.08.01.07.21.20 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 01 Aug 2017 07:21:24 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 01 Aug 2017 19:51:19 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] arcmsr: add const to bin_attribute structures Date: Tue, 1 Aug 2017 19:51:14 +0530 Message-Id: <1501597274-5544-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 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 Add const to bin_attribute structures as they are only passed to the functions system_{remove/create}_bin_file. The arguments passed are of type const, so declare the structures to be const. Done using Coccinelle. Signed-off-by: Bhumika Goyal Reviewed-by: Christoph Hellwig --- drivers/scsi/arcmsr/arcmsr_attr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c index 9c86481..259d9c2 100644 --- a/drivers/scsi/arcmsr/arcmsr_attr.c +++ b/drivers/scsi/arcmsr/arcmsr_attr.c @@ -190,7 +190,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp, return 1; } -static struct bin_attribute arcmsr_sysfs_message_read_attr = { +static const struct bin_attribute arcmsr_sysfs_message_read_attr = { .attr = { .name = "mu_read", .mode = S_IRUSR , @@ -199,7 +199,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp, .read = arcmsr_sysfs_iop_message_read, }; -static struct bin_attribute arcmsr_sysfs_message_write_attr = { +static const struct bin_attribute arcmsr_sysfs_message_write_attr = { .attr = { .name = "mu_write", .mode = S_IWUSR, @@ -208,7 +208,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp, .write = arcmsr_sysfs_iop_message_write, }; -static struct bin_attribute arcmsr_sysfs_message_clear_attr = { +static const struct bin_attribute arcmsr_sysfs_message_clear_attr = { .attr = { .name = "mu_clear", .mode = S_IWUSR,