xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Repeat initialization for wd_data->dev
@ 2023-04-18  8:01 linz
  2023-04-18  8:20 ` Chen, Hongzhan
  0 siblings, 1 reply; 4+ messages in thread
From: linz @ 2023-04-18  8:01 UTC (permalink / raw)
  To: xenomai

Hi, I find a Call trace when arm64 kernel is booting when I use 
remotes/origin/ipipe/4.19.y-cip branch, the Call trace is as follows

[    2.085125] kobject (000000007a365c50): tried to init an initialized 
object, something is seriously wrong.
[    2.094809] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G S                
4.19.209-cip59
[    2.104190] Hardware name: E2000Q DEMO DDR4 (DT)
[    2.108797] I-pipe domain: Linux
[    2.112014] Call trace:
[    2.114458]  dump_backtrace+0x0/0x150
[    2.118112]  show_stack+0x14/0x20
[    2.121419]  dump_stack+0xd0/0x110
[    2.124812]  kobject_init+0x8c/0xa0
[    2.128294]  device_initialize+0x3c/0xd0
[    2.132209]  watchdog_dev_register+0xd4/0x2e0
[    2.136557]  __watchdog_register_device+0xd0/0x2a0
[    2.141338]  watchdog_register_device+0x70/0x90
[    2.145858]  sbsa_gwdt_probe+0x160/0x310
[    2.149772]  platform_drv_probe+0x50/0xa0
[    2.153771]  really_probe+0x248/0x3b0
[    2.157423]  driver_probe_device+0x54/0xf0
[    2.161509]  __driver_attach+0x104/0x120
[    2.165423]  bus_for_each_dev+0x70/0xcc
[    2.169248]  driver_attach+0x20/0x30
[    2.172813]  bus_add_driver+0x164/0x20c
[    2.176638]  driver_register+0x74/0x120
[    2.180463]  __platform_driver_register+0x44/0x50
[    2.185160]  sbsa_gwdt_driver_init+0x18/0x20
[    2.189421]  do_one_initcall+0x50/0x160
[    2.193248]  kernel_init_freeable+0x19c/0x23c
[    2.197596]  kernel_init+0x10/0x100
[    2.201074]  ret_from_fork+0x14/0x24

The reason is that there is repeat initialization for wd_data->dev in 
function watchdog_cdev_register on remotes/origin/ipipe/4.19.y-cip branch.

The fixed up patch is as follows:

diff --git a/drivers/watchdog/watchdog_dev.c 
b/drivers/watchdog/watchdog_dev.c
index 863b2dfc9..8fe59b7d8 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -958,15 +958,6 @@ static int watchdog_cdev_register(struct 
watchdog_device *wdd)
      dev_set_drvdata(&wd_data->dev, wdd);
      dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);

-    device_initialize(&wd_data->dev);
-    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
-    wd_data->dev.class = &watchdog_class;
-    wd_data->dev.parent = wdd->parent;
-    wd_data->dev.groups = wdd->groups;
-    wd_data->dev.release = watchdog_core_data_release;
-    dev_set_drvdata(&wd_data->dev, wdd);
-    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
-
      kthread_init_work(&wd_data->work, watchdog_ping_work);
      hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
      wd_data->timer.function = watchdog_timer_expired;


Thank you



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: Repeat initialization for wd_data->dev
  2023-04-18  8:01 Repeat initialization for wd_data->dev linz
@ 2023-04-18  8:20 ` Chen, Hongzhan
  2023-04-18  8:42   ` linz
  0 siblings, 1 reply; 4+ messages in thread
From: Chen, Hongzhan @ 2023-04-18  8:20 UTC (permalink / raw)
  To: linz, xenomai



>-----Original Message-----
>From: linz <powertree@163.com>
>Sent: Tuesday, April 18, 2023 4:01 PM
>To: xenomai@xenomai.org
>Subject: Repeat initialization for wd_data->dev
>
>Hi, I find a Call trace when arm64 kernel is booting when I use
>remotes/origin/ipipe/4.19.y-cip branch, the Call trace is as follows
>
>[    2.085125] kobject (000000007a365c50): tried to init an initialized
>object, something is seriously wrong.
>[    2.094809] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G S
>4.19.209-cip59
>[    2.104190] Hardware name: E2000Q DEMO DDR4 (DT)
>[    2.108797] I-pipe domain: Linux
>[    2.112014] Call trace:
>[    2.114458]  dump_backtrace+0x0/0x150
>[    2.118112]  show_stack+0x14/0x20
>[    2.121419]  dump_stack+0xd0/0x110
>[    2.124812]  kobject_init+0x8c/0xa0
>[    2.128294]  device_initialize+0x3c/0xd0
>[    2.132209]  watchdog_dev_register+0xd4/0x2e0
>[    2.136557]  __watchdog_register_device+0xd0/0x2a0
>[    2.141338]  watchdog_register_device+0x70/0x90
>[    2.145858]  sbsa_gwdt_probe+0x160/0x310
>[    2.149772]  platform_drv_probe+0x50/0xa0
>[    2.153771]  really_probe+0x248/0x3b0
>[    2.157423]  driver_probe_device+0x54/0xf0
>[    2.161509]  __driver_attach+0x104/0x120
>[    2.165423]  bus_for_each_dev+0x70/0xcc
>[    2.169248]  driver_attach+0x20/0x30
>[    2.172813]  bus_add_driver+0x164/0x20c
>[    2.176638]  driver_register+0x74/0x120
>[    2.180463]  __platform_driver_register+0x44/0x50
>[    2.185160]  sbsa_gwdt_driver_init+0x18/0x20
>[    2.189421]  do_one_initcall+0x50/0x160
>[    2.193248]  kernel_init_freeable+0x19c/0x23c
>[    2.197596]  kernel_init+0x10/0x100
>[    2.201074]  ret_from_fork+0x14/0x24
>
>The reason is that there is repeat initialization for wd_data->dev in
>function watchdog_cdev_register on remotes/origin/ipipe/4.19.y-cip branch.

Thanks for your email. Does the issue happen with common Linux kernel after you disable I-PIPE? If not , it should be common kernel issue and you may like to report it to Linux kernel community.

Regards

Hongzhan Chen
>
>The fixed up patch is as follows:
>
>diff --git a/drivers/watchdog/watchdog_dev.c
>b/drivers/watchdog/watchdog_dev.c
>index 863b2dfc9..8fe59b7d8 100644
>--- a/drivers/watchdog/watchdog_dev.c
>+++ b/drivers/watchdog/watchdog_dev.c
>@@ -958,15 +958,6 @@ static int watchdog_cdev_register(struct
>watchdog_device *wdd)
>      dev_set_drvdata(&wd_data->dev, wdd);
>      dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
>
>-    device_initialize(&wd_data->dev);
>-    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
>-    wd_data->dev.class = &watchdog_class;
>-    wd_data->dev.parent = wdd->parent;
>-    wd_data->dev.groups = wdd->groups;
>-    wd_data->dev.release = watchdog_core_data_release;
>-    dev_set_drvdata(&wd_data->dev, wdd);
>-    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);

>-
>      kthread_init_work(&wd_data->work, watchdog_ping_work);
>      hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC,
>HRTIMER_MODE_REL);
>      wd_data->timer.function = watchdog_timer_expired;
>
>
>Thank you
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Repeat initialization for wd_data->dev
  2023-04-18  8:20 ` Chen, Hongzhan
