From patchwork Mon Aug 21 11:43:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9912281 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 29DB8602D8 for ; Mon, 21 Aug 2017 11:47:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D858286E4 for ; Mon, 21 Aug 2017 11:47:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 022FE2875B; Mon, 21 Aug 2017 11:47:29 +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=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 AE10B286E4 for ; Mon, 21 Aug 2017 11:47:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753543AbdHULnw (ORCPT ); Mon, 21 Aug 2017 07:43:52 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33858 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbdHULnu (ORCPT ); Mon, 21 Aug 2017 07:43:50 -0400 Received: by mail-pg0-f66.google.com with SMTP id i12so8158721pgr.1; Mon, 21 Aug 2017 04:43:50 -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=bBKcPvYG1C3ZyjwYqHoeGa8ASfiPVs0fSaU6AtrufiQ=; b=cY1V/Ib0JiuwLfj62K7l5KxP39doJ3nePgz3Hm6kqLNzHF90yAiEubcN9GdVF0ipEV ARdaexVwVCxzZyW8/3yKiYRu3wHe/CdrZLfsG/xs9N0W5ldiXMlIg9NWQaTzMDXj1xaZ vM+wdC2MYhWSQpt1cj4WVyvVkjDOa2/GvYtUOSv8po43ckTp/y2W1zEmegdCTOrUf6Ol EgzGFx6i+oOARvWUZ4Gyjo+Da8u95RN4RMOuXKhCuNSHSF5oysK3wX9xXXc9Pdnxsmcy xpurNKLkY3SdMwxkk/Bs/Olg2IN3Lo7ofX7d2UkMLv40kT67bFMILXL2mvJAiHBGl2qV hqIQ== 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=bBKcPvYG1C3ZyjwYqHoeGa8ASfiPVs0fSaU6AtrufiQ=; b=Zo6iI2j2c2dLBzQDOxlFQZbRFaLhM9un+R5GPXTLMctOikegkN7sQ5SjTVxuEOAPY3 syITzLiQVpoV8TBNIHHjC+yE2Yn0LiYSfsICOz7I6Qgn6DqEYvWSAYKFM0ixNpeBun9i 5699hudk582SmReMDq4JJQ8QzNhJ3LG9LffeKTEzA8gj2Eu0vizrs6geUFOFRrie3VE5 8VLArVsSjJi9LPZOTfsNI5M09x9BAQNgt95astf6VtmRwlKgGMOpl9MMEIgNNLiauxse z2ePhQEnjSCEhEgDPtr9ACCKC2nbIhl3aqmN4oGNPOdcrxHr06NdIHtdWWfD2zzfEJKI Mo1w== X-Gm-Message-State: AHYfb5hHxiAw8EG4XkMzrYdIRNVRzo9DQjHSl+hJoO3zUtd20Anyz3wt iIAqYFWFNtgH/A== X-Received: by 10.98.61.21 with SMTP id k21mr779412pfa.154.1503315829642; Mon, 21 Aug 2017 04:43:49 -0700 (PDT) Received: from gmail.com ([117.196.124.142]) by smtp.gmail.com with ESMTPSA id y192sm10846249pgd.63.2017.08.21.04.43.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 04:43:49 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 21 Aug 2017 17:13:38 +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 1/6] ACPI: make device_attribute const Date: Mon, 21 Aug 2017 17:13:07 +0530 Message-Id: <1503315792-14837-2-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/acpi/battery.c | 2 +- drivers/acpi/sbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 1cbb88d..13e7b56 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -620,7 +620,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev, return count; } -static struct device_attribute alarm_attr = { +static const struct device_attribute alarm_attr = { .attr = {.name = "alarm", .mode = 0644}, .show = acpi_battery_alarm_show, .store = acpi_battery_alarm_store, diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index a184637..a2428e9 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -474,7 +474,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev, return count; } -static struct device_attribute alarm_attr = { +static const struct device_attribute alarm_attr = { .attr = {.name = "alarm", .mode = 0644}, .show = acpi_battery_alarm_show, .store = acpi_battery_alarm_store,