On Thu, 2009-05-14 at 20:45 +0200, Daniel Wagner wrote: Looks good to me, couple of comments below. > +static int hwsim_fops_group_read(void *dat, u64 *val) > +{ > + struct mac80211_hwsim_data *data = dat; > + *val = data->group; > + return 0; > +} > + > +static int hwsim_fops_group_write(void *dat, u64 val) > +{ > + struct mac80211_hwsim_data *data = dat; > + data->group = val; > + return 0; > +} > + > +DEFINE_SIMPLE_ATTRIBUTE(hwsim_fops_group, > + hwsim_fops_group_read, hwsim_fops_group_write, > + "%llu\n"); I think %llx would work better for this? At least I can do bitops better in hex :) > data->debugfs_ps = debugfs_create_file("ps", 0666, > data->debugfs, data, > &hwsim_fops_ps); > + data->debugfs_group = debugfs_create_file("group", 0666, > + data->debugfs, data, > + &hwsim_fops_group); Good thing this is a test module only... debugfs files with user access permissions are a security risk. (a user can open the file and leave the fd open, if root then rmmods future reads/writes to the fd by the user crash the kernel) Anyway looks good, please submit properly with [PATCH] etc :) johannes
Attachment:
signature.asc
Description: This is a digitally signed message part