@ 2023-04-18  8:42   ` linz
  2023-04-18  8:51     ` Florian Bezdeka
  0 siblings, 1 reply; 4+ messages in thread
From: linz @ 2023-04-18  8:42 UTC (permalink / raw)
  To: Chen, Hongzhan, xenomai

Hi,  the issue does not happen with common Linux kernel after you 
disable I-PIPE, because it may be IPIPE bug.

We can see that the function is as follows from 
https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/tree/drivers/watchdog/watchdog_dev.c?h=v4.19.209-cip59

static  int  watchdog_cdev_register(struct  watchdog_device  *wdd)
{
	struct  watchdog_core_data  *wd_data;
	int  err;

	wd_data  =  kzalloc(sizeof(struct  watchdog_core_data),  GFP_KERNEL);
	if  (!wd_data)
		return  -ENOMEM;
	mutex_init(&wd_data->lock);

	wd_data->wdd  =  wdd;
	wdd->wd_data  =  wd_data;

	if  (IS_ERR_OR_NULL(watchdog_kworker))  {
		kfree(wd_data);
		return  -ENODEV;
	}

	device_initialize(&wd_data->dev);
	wd_data->dev.devt  =  MKDEV(MAJOR(watchdog_devt),  wdd->id);
	wd_data->dev.class  =  &watchdog_class;
	wd_data->dev.parent  =  wdd->parent;
	wd_data->dev.groups  =  wdd->groups;
	wd_data->dev.release  =  watchdog_core_data_release;
	dev_set_drvdata(&wd_data->dev,  wdd);
	dev_set_name(&wd_data->dev,  "watchdog%d",  wdd->id);

	kthread_init_work(&wd_data->work,  watchdog_ping_work);
	hrtimer_init(&wd_data->timer,  CLOCK_MONOTONIC,  HRTIMER_MODE_REL);
	wd_data->timer.function  =  watchdog_timer_expired;

	if  (wdd->id  ==  0)  {

                  ... ....

}

But  the function is as follows from 
https://source.denx.de/Xenomai/ipipe-arm64/-/blob/ipipe/4.19.y-cip/drivers/watchdog/watchdog_dev.c

We can see the lines 19 to 26 are duplicated with the lines 28 to 35. I 
guess the lines 28 to 35 may be added mistakenly.

1 static int watchdog_cdev_register(struct watchdog_device *wdd)
2 {
3     struct watchdog_core_data *wd_data;
4    int err;
5
6    wd_data = kzalloc(sizeof(struct watchdog_core_data), GFP_KERNEL);
7    if (!wd_data)
8        return -ENOMEM;
9    mutex_init(&wd_data->lock);
10
11    wd_data->wdd = wdd;
12    wdd->wd_data = wd_data;
13
14    if (IS_ERR_OR_NULL(watchdog_kworker)) {
15        kfree(wd_data);
16        return -ENODEV;
17    }
18
19 device_initialize(&wd_data->dev);
20    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
21    wd_data->dev.class = &watchdog_class;
22    wd_data->dev.parent = wdd->parent;
23    wd_data->dev.groups = wdd->groups;
24    wd_data->dev.release = watchdog_core_data_release;
25    dev_set_drvdata(&wd_data->dev, wdd);
26    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
27
28 device_initialize(&wd_data->dev);
29    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
30    wd_data->dev.class = &watchdog_class;
31    wd_data->dev.parent = wdd->parent;
32    wd_data->dev.groups = wdd->groups;
33    wd_data->dev.release = watchdog_core_data_release;
34    dev_set_drvdata(&wd_data->dev, wdd);
35    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
36
37    kthread_init_work(&wd_data->work, watchdog_ping_work);
38    hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
39    wd_data->timer.function = watchdog_timer_expired;
40
41    if (wdd->id == 0) {

           ... ...

}


在 2023/4/18 16:20, Chen, Hongzhan 写道:
>
>> -----Original Message-----
>> From: linz <powertree@163.com>
>> Sent: Tuesday, April 18, 2023 4:01 PM
>> To: xenomai@xenomai.org
>> Subject: Repeat initialization for wd_data->dev
>>
>> Hi, I find a Call trace when arm64 kernel is booting when I use
>> remotes/origin/ipipe/4.19.y-cip branch, the Call trace is as follows
>>
>> [    2.108797] I-pipe domain: Linux
>> [    2.112014] Call trace:
>> [    2.114458]  dump_backtrace+0x0/0x150
>> [    2.118112]  show_stack+0x14/0x20
>> [    2.121419]  dump_stack+0xd0/0x110
>> [    2.124812]  kobject_init+0x8c/0xa0
>> [    2.128294]  device_initialize+0x3c/0xd0
>> [    2.132209]  watchdog_dev_register+0xd4/0x2e0
>> [    2.136557]  __watchdog_register_device+0xd0/0x2a0
>> [    2.141338]  watchdog_register_device+0x70/0x90
>> [    2.145858]  sbsa_gwdt_probe+0x160/0x310
>> [    2.149772]  platform_drv_probe+0x50/0xa0
>> [    2.153771]  really_probe+0x248/0x3b0
>> [    2.157423]  driver_probe_device+0x54/0xf0
>> [    2.161509]  __driver_attach+0x104/0x120
>> [    2.165423]  bus_for_each_dev+0x70/0xcc
>> [    2.169248]  driver_attach+0x20/0x30
>> [    2.172813]  bus_add_driver+0x164/0x20c
>> [    2.176638]  driver_register+0x74/0x120
>> [    2.180463]  __platform_driver_register+0x44/0x50
>> [    2.185160]  sbsa_gwdt_driver_init+0x18/0x20
>> [    2.189421]  do_one_initcall+0x50/0x160
>> [    2.193248]  kernel_init_freeable+0x19c/0x23c
>> [    2.197596]  kernel_init+0x10/0x100
>> [    2.201074]  ret_from_fork+0x14/0x24
>>
>> The reason is that there is repeat initialization for wd_data->dev in
>> function watchdog_cdev_register on remotes/origin/ipipe/4.19.y-cip branch.
> Thanks for your email. Does the issue happen with common Linux kernel after you disable I-PIPE? If not , it should be common kernel issue and you may like to report it to Linux kernel community.
>
> Regards
>
> Hongzhan Chen
>> The fixed up patch is as follows:
>>
>> diff --git a/drivers/watchdog/watchdog_dev.c
>> b/drivers/watchdog/watchdog_dev.c
>> index 863b2dfc9..8fe59b7d8 100644
>> --- a/drivers/watchdog/watchdog_dev.c
>> +++ b/drivers/watchdog/watchdog_dev.c
>> @@ -958,15 +958,6 @@ static int watchdog_cdev_register(struct
>> watchdog_device *wdd)
>>       dev_set_drvdata(&wd_data->dev, wdd);
>>       dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
>>
>> -    device_initialize(&wd_data->dev);
>> -    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
>> -    wd_data->dev.class = &watchdog_class;
>> -    wd_data->dev.parent = wdd->parent;
>> -    wd_data->dev.groups = wdd->groups;
>> -    wd_data->dev.release = watchdog_core_data_release;
>> -    dev_set_drvdata(&wd_data->dev, wdd);
>> -    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
>> -
>>       kthread_init_work(&wd_data->work, watchdog_ping_work);
>>       hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC,
>> HRTIMER_MODE_REL);
>>       wd_data->timer.function = watchdog_timer_expired;
>>
>>
>> Thank you
>>
>>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Repeat initialization for wd_data->dev
  2023-04-18  8:42   ` linz
@ 2023-04-18  8:51     ` Florian Bezdeka
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Bezdeka @ 2023-04-18  8:51 UTC (permalink / raw)
  To: Greg Gallagher, linz, Chen, Hongzhan, xenomai; +Cc: Jan Kiszka

On Tue, 2023-04-18 at 16:42 +0800, linz wrote:
> Hi,  the issue does not happen with common Linux kernel after you 
> disable I-PIPE, because it may be IPIPE bug.
> 
> We can see that the function is as follows from 
> https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/tree/drivers/watchdog/watchdog_dev.c?h=v4.19.209-cip59
> 
> static  int  watchdog_cdev_register(struct  watchdog_device  *wdd)
> {
> 	struct  watchdog_core_data  *wd_data;
> 	int  err;
> 
> 	wd_data  =  kzalloc(sizeof(struct  watchdog_core_data),  GFP_KERNEL);
> 	if  (!wd_data)
> 		return  -ENOMEM;
> 	mutex_init(&wd_data->lock);
> 
> 	wd_data->wdd  =  wdd;
> 	wdd->wd_data  =  wd_data;
> 
> 	if  (IS_ERR_OR_NULL(watchdog_kworker))  {
> 		kfree(wd_data);
> 		return  -ENODEV;
> 	}
> 
> 	device_initialize(&wd_data->dev);
> 	wd_data->dev.devt  =  MKDEV(MAJOR(watchdog_devt),  wdd->id);
> 	wd_data->dev.class  =  &watchdog_class;
> 	wd_data->dev.parent  =  wdd->parent;
> 	wd_data->dev.groups  =  wdd->groups;
> 	wd_data->dev.release  =  watchdog_core_data_release;
> 	dev_set_drvdata(&wd_data->dev,  wdd);
> 	dev_set_name(&wd_data->dev,  "watchdog%d",  wdd->id);
> 
> 	kthread_init_work(&wd_data->work,  watchdog_ping_work);
> 	hrtimer_init(&wd_data->timer,  CLOCK_MONOTONIC,  HRTIMER_MODE_REL);
> 	wd_data->timer.function  =  watchdog_timer_expired;
> 
> 	if  (wdd->id  ==  0)  {
> 
>                   ... ....
> 
> }
> 
> But  the function is as follows from 
> https://source.denx.de/Xenomai/ipipe-arm64/-/blob/ipipe/4.19.y-cip/drivers/watchdog/watchdog_dev.c
> 
> We can see the lines 19 to 26 are duplicated with the lines 28 to 35. I 
> guess the lines 28 to 35 may be added mistakenly.
> 
> 1 static int watchdog_cdev_register(struct watchdog_device *wdd)
> 2 {
> 3     struct watchdog_core_data *wd_data;
> 4    int err;
> 5
> 6    wd_data = kzalloc(sizeof(struct watchdog_core_data), GFP_KERNEL);
> 7    if (!wd_data)
> 8        return -ENOMEM;
> 9    mutex_init(&wd_data->lock);
> 10
> 11    wd_data->wdd = wdd;
> 12    wdd->wd_data = wd_data;
> 13
> 14    if (IS_ERR_OR_NULL(watchdog_kworker)) {
> 15        kfree(wd_data);
> 16        return -ENODEV;
> 17    }
> 18
> 19 device_initialize(&wd_data->dev);
> 20    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
> 21    wd_data->dev.class = &watchdog_class;
> 22    wd_data->dev.parent = wdd->parent;
> 23    wd_data->dev.groups = wdd->groups;
> 24    wd_data->dev.release = watchdog_core_data_release;
> 25    dev_set_drvdata(&wd_data->dev, wdd);
> 26    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
> 27
> 28 device_initialize(&wd_data->dev);
> 29    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
> 30    wd_data->dev.class = &watchdog_class;
> 31    wd_data->dev.parent = wdd->parent;
> 32    wd_data->dev.groups = wdd->groups;
> 33    wd_data->dev.release = watchdog_core_data_release;
> 34    dev_set_drvdata(&wd_data->dev, wdd);
> 35    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
> 36
> 37    kthread_init_work(&wd_data->work, watchdog_ping_work);
> 38    hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> 39    wd_data->timer.function = watchdog_timer_expired;
> 40
> 41    if (wdd->id == 0) {
> 
>            ... ...
> 
> }

This is clearly a IPIPE bug, very likely a merge has gone wrong.
Adding Greg, our IPIPE for arm maintainer.

Problem has been introduced with [1].

[1] https://source.denx.de/Xenomai/ipipe-arm64/-/commit/28b56c041720030a85958febf9163ee5151bec98

> 
> 
> 在 2023/4/18 16:20, Chen, Hongzhan 写道:
> > 
> > > -----Original Message-----
> > > From: linz <powertree@163.com>
> > > Sent: Tuesday, April 18, 2023 4:01 PM
> > > To: xenomai@xenomai.org
> > > Subject: Repeat initialization for wd_data->dev
> > > 
> > > Hi, I find a Call trace when arm64 kernel is booting when I use
> > > remotes/origin/ipipe/4.19.y-cip branch, the Call trace is as follows
> > > 
> > > [    2.108797] I-pipe domain: Linux
> > > [    2.112014] Call trace:
> > > [    2.114458]  dump_backtrace+0x0/0x150
> > > [    2.118112]  show_stack+0x14/0x20
> > > [    2.121419]  dump_stack+0xd0/0x110
> > > [    2.124812]  kobject_init+0x8c/0xa0
> > > [    2.128294]  device_initialize+0x3c/0xd0
> > > [    2.132209]  watchdog_dev_register+0xd4/0x2e0
> > > [    2.136557]  __watchdog_register_device+0xd0/0x2a0
> > > [    2.141338]  watchdog_register_device+0x70/0x90
> > > [    2.145858]  sbsa_gwdt_probe+0x160/0x310
> > > [    2.149772]  platform_drv_probe+0x50/0xa0
> > > [    2.153771]  really_probe+0x248/0x3b0
> > > [    2.157423]  driver_probe_device+0x54/0xf0
> > > [    2.161509]  __driver_attach+0x104/0x120
> > > [    2.165423]  bus_for_each_dev+0x70/0xcc
> > > [    2.169248]  driver_attach+0x20/0x30
> > > [    2.172813]  bus_add_driver+0x164/0x20c
> > > [    2.176638]  driver_register+0x74/0x120
> > > [    2.180463]  __platform_driver_register+0x44/0x50
> > > [    2.185160]  sbsa_gwdt_driver_init+0x18/0x20
> > > [    2.189421]  do_one_initcall+0x50/0x160
> > > [    2.193248]  kernel_init_freeable+0x19c/0x23c
> > > [    2.197596]  kernel_init+0x10/0x100
> > > [    2.201074]  ret_from_fork+0x14/0x24
> > > 
> > > The reason is that there is repeat initialization for wd_data->dev in
> > > function watchdog_cdev_register on remotes/origin/ipipe/4.19.y-cip branch.
> > Thanks for your email. Does the issue happen with common Linux kernel after you disable I-PIPE? If not , it should be common kernel issue and you may like to report it to Linux kernel community.
> > 
> > Regards
> > 
> > Hongzhan Chen
> > > The fixed up patch is as follows:
> > > 
> > > diff --git a/drivers/watchdog/watchdog_dev.c
> > > b/drivers/watchdog/watchdog_dev.c
> > > index 863b2dfc9..8fe59b7d8 100644
> > > --- a/drivers/watchdog/watchdog_dev.c
> > > +++ b/drivers/watchdog/watchdog_dev.c
> > > @@ -958,15 +958,6 @@ static int watchdog_cdev_register(struct
> > > watchdog_device *wdd)
> > >       dev_set_drvdata(&wd_data->dev, wdd);
> > >       dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
> > > 
> > > -    device_initialize(&wd_data->dev);
> > > -    wd_data->dev.devt = MKDEV(MAJOR(watchdog_devt), wdd->id);
> > > -    wd_data->dev.class = &watchdog_class;
> > > -    wd_data->dev.parent = wdd->parent;
> > > -    wd_data->dev.groups = wdd->groups;
> > > -    wd_data->dev.release = watchdog_core_data_release;
> > > -    dev_set_drvdata(&wd_data->dev, wdd);
> > > -    dev_set_name(&wd_data->dev, "watchdog%d", wdd->id);
> > > -
> > >       kthread_init_work(&wd_data->work, watchdog_ping_work);
> > >       hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC,
> > > HRTIMER_MODE_REL);
> > >       wd_data->timer.function = watchdog_timer_expired;
> > > 
> > > 
> > > Thank you
> > > 
> > > 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-18  8:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18  8:01 Repeat initialization for wd_data->dev linz
2023-04-18  8:20 ` Chen, Hongzhan
2023-04-18  8:42   ` linz
2023-04-18  8:51     ` Florian Bezdeka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).