Skip to contentSkip to conversation

usb: core: ledtrig-usbport: use octal permission

PATCH In review Nigel Christian 2 participants 2 messages Oct 31, 2020 – Nov 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: core: ledtrig-usbport: use octal permission

Change read/write for owner permission from symbolic to octal to enhance readability. This patch reduces checkpatch warnings for this file to nil.

see: https://lkml.org/lkml/2016/8/2/1945

verified via chmod(2) man page

---
 drivers/usb/core/ledtrig-usbport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/core/ledtrig-usbport.c +1 -1
index ba371a24ff78..8e9b1c5cc971 100644
@@ -211,7 +211,7 @@ static int usbport_trig_add_port(struct usbport_trig_data *usbport_data,
 
 	sysfs_attr_init(&port->attr.attr);
 	port->attr.attr.name = port->port_name;
-	port->attr.attr.mode = S_IRUSR | S_IWUSR;
+	port->attr.attr.mode = 0600;
 	port->attr.show = usbport_trig_port_show;
 	port->attr.store = usbport_trig_port_store;
 
Signature · 1 line
2.28.0
maintainer
#1 lore raw
Quoted 5 lines · Nigel Christian

Change read/write for owner permission from symbolic to octal to enhance readability. This patch reduces checkpatch warnings for this file to nil.

see: https://lkml.org/lkml/2016/8/2/1945

Please use lore.kernel.org links for mailing list stuff.

thanks,

greg k-h