All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: outreachy-kernel@googlegroups.com,
	David Kershner <david.kershner@unisys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	sparmaintainer@unisys.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Outreachy kernel] Re: [PATCH v7] staging: unisys: visorhba: Convert module from IDR to XArray
Date: Tue, 04 May 2021 16:38:11 +0200	[thread overview]
Message-ID: <810075373.q0sU067TuV@linux.local> (raw)
In-Reply-To: <20210504140119.GH1847222@casper.infradead.org>

On Tuesday, May 4, 2021 4:01:19 PM CEST Matthew Wilcox wrote:
> On Tue, May 04, 2021 at 03:58:02PM +0200, Fabio M. De Francesco wrote:
> > On Tuesday, May 4, 2021 3:42:16 PM CEST Matthew Wilcox wrote:
> > > On Tue, May 04, 2021 at 03:32:53PM +0200, Fabio M. De Francesco wrote:
> > > > Changes from v6; Added a call to xa_destroy() that I had forgotten.
> > > 
> > > What?  No!  Go back and re-read what I wrote about this previously.
> > 
> > I remember that explanation you gave me some days ago for not using it. 
But I
> > was mislead by a comment ("Do we not have to call xa_destroy()?") by Dan 
and
> > your "Correct" soon after the above comment. So I thought that I had
> > misunderstand and the put back that call to xa_destroy(). I lost something 
in
> > following the flow of the reviews, I suppose.
> 
> English doesn't have the equivalent of the French 'si' or German 'doch',
> unfortunately.  I imagine Italian does.
>
Yes, Italian does :-) Despite this, I still think that English is less prone 
to give raise to misunderstandings (obviously, if_and_only_if one knows how to 
use the language).

Back to the style of the code... in particular to (1) avoid unnecessary 
'else', and to (2) check for failure (i.e., not for success) (3) don't 
(always) trust checkpatch.pl because often people don't want their code 
changed according to its output.

Start with (3): Steven Rostedt refused to apply a patch that I did upon a  
checkpatch warning: "replace "unsigned" with "unsigned int". He says he's 
perfectly comfortable with 'unsigned' and that he _prefers_ 'unsigned'. That's 
OK, I think; no problem.

As far as (1) and (2) are regarded, I've been told that when one modifies code 
she/he should not diverge from the style of the subsystem/driver maintainer/
author. If you look at visorhba_main.c, you'll find a lot of unnecessary 
'else' and 'if (success)'...

So what are the general rules one should follow when changing (trivial) Linux 
code? Please note that my question has no other (hidden) purposes than 
learning to work properly with the Linux community and to reduce the 
unnecessary noise consequential to submitting a high number of patch versions.

Thanks a lot for any help,

Fabio




  reply	other threads:[~2021-05-04 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 13:32 [PATCH v7] staging: unisys: visorhba: Convert module from IDR to XArray Fabio M. De Francesco
2021-05-04 13:42 ` Matthew Wilcox
2021-05-04 13:58   ` Fabio M. De Francesco
2021-05-04 14:01     ` [Outreachy kernel] " Matthew Wilcox
2021-05-04 14:38       ` Fabio M. De Francesco [this message]
2021-05-04 15:46         ` Greg Kroah-Hartman
2021-05-04 13:46 ` Dan Carpenter

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=810075373.q0sU067TuV@linux.local \
    --to=fmdefrancesco@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel@ffwll.ch \
    --cc=david.kershner@unisys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sparmaintainer@unisys.com \
    --cc=willy@infradead.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.