Skip to content

Commit 324a56e

Browse files
htejungregkh
authored andcommitted
kernfs: s/sysfs_dirent/kernfs_node/ and rename its friends accordingly
kernfs has just been separated out from sysfs and we're already in full conflict mode. Nothing can make the situation any worse. Let's take the chance to name things properly. This patch performs the following renames. * s/sysfs_elem_dir/kernfs_elem_dir/ * s/sysfs_elem_symlink/kernfs_elem_symlink/ * s/sysfs_elem_attr/kernfs_elem_file/ * s/sysfs_dirent/kernfs_node/ * s/sd/kn/ in kernfs proper * s/parent_sd/parent/ * s/target_sd/target/ * s/dir_sd/parent/ * s/to_sysfs_dirent()/rb_to_kn()/ * misc renames of local vars when they conflict with the above Because md, mic and gpio dig into sysfs details, this patch ends up modifying them. All are sysfs_dirent renames and trivial. While we can avoid these by introducing a dummy wrapping struct sysfs_dirent around kernfs_node, given the limited usage outside kernfs and sysfs proper, I don't think such workaround is called for. This patch is strictly rename only and doesn't introduce any functional difference. - mic / gpio renames were missing. Spotted by kbuild test robot. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Neil Brown <neilb@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a8b1c01 commit 324a56e

21 files changed

Lines changed: 774 additions & 773 deletions

File tree

‎drivers/gpio/gpiolib.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static const DEVICE_ATTR(value, 0644,
393393

394394
static irqreturn_t gpio_sysfs_irq(int irq, void *priv)
395395
{
396-
struct sysfs_dirent *value_sd = priv;
396+
struct kernfs_node *value_sd = priv;
397397

398398
sysfs_notify_dirent(value_sd);
399399
return IRQ_HANDLED;
@@ -402,7 +402,7 @@ static irqreturn_t gpio_sysfs_irq(int irq, void *priv)
402402
static int gpio_setup_irq(struct gpio_desc *desc, struct device *dev,
403403
unsigned long gpio_flags)
404404
{
405-
struct sysfs_dirent *value_sd;
405+
struct kernfs_node *value_sd;
406406
unsigned long irq_flags;
407407
int ret, irq, id;
408408

‎drivers/md/bitmap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ int bitmap_create(struct mddev *mddev)
16351635
sector_t blocks = mddev->resync_max_sectors;
16361636
struct file *file = mddev->bitmap_info.file;
16371637
int err;
1638-
struct sysfs_dirent *bm = NULL;
1638+
struct kernfs_node *bm = NULL;
16391639

16401640
BUILD_BUG_ON(sizeof(bitmap_super_t) != 256);
16411641

‎drivers/md/bitmap.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct bitmap {
225225
wait_queue_head_t overflow_wait;
226226
wait_queue_head_t behind_wait;
227227

228-
struct sysfs_dirent *sysfs_can_clear;
228+
struct kernfs_node *sysfs_can_clear;
229229
};
230230

231231
/* the bitmap API */

‎drivers/md/md.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct md_rdev {
106106
*/
107107
struct work_struct del_work; /* used for delayed sysfs removal */
108108

109-
struct sysfs_dirent *sysfs_state; /* handle for 'state'
109+
struct kernfs_node *sysfs_state; /* handle for 'state'
110110
* sysfs entry */
111111

112112
struct badblocks {
@@ -376,10 +376,10 @@ struct mddev {
376376
sector_t resync_max; /* resync should pause
377377
* when it gets here */
378378

379-
struct sysfs_dirent *sysfs_state; /* handle for 'array_state'
379+
struct kernfs_node *sysfs_state; /* handle for 'array_state'
380380
* file in sysfs.
381381
*/
382-
struct sysfs_dirent *sysfs_action; /* handle for 'sync_action' */
382+
struct kernfs_node *sysfs_action; /* handle for 'sync_action' */
383383

384384
struct work_struct del_work; /* used for delayed sysfs removal */
385385

@@ -498,13 +498,13 @@ struct md_sysfs_entry {
498498
};
499499
extern struct attribute_group md_bitmap_group;
500500

501-
static inline struct sysfs_dirent *sysfs_get_dirent_safe(struct sysfs_dirent *sd, char *name)
501+
static inline struct kernfs_node *sysfs_get_dirent_safe(struct kernfs_node *sd, char *name)
502502
{
503503
if (sd)
504504
return sysfs_get_dirent(sd, name);
505505
return sd;
506506
}
507-
static inline void sysfs_notify_dirent_safe(struct sysfs_dirent *sd)
507+
static inline void sysfs_notify_dirent_safe(struct kernfs_node *sd)
508508
{
509509
if (sd)
510510
sysfs_notify_dirent(sd);

‎drivers/misc/mic/host/mic_device.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct mic_device {
112112
struct work_struct shutdown_work;
113113
u8 state;
114114
u8 shutdown_status;
115-
struct sysfs_dirent *state_sysfs;
115+
struct kernfs_node *state_sysfs;
116116
struct completion reset_wait;
117117
void *log_buf_addr;
118118
int *log_buf_len;

0 commit comments

Comments
 (0)