All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Baolin Wang <baolin.wang@linux.alibaba.com>,
	iommu@lists.linux-foundation.org
Cc: "Jörg Rödel" <joro@8bytes.org>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: iommu: Improve exception handling in iommu_group_alloc()
Date: Tue, 2 Jun 2020 09:06:12 +0200	[thread overview]
Message-ID: <44b4a048-ef36-f75b-5869-22e5fe4b15d2@web.de> (raw)
In-Reply-To: <20200602055639.GB89266@VM20190228-100.tbsite.net>

>> 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

WARNING: multiple messages have this Message-ID (diff)
From: Markus Elfring <Markus.Elfring@web.de>
To: Baolin Wang <baolin.wang@linux.alibaba.com>,
	iommu@lists.linux-foundation.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: iommu: Improve exception handling in iommu_group_alloc()
Date: Tue, 02 Jun 2020 07:06:12 +0000	[thread overview]
Message-ID: <44b4a048-ef36-f75b-5869-22e5fe4b15d2@web.de> (raw)
In-Reply-To: <20200602055639.GB89266@VM20190228-100.tbsite.net>

>> 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

WARNING: multiple messages have this Message-ID (diff)
From: Markus Elfring <Markus.Elfring@web.de>
To: Baolin Wang <baolin.wang@linux.alibaba.com>,
	iommu@lists.linux-foundation.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: iommu: Improve exception handling in iommu_group_alloc()
Date: Tue, 2 Jun 2020 09:06:12 +0200	[thread overview]
Message-ID: <44b4a048-ef36-f75b-5869-22e5fe4b15d2@web.de> (raw)
In-Reply-To: <20200602055639.GB89266@VM20190228-100.tbsite.net>

>> 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

  reply	other threads:[~2020-06-02  7:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-06-02  7:06         ` Markus Elfring
2020-06-02  7:06         ` Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44b4a048-ef36-f75b-5869-22e5fe4b15d2@web.de \
    --to=markus.elfring@web.de \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.