From patchwork Sat Sep 30 16:57:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9979533 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 300786034B for ; Sat, 30 Sep 2017 16:58:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2128F28A7E for ; Sat, 30 Sep 2017 16:58:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1499228B9C; Sat, 30 Sep 2017 16:58:02 +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 C321528A7E for ; Sat, 30 Sep 2017 16:58:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202AbdI3Q5q (ORCPT ); Sat, 30 Sep 2017 12:57:46 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34908 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbdI3Q5p (ORCPT ); Sat, 30 Sep 2017 12:57:45 -0400 Received: by mail-pg0-f66.google.com with SMTP id j16so1807662pga.2; Sat, 30 Sep 2017 09:57:45 -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=voUZ9Pwml6Z6wNeNGiY8Pq1Z8tpsxonHLNBwTVFdB8g=; b=DWh3nTfakZHr1snCMTuz3gg3cYlKfvDNY0QrayljfYn4f5fpmbDAwukdfH0qmUBArv d8wSNmZ07PYvrm3JFyfKffm0KwrfB2lTIASv0XOqLGEIB+4SZ2AEzxuuERtVlJSn5N0+ yJIIODrFPm43be+e6f7whuNVuEXWvQSQqlertvIh8k4NArOc2AQz4BmXSPOo4m/NJFHP hjwHeieoV+kSskYYTN2NWply5HkZHdKvN72jdm7qBLTr7gdFqCr3no9gKmRz8lD6egzC VPZoqP3jArOm+fdVa+FfblYjoJJatrjqPVQK8y3Pjw1hm+hE85pet32exVWX+1uxueDh ItzQ== 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=voUZ9Pwml6Z6wNeNGiY8Pq1Z8tpsxonHLNBwTVFdB8g=; b=dXgrPjZ/pOYbNh2jLlTKqedy09iPaRC8RsXbbeKsmjKJTGWQP0v2SF8PZYkJH7vLtJ LhkJqJg3nxqPhi57bmAzrWzCc+GWGhNc4UATiLj4rav5Mv2ZZJC151+eDj9bcyZmcwgM W1ORtPe4FaUNUi74QdUUAa6ifjxnAdYKj7EypNrZtEq0s4mRbHJEGLVBPEDidp5rplD+ ZQSD3YgouZqGGnirWKiUxqM7Nn4nNNADxa6xonEDS+j9o1ZWdovyxNLo5HEzM4tMMyLT P9V/qb4/ykVcMEXSNr2fWFDXIzs40T4RVpPZLXng6HCXCWVtztHisqaTktMhc+V7q4oT P19g== X-Gm-Message-State: AHPjjUi2DbMquZQjS+tzo/FR8Z+UY6pLJuP7p3HF8cfQ5ChtszAD3kMR z3oV+MxXVyuLwN3RjvcVyqI= X-Google-Smtp-Source: AOwi7QB68Ebp/WmuzjcBIGcIFTWvp/8jRn9uGqDfP2teJe4IMrqbKNC8tBTqDsybVt/e0+sq2QM0xg== X-Received: by 10.84.204.133 with SMTP id b5mr10056659ple.149.1506790665166; Sat, 30 Sep 2017 09:57:45 -0700 (PDT) Received: from gmail.com ([117.196.112.250]) by smtp.gmail.com with ESMTPSA id i2sm10753374pfd.21.2017.09.30.09.57.40 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 30 Sep 2017 09:57:44 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sat, 30 Sep 2017 22:27:37 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, linuxdrivers@attotech.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] scsi: esas2r: make bin_attr_default_nvram const Date: Sat, 30 Sep 2017 22:27:35 +0530 Message-Id: <1506790655-13287-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 Make this const as it is only passed to the const arguments of the functions sysfs_remove_bin_file and sysfs_create_bin_file. Make the declaration const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal --- drivers/scsi/esas2r/esas2r.h | 2 +- drivers/scsi/esas2r/esas2r_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h index 1da6407..f9acf54 100644 --- a/drivers/scsi/esas2r/esas2r.h +++ b/drivers/scsi/esas2r/esas2r.h @@ -1421,6 +1421,6 @@ static inline void esas2r_comp_list_drain(struct esas2r_adapter *a, extern struct bin_attribute bin_attr_vda; extern struct bin_attribute bin_attr_hw; extern struct bin_attribute bin_attr_live_nvram; -extern struct bin_attribute bin_attr_default_nvram; +extern const struct bin_attribute bin_attr_default_nvram; #endif /* ESAS2R_H */ diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 81f226b..9291768 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c @@ -224,7 +224,7 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj, ESAS2R_RW_BIN_ATTR(hw); ESAS2R_RW_BIN_ATTR(live_nvram); -struct bin_attribute bin_attr_default_nvram = { +const struct bin_attribute bin_attr_default_nvram = { .attr = { .name = "default_nvram", .mode = S_IRUGO }, .size = 0, .read = read_default_nvram,