public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: scsi: ses: Move a label in ses_enclosure_data_process()
Date: Sun, 31 Dec 2023 09:07:59 -0500	[thread overview]
Message-ID: <775642a320f7dae53d70610f265056bcdfd8ab13.camel@linux.ibm.com> (raw)
In-Reply-To: <38dfe7b6-6d8b-4056-9943-12197c80f4d7@web.de>

On Sat, 2023-12-30 at 15:25 +0100, Markus Elfring wrote:
> > > If you would dare to follow advice from goto chains in a strict
> > > way, I imagine that you can tend to stress the attention for more
> > > useful data processing a bit more than such a redundant function
> > > call.
> > 
> > It's about maintainability and simplicity.  Eliminating kfree(NULL)
> > doesn't simplify most code,
> 
> I find it easy to avoid such a call in the affected and concrete
> function implementation.

I find it easy to fall down stairs nowadays; that doesn't make it a
necessary or even desirable thing to do.

> >                             it just makes the exit paths more
> > complex
> 
> Where is undesirable software complexity here in the repositioning
> of the label “simple_populate” before the statement “buf = NULL;”?

We don't just apply patches because we can: code churn is inimical to
software maintenance and backporting, so every patch has an application
cost.  The value provided by any patch has to be greater than that
cost. kfree(NULL) is an expected operation so there's little value in
avoiding it and certainly not enough to overcome the patch application
cost.

James


      reply	other threads:[~2023-12-31 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 14:48 [PATCH] scsi: ses: Move a label in ses_enclosure_data_process() Markus Elfring
2023-12-29 17:21 ` James Bottomley
2023-12-29 17:29   ` Julia Lawall
2023-12-30  7:04   ` Markus Elfring
2023-12-30 12:41     ` James Bottomley
2023-12-30 13:36       ` Markus Elfring
2023-12-30 13:45         ` James Bottomley
2023-12-30 14:25           ` Markus Elfring
2023-12-31 14:07             ` James Bottomley [this message]

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=775642a320f7dae53d70610f265056bcdfd8ab13.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=Markus.Elfring@web.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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