lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/4] blk-integrity: register sysfs attributes on struct device
> +static const struct attribute_group integrity_group  = {

Double whitespace before the =

> + .name = "integrity", .attrs = integrity_attrs,
> };

We generally put each field member on separate lines for readability.

> int blk_integrity_add(struct gendisk *disk)
> {
> + return device_add_groups(disk_to_dev(disk), integrity_groups);
> }
>
> void blk_integrity_del(struct gendisk *disk)
> {
> + device_remove_groups(disk_to_dev(disk), integrity_groups);

Can't we just add integrity_group to disk_attr_groups and remove these
calls entirely?

\
 
 \ /
  Last update: 2023-03-27 01:01    [W:0.072 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site