diff mbox series

mfd: mt6360: Fix register driver NULL pointer by add driver name

Message ID 1591609125-3761-1-git-send-email-gene.chen.richtek@gmail.com (mailing list archive)
State New, archived
Headers show
Series mfd: mt6360: Fix register driver NULL pointer by add driver name | expand

Commit Message

Gene Chen June 8, 2020, 9:38 a.m. UTC
From: Gene Chen <gene_chen@richtek.com>

accidentally remove driver name when
replace probe by probe_new in add mt6360 mfd driver patch v4

[  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
[  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
[  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
[  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
[  121.243012] Call Trace:
[  121.243012]  kset_find_obj+0x3d/0xc0
[  121.243012]  driver_find+0x16/0x40
[  121.243012]  driver_register+0x49/0x100
[  121.243012]  ? i2c_for_each_dev+0x39/0x50
[  121.243012]  ? __process_new_adapter+0x20/0x20
[  121.243012]  ? cht_wc_driver_init+0x11/0x11
[  121.243012]  i2c_register_driver+0x30/0x80
[  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
[  121.243012]  mt6360_pmu_driver_init+0xf/0x11
[  121.243012]  do_one_initcall+0x33/0x1a0
[  121.243012]  ? parse_args+0x1eb/0x3d0
[  121.243012]  ? __might_sleep+0x31/0x90
[  121.243012]  ? kernel_init_freeable+0x10a/0x17f
[  121.243012]  kernel_init_freeable+0x12c/0x17f
[  121.243012]  ? rest_init+0x110/0x110
[  121.243012]  kernel_init+0xb/0x100
[  121.243012]  ? schedule_tail_wrapper+0x9/0xc
[  121.243012]  ret_from_fork+0x19/0x24
[  121.243012] Modules linked in:
[  121.243012] CR2: 0000000000000000
[  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
[  121.243012] ---[ end trace 38a803400f1a2bee ]---
[  121.243012] EIP: strcmp+0x11/0x30

Signed-off-by: Gene Chen <gene_chen@richtek.com>
---
 drivers/mfd/mt6360-core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Matthias Brugger June 8, 2020, 10:01 a.m. UTC | #1
On 08/06/2020 11:38, Gene Chen wrote:
> From: Gene Chen <gene_chen@richtek.com>
> 
> accidentally remove driver name when
> replace probe by probe_new in add mt6360 mfd driver patch v4
> 
> [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> [  121.243012] Call Trace:
> [  121.243012]  kset_find_obj+0x3d/0xc0
> [  121.243012]  driver_find+0x16/0x40
> [  121.243012]  driver_register+0x49/0x100
> [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> [  121.243012]  ? __process_new_adapter+0x20/0x20
> [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> [  121.243012]  i2c_register_driver+0x30/0x80
> [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> [  121.243012]  do_one_initcall+0x33/0x1a0
> [  121.243012]  ? parse_args+0x1eb/0x3d0
> [  121.243012]  ? __might_sleep+0x31/0x90
> [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> [  121.243012]  kernel_init_freeable+0x12c/0x17f
> [  121.243012]  ? rest_init+0x110/0x110
> [  121.243012]  kernel_init+0xb/0x100
> [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> [  121.243012]  ret_from_fork+0x19/0x24
> [  121.243012] Modules linked in:
> [  121.243012] CR2: 0000000000000000
> [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> [  121.243012] EIP: strcmp+0x11/0x30
> 
> Signed-off-by: Gene Chen <gene_chen@richtek.com>
> ---
>  drivers/mfd/mt6360-core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> index db8cdf5..e9cacc2 100644
> --- a/drivers/mfd/mt6360-core.c
> +++ b/drivers/mfd/mt6360-core.c
> @@ -412,6 +412,7 @@ MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id);
>  
>  static struct i2c_driver mt6360_pmu_driver = {
>  	.driver = {
> +		.name = "mt6360_pmu",

seems we doubled the work, anyway:
Reviewed-by: Matthias Brugger <matthias.bgg@kernel.org>


>  		.pm = &mt6360_pmu_pm_ops,
>  		.of_match_table = of_match_ptr(mt6360_pmu_of_id),
>  	},
>
Lee Jones June 8, 2020, 7:28 p.m. UTC | #2
On Mon, 08 Jun 2020, Gene Chen wrote:

> From: Gene Chen <gene_chen@richtek.com>
> 
> accidentally remove driver name when
> replace probe by probe_new in add mt6360 mfd driver patch v4
> 
> [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> [  121.243012] Call Trace:
> [  121.243012]  kset_find_obj+0x3d/0xc0
> [  121.243012]  driver_find+0x16/0x40
> [  121.243012]  driver_register+0x49/0x100
> [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> [  121.243012]  ? __process_new_adapter+0x20/0x20
> [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> [  121.243012]  i2c_register_driver+0x30/0x80
> [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> [  121.243012]  do_one_initcall+0x33/0x1a0
> [  121.243012]  ? parse_args+0x1eb/0x3d0
> [  121.243012]  ? __might_sleep+0x31/0x90
> [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> [  121.243012]  kernel_init_freeable+0x12c/0x17f
> [  121.243012]  ? rest_init+0x110/0x110
> [  121.243012]  kernel_init+0xb/0x100
> [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> [  121.243012]  ret_from_fork+0x19/0x24
> [  121.243012] Modules linked in:
> [  121.243012] CR2: 0000000000000000
> [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> [  121.243012] EIP: strcmp+0x11/0x30

How did this driver ever work for you?

> Signed-off-by: Gene Chen <gene_chen@richtek.com>
> ---
>  drivers/mfd/mt6360-core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> index db8cdf5..e9cacc2 100644
> --- a/drivers/mfd/mt6360-core.c
> +++ b/drivers/mfd/mt6360-core.c
> @@ -412,6 +412,7 @@ MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id);
>  
>  static struct i2c_driver mt6360_pmu_driver = {
>  	.driver = {
> +		.name = "mt6360_pmu",
>  		.pm = &mt6360_pmu_pm_ops,
>  		.of_match_table = of_match_ptr(mt6360_pmu_of_id),
>  	},
Gene Chen June 9, 2020, 11:43 a.m. UTC | #3
Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 上午3:28寫道:
>
> On Mon, 08 Jun 2020, Gene Chen wrote:
>
> > From: Gene Chen <gene_chen@richtek.com>
> >
> > accidentally remove driver name when
> > replace probe by probe_new in add mt6360 mfd driver patch v4
> >
> > [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> > [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> > [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> > [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> > [  121.243012] Call Trace:
> > [  121.243012]  kset_find_obj+0x3d/0xc0
> > [  121.243012]  driver_find+0x16/0x40
> > [  121.243012]  driver_register+0x49/0x100
> > [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> > [  121.243012]  ? __process_new_adapter+0x20/0x20
> > [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> > [  121.243012]  i2c_register_driver+0x30/0x80
> > [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> > [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> > [  121.243012]  do_one_initcall+0x33/0x1a0
> > [  121.243012]  ? parse_args+0x1eb/0x3d0
> > [  121.243012]  ? __might_sleep+0x31/0x90
> > [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> > [  121.243012]  kernel_init_freeable+0x12c/0x17f
> > [  121.243012]  ? rest_init+0x110/0x110
> > [  121.243012]  kernel_init+0xb/0x100
> > [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> > [  121.243012]  ret_from_fork+0x19/0x24
> > [  121.243012] Modules linked in:
> > [  121.243012] CR2: 0000000000000000
> > [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> > [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> > [  121.243012] EIP: strcmp+0x11/0x30
>
> How did this driver ever work for you?
>

i ask my coworker help me verify.
i will check the patch myself, sincerely apologies for this.

> > Signed-off-by: Gene Chen <gene_chen@richtek.com>
> > ---
> >  drivers/mfd/mt6360-core.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> > index db8cdf5..e9cacc2 100644
> > --- a/drivers/mfd/mt6360-core.c
> > +++ b/drivers/mfd/mt6360-core.c
> > @@ -412,6 +412,7 @@ MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id);
> >
> >  static struct i2c_driver mt6360_pmu_driver = {
> >       .driver = {
> > +             .name = "mt6360_pmu",
> >               .pm = &mt6360_pmu_pm_ops,
> >               .of_match_table = of_match_ptr(mt6360_pmu_of_id),
> >       },
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
Matthias Brugger June 9, 2020, 12:01 p.m. UTC | #4
On 09/06/2020 13:43, Gene Chen wrote:
> Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 上午3:28寫道:
>>
>> On Mon, 08 Jun 2020, Gene Chen wrote:
>>
>>> From: Gene Chen <gene_chen@richtek.com>
>>>
>>> accidentally remove driver name when
>>> replace probe by probe_new in add mt6360 mfd driver patch v4
>>>
>>> [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
>>> [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
>>> [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
>>> [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
>>> [  121.243012] Call Trace:
>>> [  121.243012]  kset_find_obj+0x3d/0xc0
>>> [  121.243012]  driver_find+0x16/0x40
>>> [  121.243012]  driver_register+0x49/0x100
>>> [  121.243012]  ? i2c_for_each_dev+0x39/0x50
>>> [  121.243012]  ? __process_new_adapter+0x20/0x20
>>> [  121.243012]  ? cht_wc_driver_init+0x11/0x11
>>> [  121.243012]  i2c_register_driver+0x30/0x80
>>> [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
>>> [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
>>> [  121.243012]  do_one_initcall+0x33/0x1a0
>>> [  121.243012]  ? parse_args+0x1eb/0x3d0
>>> [  121.243012]  ? __might_sleep+0x31/0x90
>>> [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
>>> [  121.243012]  kernel_init_freeable+0x12c/0x17f
>>> [  121.243012]  ? rest_init+0x110/0x110
>>> [  121.243012]  kernel_init+0xb/0x100
>>> [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
>>> [  121.243012]  ret_from_fork+0x19/0x24
>>> [  121.243012] Modules linked in:
>>> [  121.243012] CR2: 0000000000000000
>>> [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
>>> [  121.243012] ---[ end trace 38a803400f1a2bee ]---
>>> [  121.243012] EIP: strcmp+0x11/0x30
>>
>> How did this driver ever work for you?
>>
> 
> i ask my coworker help me verify.
> i will check the patch myself, sincerely apologies for this.
> 

BTW for which SoC this PMIC is used for?
Maybe it would be useful to have some development HW to be able to verify patches.

Regards,
Matthias
Lee Jones June 9, 2020, 12:53 p.m. UTC | #5
On Tue, 09 Jun 2020, Gene Chen wrote:

> Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 上午3:28寫道:
> >
> > On Mon, 08 Jun 2020, Gene Chen wrote:
> >
> > > From: Gene Chen <gene_chen@richtek.com>
> > >
> > > accidentally remove driver name when
> > > replace probe by probe_new in add mt6360 mfd driver patch v4
> > >
> > > [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> > > [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> > > [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> > > [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> > > [  121.243012] Call Trace:
> > > [  121.243012]  kset_find_obj+0x3d/0xc0
> > > [  121.243012]  driver_find+0x16/0x40
> > > [  121.243012]  driver_register+0x49/0x100
> > > [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> > > [  121.243012]  ? __process_new_adapter+0x20/0x20
> > > [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> > > [  121.243012]  i2c_register_driver+0x30/0x80
> > > [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> > > [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> > > [  121.243012]  do_one_initcall+0x33/0x1a0
> > > [  121.243012]  ? parse_args+0x1eb/0x3d0
> > > [  121.243012]  ? __might_sleep+0x31/0x90
> > > [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> > > [  121.243012]  kernel_init_freeable+0x12c/0x17f
> > > [  121.243012]  ? rest_init+0x110/0x110
> > > [  121.243012]  kernel_init+0xb/0x100
> > > [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> > > [  121.243012]  ret_from_fork+0x19/0x24
> > > [  121.243012] Modules linked in:
> > > [  121.243012] CR2: 0000000000000000
> > > [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> > > [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> > > [  121.243012] EIP: strcmp+0x11/0x30
> >
> > How did this driver ever work for you?
> 
> i ask my coworker help me verify.
> i will check the patch myself, sincerely apologies for this.

What does this mean?

Are you saying that for all 10 versions of this patch submission, it
has never been tested?  And despite being authored by you and
submitted by you, you have never actually boot tested the driver
yourself?  Relying instead on your co-worker to conduct the testing,
who failed to do so.  Is that really correct?

> > > Signed-off-by: Gene Chen <gene_chen@richtek.com>
> > > ---
> > >  drivers/mfd/mt6360-core.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> > > index db8cdf5..e9cacc2 100644
> > > --- a/drivers/mfd/mt6360-core.c
> > > +++ b/drivers/mfd/mt6360-core.c
> > > @@ -412,6 +412,7 @@ MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id);
> > >
> > >  static struct i2c_driver mt6360_pmu_driver = {
> > >       .driver = {
> > > +             .name = "mt6360_pmu",
> > >               .pm = &mt6360_pmu_pm_ops,
> > >               .of_match_table = of_match_ptr(mt6360_pmu_of_id),
> > >       },
> >
Gene Chen June 12, 2020, 9:55 a.m. UTC | #6
Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 下午8:53寫道:
>
> On Tue, 09 Jun 2020, Gene Chen wrote:
>
> > Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 上午3:28寫道:
> > >
> > > On Mon, 08 Jun 2020, Gene Chen wrote:
> > >
> > > > From: Gene Chen <gene_chen@richtek.com>
> > > >
> > > > accidentally remove driver name when
> > > > replace probe by probe_new in add mt6360 mfd driver patch v4
> > > >
> > > > [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> > > > [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> > > > [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> > > > [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> > > > [  121.243012] Call Trace:
> > > > [  121.243012]  kset_find_obj+0x3d/0xc0
> > > > [  121.243012]  driver_find+0x16/0x40
> > > > [  121.243012]  driver_register+0x49/0x100
> > > > [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> > > > [  121.243012]  ? __process_new_adapter+0x20/0x20
> > > > [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> > > > [  121.243012]  i2c_register_driver+0x30/0x80
> > > > [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> > > > [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> > > > [  121.243012]  do_one_initcall+0x33/0x1a0
> > > > [  121.243012]  ? parse_args+0x1eb/0x3d0
> > > > [  121.243012]  ? __might_sleep+0x31/0x90
> > > > [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> > > > [  121.243012]  kernel_init_freeable+0x12c/0x17f
> > > > [  121.243012]  ? rest_init+0x110/0x110
> > > > [  121.243012]  kernel_init+0xb/0x100
> > > > [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> > > > [  121.243012]  ret_from_fork+0x19/0x24
> > > > [  121.243012] Modules linked in:
> > > > [  121.243012] CR2: 0000000000000000
> > > > [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> > > > [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> > > > [  121.243012] EIP: strcmp+0x11/0x30
> > >
> > > How did this driver ever work for you?
> >
> > i ask my coworker help me verify.
> > i will check the patch myself, sincerely apologies for this.
>
> What does this mean?
>
> Are you saying that for all 10 versions of this patch submission, it
> has never been tested?  And despite being authored by you and
> submitted by you, you have never actually boot tested the driver
> yourself?  Relying instead on your co-worker to conduct the testing,
> who failed to do so.  Is that really correct?
>

On carefully reading to the document how to upstream, I find that I
had full duty for verify patch i sent.
The fault is entirely mine and I deeply regret that it should have occurred.
I will always verify patch by meself before sending it.
I have already verfied sub-device adc/led/regulator done in Mediatek
phone and Hikey960 development board

> > > > Signed-off-by: Gene Chen <gene_chen@richtek.com>
> > > > ---
> > > >  drivers/mfd/mt6360-core.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> > > > index db8cdf5..e9cacc2 100644
> > > > --- a/drivers/mfd/mt6360-core.c
> > > > +++ b/drivers/mfd/mt6360-core.c
> > > > @@ -412,6 +412,7 @@ MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id);
> > > >
> > > >  static struct i2c_driver mt6360_pmu_driver = {
> > > >       .driver = {
> > > > +             .name = "mt6360_pmu",
> > > >               .pm = &mt6360_pmu_pm_ops,
> > > >               .of_match_table = of_match_ptr(mt6360_pmu_of_id),
> > > >       },
> > >
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
Lee Jones June 12, 2020, 11:17 a.m. UTC | #7
On Fri, 12 Jun 2020, Gene Chen wrote:

> Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 下午8:53寫道:
> >
> > On Tue, 09 Jun 2020, Gene Chen wrote:
> >
> > > Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 上午3:28寫道:
> > > >
> > > > On Mon, 08 Jun 2020, Gene Chen wrote:
> > > >
> > > > > From: Gene Chen <gene_chen@richtek.com>
> > > > >
> > > > > accidentally remove driver name when
> > > > > replace probe by probe_new in add mt6360 mfd driver patch v4
> > > > >
> > > > > [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> > > > > [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> > > > > [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> > > > > [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> > > > > [  121.243012] Call Trace:
> > > > > [  121.243012]  kset_find_obj+0x3d/0xc0
> > > > > [  121.243012]  driver_find+0x16/0x40
> > > > > [  121.243012]  driver_register+0x49/0x100
> > > > > [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> > > > > [  121.243012]  ? __process_new_adapter+0x20/0x20
> > > > > [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> > > > > [  121.243012]  i2c_register_driver+0x30/0x80
> > > > > [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> > > > > [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> > > > > [  121.243012]  do_one_initcall+0x33/0x1a0
> > > > > [  121.243012]  ? parse_args+0x1eb/0x3d0
> > > > > [  121.243012]  ? __might_sleep+0x31/0x90
> > > > > [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> > > > > [  121.243012]  kernel_init_freeable+0x12c/0x17f
> > > > > [  121.243012]  ? rest_init+0x110/0x110
> > > > > [  121.243012]  kernel_init+0xb/0x100
> > > > > [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> > > > > [  121.243012]  ret_from_fork+0x19/0x24
> > > > > [  121.243012] Modules linked in:
> > > > > [  121.243012] CR2: 0000000000000000
> > > > > [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> > > > > [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> > > > > [  121.243012] EIP: strcmp+0x11/0x30
> > > >
> > > > How did this driver ever work for you?
> > >
> > > i ask my coworker help me verify.
> > > i will check the patch myself, sincerely apologies for this.
> >
> > What does this mean?
> >
> > Are you saying that for all 10 versions of this patch submission, it
> > has never been tested?  And despite being authored by you and
> > submitted by you, you have never actually boot tested the driver
> > yourself?  Relying instead on your co-worker to conduct the testing,
> > who failed to do so.  Is that really correct?
> >
> 
> On carefully reading to the document how to upstream, I find that I
> had full duty for verify patch i sent.
> The fault is entirely mine and I deeply regret that it should have occurred.
> I will always verify patch by meself before sending it.
> I have already verfied sub-device adc/led/regulator done in Mediatek
> phone and Hikey960 development board

I'm not looking for someone to blame.  Instead, I would like to
ascertain how this happened.  How was this driver ever
tested/verified?  If you're not going to run/use it, does it even need
to exist?
Gene Chen June 15, 2020, 6:57 a.m. UTC | #8
Lee Jones <lee.jones@linaro.org> 於 2020年6月12日 週五 下午7:17寫道:
>
> On Fri, 12 Jun 2020, Gene Chen wrote:
>
> > Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 下午8:53寫道:
> > >
> > > On Tue, 09 Jun 2020, Gene Chen wrote:
> > >
> > > > Lee Jones <lee.jones@linaro.org> 於 2020年6月9日 週二 上午3:28寫道:
> > > > >
> > > > > On Mon, 08 Jun 2020, Gene Chen wrote:
> > > > >
> > > > > > From: Gene Chen <gene_chen@richtek.com>
> > > > > >
> > > > > > accidentally remove driver name when
> > > > > > replace probe by probe_new in add mt6360 mfd driver patch v4
> > > > > >
> > > > > > [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> > > > > > [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> > > > > > [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> > > > > > [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> > > > > > [  121.243012] Call Trace:
> > > > > > [  121.243012]  kset_find_obj+0x3d/0xc0
> > > > > > [  121.243012]  driver_find+0x16/0x40
> > > > > > [  121.243012]  driver_register+0x49/0x100
> > > > > > [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> > > > > > [  121.243012]  ? __process_new_adapter+0x20/0x20
> > > > > > [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> > > > > > [  121.243012]  i2c_register_driver+0x30/0x80
> > > > > > [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> > > > > > [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> > > > > > [  121.243012]  do_one_initcall+0x33/0x1a0
> > > > > > [  121.243012]  ? parse_args+0x1eb/0x3d0
> > > > > > [  121.243012]  ? __might_sleep+0x31/0x90
> > > > > > [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> > > > > > [  121.243012]  kernel_init_freeable+0x12c/0x17f
> > > > > > [  121.243012]  ? rest_init+0x110/0x110
> > > > > > [  121.243012]  kernel_init+0xb/0x100
> > > > > > [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> > > > > > [  121.243012]  ret_from_fork+0x19/0x24
> > > > > > [  121.243012] Modules linked in:
> > > > > > [  121.243012] CR2: 0000000000000000
> > > > > > [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> > > > > > [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> > > > > > [  121.243012] EIP: strcmp+0x11/0x30
> > > > >
> > > > > How did this driver ever work for you?
> > > >
> > > > i ask my coworker help me verify.
> > > > i will check the patch myself, sincerely apologies for this.
> > >
> > > What does this mean?
> > >
> > > Are you saying that for all 10 versions of this patch submission, it
> > > has never been tested?  And despite being authored by you and
> > > submitted by you, you have never actually boot tested the driver
> > > yourself?  Relying instead on your co-worker to conduct the testing,
> > > who failed to do so.  Is that really correct?
> > >
> >
> > On carefully reading to the document how to upstream, I find that I
> > had full duty for verify patch i sent.
> > The fault is entirely mine and I deeply regret that it should have occurred.
> > I will always verify patch by meself before sending it.
> > I have already verfied sub-device adc/led/regulator done in Mediatek
> > phone and Hikey960 development board
>
> I'm not looking for someone to blame.  Instead, I would like to
> ascertain how this happened.  How was this driver ever
> tested/verified?  If you're not going to run/use it, does it even need
> to exist?
>

There is difference between upstream and commerical driver.
We will sync upstream version after upstream done, in order to become
common driver everyone can easy to use

> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
Lee Jones June 16, 2020, 8:28 a.m. UTC | #9
On Mon, 08 Jun 2020, Gene Chen wrote:

> From: Gene Chen <gene_chen@richtek.com>
> 
> accidentally remove driver name when
> replace probe by probe_new in add mt6360 mfd driver patch v4
> 
> [  121.243012] EAX: c2a8bc64 EBX: 00000000 ECX: 00000000 EDX: 00000000
> [  121.243012] ESI: c2a8bc79 EDI: 00000000 EBP: e54bdea8 ESP: e54bdea0
> [  121.243012] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
> [  121.243012] CR0: 80050033 CR2: 00000000 CR3: 02ec3000 CR4: 000006b0
> [  121.243012] Call Trace:
> [  121.243012]  kset_find_obj+0x3d/0xc0
> [  121.243012]  driver_find+0x16/0x40
> [  121.243012]  driver_register+0x49/0x100
> [  121.243012]  ? i2c_for_each_dev+0x39/0x50
> [  121.243012]  ? __process_new_adapter+0x20/0x20
> [  121.243012]  ? cht_wc_driver_init+0x11/0x11
> [  121.243012]  i2c_register_driver+0x30/0x80
> [  121.243012]  ? intel_lpss_pci_driver_init+0x16/0x16
> [  121.243012]  mt6360_pmu_driver_init+0xf/0x11
> [  121.243012]  do_one_initcall+0x33/0x1a0
> [  121.243012]  ? parse_args+0x1eb/0x3d0
> [  121.243012]  ? __might_sleep+0x31/0x90
> [  121.243012]  ? kernel_init_freeable+0x10a/0x17f
> [  121.243012]  kernel_init_freeable+0x12c/0x17f
> [  121.243012]  ? rest_init+0x110/0x110
> [  121.243012]  kernel_init+0xb/0x100
> [  121.243012]  ? schedule_tail_wrapper+0x9/0xc
> [  121.243012]  ret_from_fork+0x19/0x24
> [  121.243012] Modules linked in:
> [  121.243012] CR2: 0000000000000000
> [  121.243012] random: get_random_bytes called from init_oops_id+0x3a/0x40 with crng_init=0
> [  121.243012] ---[ end trace 38a803400f1a2bee ]---
> [  121.243012] EIP: strcmp+0x11/0x30
> 
> Signed-off-by: Gene Chen <gene_chen@richtek.com>
> ---
>  drivers/mfd/mt6360-core.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
index db8cdf5..e9cacc2 100644
--- a/drivers/mfd/mt6360-core.c
+++ b/drivers/mfd/mt6360-core.c
@@ -412,6 +412,7 @@  MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id);
 
 static struct i2c_driver mt6360_pmu_driver = {
 	.driver = {
+		.name = "mt6360_pmu",
 		.pm = &mt6360_pmu_pm_ops,
 		.of_match_table = of_match_ptr(mt6360_pmu_of_id),
 	},