lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <f92ddeed3bc89dd6175ee87cea88256c0c5102da.1504165373.git.arvind.yadav.cs@gmail.com>
Date:   Thu, 31 Aug 2017 13:16:10 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     andy@...radead.org, dvhart@...radead.org, ibm-acpi@....eng.br
Cc:     linux-kernel@...r.kernel.org, ibm-acpi-devel@...ts.sourceforge.net
Subject: [PATCH] platform: thinkpad_acpi: constify driver_attribute

driver_attribute are not supposed to change at runtime.
Functions driver_create_file/driver_remove_file are working with
const driver_attribute. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index b225731..45b50ef 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -1561,7 +1561,7 @@ static ssize_t uwb_emulstate_store(struct device_driver *drv, const char *buf,
 
 /* --------------------------------------------------------------------- */
 
-static struct driver_attribute *tpacpi_driver_attributes[] = {
+static const struct driver_attribute *tpacpi_driver_attributes[] = {
 	&driver_attr_debug_level, &driver_attr_version,
 	&driver_attr_interface_version,
 };
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