All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-01 12:38 ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-01 12:38 UTC (permalink / raw)
  To: Baolin Wang, Jörg Rödel, iommu; +Cc: kernel-janitors, linux-kernel

> Optimize the error handling to free the resources correctly when
> failed to allocate an iommu group.

* I would not categorise the desired completion of exception handling
  as a software optimisation.

* Would you like to add the tag “Fixes” to the commit message?

* I suggest to avoid the specification of duplicate function calls.
  Will it be helpful to add a few jump targets?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455

Regards,
Markus

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

* Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-01 12:38 ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-01 12:38 UTC (permalink / raw)
  To: Baolin Wang, Jörg Rödel, iommu; +Cc: kernel-janitors, linux-kernel

> Optimize the error handling to free the resources correctly when
> failed to allocate an iommu group.

* I would not categorise the desired completion of exception handling
  as a software optimisation.

* Would you like to add the tag “Fixes” to the commit message?

* I suggest to avoid the specification of duplicate function calls.
  Will it be helpful to add a few jump targets?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455

Regards,
Markus

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

* Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-01 12:38 ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-01 12:38 UTC (permalink / raw)
  To: Baolin Wang, Jörg Rödel, iommu; +Cc: kernel-janitors, linux-kernel

> Optimize the error handling to free the resources correctly when
> failed to allocate an iommu group.

* I would not categorise the desired completion of exception handling
  as a software optimisation.

* Would you like to add the tag “Fixes” to the commit message?

* I suggest to avoid the specification of duplicate function calls.
  Will it be helpful to add a few jump targets?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455

Regards,
Markus
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()
  2020-06-01 12:38 ` Markus Elfring
  (?)
@ 2020-06-02  1:50   ` Baolin Wang
  -1 siblings, 0 replies; 15+ messages in thread
From: Baolin Wang @ 2020-06-02  1:50 UTC (permalink / raw)
  To: Markus Elfring; +Cc: Jörg Rödel, iommu, kernel-janitors, linux-kernel

On Mon, Jun 01, 2020 at 02:38:05PM +0200, Markus Elfring wrote:
> > Optimize the error handling to free the resources correctly when
> > failed to allocate an iommu group.
> 
> * I would not categorise the desired completion of exception handling
>   as a software optimisation.
> 
> * Would you like to add the tag “Fixes” to the commit message?

Sure.

> 
> * I suggest to avoid the specification of duplicate function calls.
>   Will it be helpful to add a few jump targets?
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455

I don't think it is helpful or readable to add some jump targets here, since the exception handling is very simple here.


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

* Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  1:50   ` Baolin Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Baolin Wang @ 2020-06-02  1:50 UTC (permalink / raw)
  To: Markus Elfring; +Cc: kernel-janitors, iommu, linux-kernel

On Mon, Jun 01, 2020 at 02:38:05PM +0200, Markus Elfring wrote:
> > Optimize the error handling to free the resources correctly when
> > failed to allocate an iommu group.
> 
> * I would not categorise the desired completion of exception handling
>   as a software optimisation.
> 
> * Would you like to add the tag ¡°Fixes¡± to the commit message?

Sure.

> 
> * I suggest to avoid the specification of duplicate function calls.
>   Will it be helpful to add a few jump targets?
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455

I don't think it is helpful or readable to add some jump targets here, since the exception handling is very simple here.

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

* Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  1:50   ` Baolin Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Baolin Wang @ 2020-06-02  1:50 UTC (permalink / raw)
  To: Markus Elfring; +Cc: kernel-janitors, iommu, linux-kernel

On Mon, Jun 01, 2020 at 02:38:05PM +0200, Markus Elfring wrote:
> > Optimize the error handling to free the resources correctly when
> > failed to allocate an iommu group.
> 
> * I would not categorise the desired completion of exception handling
>   as a software optimisation.
> 
> * Would you like to add the tag “Fixes” to the commit message?

Sure.

> 
> * I suggest to avoid the specification of duplicate function calls.
>   Will it be helpful to add a few jump targets?
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455

