On 11/26/2016 03:50 PM, Andrea Ghittino wrote: > Fixes greybus user/groups permission style warnings > found by checkpatch.pl tool > > Signed-off-by: Andrea Ghittino <aghittino at gmail.com> I don't understand why using 0444 would be preferred over S_IRUGO (for example). Do you know? Maybe the checkpatch.pl output says something about it. There may well be a good reason, but otherwise I prefer using the symbolic constants (and therefore *not* applying this patch). -Alex > diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c > index 1c5b41a..4424f63 100644 > --- a/drivers/staging/greybus/camera.c > +++ b/drivers/staging/greybus/camera.c > @@ -1067,22 +1067,22 @@ struct gb_camera_debugfs_entry { > static const struct gb_camera_debugfs_entry gb_camera_debugfs_entries[] = { > { > .name = "capabilities", > - .mask = S_IFREG | S_IRUGO, > + .mask = S_IFREG | 0444, > .buffer = GB_CAMERA_DEBUGFS_BUFFER_CAPABILITIES, > .execute = gb_camera_debugfs_capabilities, > }, { > .name = "configure_streams", > - .mask = S_IFREG | S_IRUGO | S_IWUGO, > + .mask = S_IFREG | 0666, > .buffer = GB_CAMERA_DEBUGFS_BUFFER_STREAMS, > .execute = gb_camera_debugfs_configure_streams, > }, { > .name = "capture", > - .mask = S_IFREG | S_IRUGO | S_IWUGO, > + .mask = S_IFREG | 0666, > .buffer = GB_CAMERA_DEBUGFS_BUFFER_CAPTURE, > .execute = gb_camera_debugfs_capture, > }, { > .name = "flush", > - .mask = S_IFREG | S_IRUGO | S_IWUGO, > + .mask = S_IFREG | 0666, > .buffer = GB_CAMERA_DEBUGFS_BUFFER_FLUSH, > .execute = gb_camera_debugfs_flush, > }, > @@ -1097,7 +1097,7 @@ static ssize_t gb_camera_debugfs_read(struct file *file, char __user *buf, > ssize_t ret; > > /* For read-only entries the operation is triggered by a read. */ > - if (!(op->mask & S_IWUGO)) { > + if (!(op->mask & 0222)) { > ret = op->execute(gcam, NULL, 0); > if (ret < 0) > return ret; > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel