linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Stephen Boyd <sboyd@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	kernel-janitors@vger.kernel.org, linux-clk@vger.kernel.org,
	cocci@inria.fr, Claudiu Beznea <claudiu.beznea@microchip.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH resent] clk: at91: sama7g5: Add two jump labels in sama7g5_pmc_setup()
Date: Wed, 29 Mar 2023 00:02:59 +0200	[thread overview]
Message-ID: <202303282202593dfa4106@mail.local> (raw)
In-Reply-To: <7985ac57-5b33-e7df-f319-ad6ee0788e2c@web.de>

On 28/03/2023 21:24:00+0200, Markus Elfring wrote:
> >> The label “err_free” was used to jump to another pointer check despite of
> >> the detail in the implementation of the function “sama7g5_pmc_setup”
> >> that it was determined already that the corresponding variable contained
> >> a null pointer (because of a failed memory allocation).
> >>
> >> * Thus use additional labels.
> >>
> >> * Delete an extra pointer check at the end which became unnecessary
> >>    with this refactoring.
> >>
> >> This issue was detected by using the Coccinelle software.
> >
> > Fine, but I'm sorry that it complexity the function for no real value.
> 
> Under which circumstances can advice be taken better into account
> also from another information source?
> https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources#MEM12C.Considerusingagotochainwhenleavingafunctiononerrorwhenusingandreleasingresources-CompliantSolution%28POSIX,GotoChain%29
> 
> 
> 
> > Other clk drivers have the same pattern so I want them to all stay the same.
> > This is a NACK, sorry about that.
> 
> I am curious if other contributors (or code reviewers) would like to influence
> the software situation a bit more.
> 

I agree with Nicolas here, this is useless churn.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-03-28 22:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f9303bdc-b1a7-be5e-56c6-dfa8232b8b55@web.de>
     [not found] ` <5ed1bc78-77a1-8eb8-43f9-6005d7de49c8@web.de>
2023-03-25 14:05   ` [PATCH resent] clk: at91: sama7g5: Add two jump labels in sama7g5_pmc_setup() Markus Elfring
2023-03-28  8:30     ` Nicolas Ferre
2023-03-28 19:24       ` Markus Elfring
2023-03-28 22:02         ` Alexandre Belloni [this message]
     [not found] ` <8f785de5-ebe2-edd9-2155-f440acacc643@web.de>
2023-04-05 20:10   ` [PATCH] firmware: ti_sci: Fix exception handling in ti_sci_probe() Markus Elfring
2023-05-16 15:20     ` [cocci] " Nishanth Menon
2023-05-16 15:56       ` [cocci] " Markus Elfring
2023-05-17  6:43       ` [cocci] [PATCH] " Dan Carpenter
2023-04-06 20:12   ` [PATCH] remoteproc: imx_dsp_rproc: Improve exception handling in imx_dsp_rproc_mbox_alloc() Markus Elfring
2023-04-10 17:44     ` Mathieu Poirier
2023-04-07  6:22   ` [PATCH] spi: atmel: Improve exception handling in atmel_spi_configure_dma() Markus Elfring
2023-04-07  7:54     ` Nicolas Ferre
2023-04-07 15:07       ` 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=202303282202593dfa4106@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=Markus.Elfring@web.de \
    --cc=claudiu.beznea@microchip.com \
    --cc=cocci@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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 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).