I don't think it is helpful or readable to add some jump targets here, since the exception handling is very simple here.

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
  2020-06-02  1:50   ` Baolin Wang
  (?)
@ 2020-06-02  5:01     ` Markus Elfring
  -1 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-02  5:01 UTC (permalink / raw)
  To: Baolin Wang, iommu; +Cc: Jörg Rödel, kernel-janitors, linux-kernel

>> * I suggest to avoid the specification of duplicate function calls.
>>   Will it be helpful to add a few jump targets?
>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
>
> I don't think it is helpful or readable to add some jump targets here,
> since the exception handling is very simple here.

Do you disagree to the application of the Linux coding style then
for the recommended exception handling?

Regards,
Markus

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  5:01     ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-02  5:01 UTC (permalink / raw)
  To: Baolin Wang, iommu; +Cc: kernel-janitors, linux-kernel

>> * I suggest to avoid the specification of duplicate function calls.
>>   Will it be helpful to add a few jump targets?
>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
>
> I don't think it is helpful or readable to add some jump targets here,
> since the exception handling is very simple here.

Do you disagree to the application of the Linux coding style then
for the recommended exception handling?

Regards,
Markus

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  5:01     ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-02  5:01 UTC (permalink / raw)
  To: Baolin Wang, iommu; +Cc: kernel-janitors, linux-kernel

>> * I suggest to avoid the specification of duplicate function calls.
>>   Will it be helpful to add a few jump targets?
>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
>
> I don't think it is helpful or readable to add some jump targets here,
> since the exception handling is very simple here.

Do you disagree to the application of the Linux coding style then
for the recommended exception handling?

Regards,
Markus
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
  2020-06-02  5:01     ` Markus Elfring
  (?)
@ 2020-06-02  5:56       ` Baolin Wang
  -1 siblings, 0 replies; 15+ messages in thread
From: Baolin Wang @ 2020-06-02  5:56 UTC (permalink / raw)
  To: Markus Elfring; +Cc: iommu, Jörg Rödel, kernel-janitors, linux-kernel

On Tue, Jun 02, 2020 at 07:01:02AM +0200, Markus Elfring wrote:
> >> * I suggest to avoid the specification of duplicate function calls.
> >>   Will it be helpful to add a few jump targets?
> >>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
> >
> > I don't think it is helpful or readable to add some jump targets here,
> > since the exception handling is very simple here.
> 
> Do you disagree to the application of the Linux coding style then
> for the recommended exception handling?

No, that's not what I mean. My point is the exception handling in this
patch is simple and no need to add 'goto' statement which does not help
to improve readability. And I agree it is helpful for the cases where a
function exits from multiple locations and more same cleanup work need
to do.


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

* Re: iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  5:56       ` Baolin Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Baolin Wang @ 2020-06-02  5:56 UTC (permalink / raw)
  To: Markus Elfring; +Cc: iommu, kernel-janitors, linux-kernel

On Tue, Jun 02, 2020 at 07:01:02AM +0200, Markus Elfring wrote:
> >> * I suggest to avoid the specification of duplicate function calls.
> >>   Will it be helpful to add a few jump targets?
> >>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
> >
> > I don't think it is helpful or readable to add some jump targets here,
> > since the exception handling is very simple here.
> 
> Do you disagree to the application of the Linux coding style then
> for the recommended exception handling?

No, that's not what I mean. My point is the exception handling in this
patch is simple and no need to add 'goto' statement which does not help
to improve readability. And I agree it is helpful for the cases where a
function exits from multiple locations and more same cleanup work need
to do.

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  5:56       ` Baolin Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Baolin Wang @ 2020-06-02  5:56 UTC (permalink / raw)
  To: Markus Elfring; +Cc: iommu, kernel-janitors, linux-kernel

On Tue, Jun 02, 2020 at 07:01:02AM +0200, Markus Elfring wrote:
> >> * I suggest to avoid the specification of duplicate function calls.
> >>   Will it be helpful to add a few jump targets?
> >>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
> >
> > I don't think it is helpful or readable to add some jump targets here,
> > since the exception handling is very simple here.
> 
> Do you disagree to the application of the Linux coding style then
> for the recommended exception handling?

No, that's not what I mean. My point is the exception handling in this
patch is simple and no need to add 'goto' statement which does not help
to improve readability. And I agree it is helpful for the cases where a
function exits from multiple locations and more same cleanup work need
to do.

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
  2020-06-02  5:56       ` Baolin Wang
  (?)
@ 2020-06-02  7:06         ` Markus Elfring
  -1 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-02  7:06 UTC (permalink / raw)
  To: Baolin Wang, iommu; +Cc: Jörg Rödel, kernel-janitors, linux-kernel

>> Do you disagree to the application of the Linux coding style then
>> for the recommended exception handling?
>
> No, that's not what I mean. My point is the exception handling in this
> patch is simple and no need to add 'goto' statement which does not help
> to improve readability.

Do we come along different programming imaginations?


> And I agree it is helpful for the cases where a function exits from multiple locations
> and more same cleanup work need to do.

Can this view fit also to calls of the function “kobject_put”?
https://lore.kernel.org/patchwork/patch/1251326/
https://lore.kernel.org/linux-iommu/8bfd018ef4add083a35a6a94a8da045cf3af51b6.1591063271.git.baolin.wang@linux.alibaba.com/
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/iommu.c?id=7cc31613734c4870ae32f5265d576ef296621343#n478
https://elixir.bootlin.com/linux/v5.7/source/drivers/iommu/iommu.c#L478

Regards,
Markus

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  7:06         ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-02  7:06 UTC (permalink / raw)
  To: Baolin Wang, iommu; +Cc: kernel-janitors, linux-kernel

>> Do you disagree to the application of the Linux coding style then
>> for the recommended exception handling?
>
> No, that's not what I mean. My point is the exception handling in this
> patch is simple and no need to add 'goto' statement which does not help
> to improve readability.

Do we come along different programming imaginations?


> And I agree it is helpful for the cases where a function exits from multiple locations
> and more same cleanup work need to do.

Can this view fit also to calls of the function “kobject_put”?
https://lore.kernel.org/patchwork/patch/1251326/
https://lore.kernel.org/linux-iommu/8bfd018ef4add083a35a6a94a8da045cf3af51b6.1591063271.git.baolin.wang@linux.alibaba.com/
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/iommu.c?id=7cc31613734c4870ae32f5265d576ef296621343#n478
https://elixir.bootlin.com/linux/v5.7/source/drivers/iommu/iommu.c#L478

Regards,
Markus

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

* Re: iommu: Improve exception handling in iommu_group_alloc()
@ 2020-06-02  7:06         ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2020-06-02  7:06 UTC (permalink / raw)
  To: Baolin Wang, iommu; +Cc: kernel-janitors, linux-kernel

>> Do you disagree to the application of the Linux coding style then
>> for the recommended exception handling?
>
> No, that's not what I mean. My point is the exception handling in this
> patch is simple and no need to add 'goto' statement which does not help
> to improve readability.

Do we come along different programming imaginations?


> And I agree it is helpful for the cases where a function exits from multiple locations
> and more same cleanup work need to do.

Can this view fit also to calls of the function “kobject_put”?
https://lore.kernel.org/patchwork/patch/1251326/
https://lore.kernel.org/linux-iommu/8bfd018ef4add083a35a6a94a8da045cf3af51b6.1591063271.git.baolin.wang@linux.alibaba.com/
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/iommu.c?id=7cc31613734c4870ae32f5265d576ef296621343#n478
https://elixir.bootlin.com/linux/v5.7/source/drivers/iommu/iommu.c#L478

Regards,
Markus
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-06-02  7:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 12:38 [PATCH] iommu: Improve exception handling in iommu_group_alloc() Markus Elfring
2020-06-01 12:38 ` Markus Elfring
2020-06-01 12:38 ` Markus Elfring
2020-06-02  1:50 ` Baolin Wang
2020-06-02  1:50   ` Baolin Wang
2020-06-02  1:50   ` Baolin Wang
2020-06-02  5:01   ` Markus Elfring
2020-06-02  5:01     ` Markus Elfring
2020-06-02  5:01     ` Markus Elfring
2020-06-02  5:56     ` Baolin Wang
2020-06-02  5:56       ` Baolin Wang
2020-06-02  5:56       ` Baolin Wang
2020-06-02  7:06       ` Markus Elfring
2020-06-02  7:06         ` Markus Elfring
2020-06-02  7:06         ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.