[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171204191522.dcwclu7v7fig65nc@mwanda>
Date: Mon, 4 Dec 2017 22:15:22 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Marcus Wolf <marcus.wolf@...rthome-wolf.de>
Cc: Simon Sandström <simon@...anor.nu>,
devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
linux@...f-Entwicklungen.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in
rf69_enum.h
On Mon, Dec 04, 2017 at 08:37:51PM +0200, Marcus Wolf wrote:
>
>
> Am 04.12.2017 um 12:37 schrieb Dan Carpenter:
> > On Mon, Dec 04, 2017 at 01:17:37PM +0300, Dan Carpenter wrote:
> > > Perhaps choose different function names if you want? You could do it
> > > as several patches:
> > >
> > > patch 1: change types to bool
> > > patch 2: sed -e '/ == optionOn//'
> > > patch 3: split the functions into two functions
> > > patch 4: delete optionOnOff enum
> > >
> > > patches 1 and 2 could be merged together (your choice).
> > >
> >
> > Markus says that optionOn is used by user space so my you won't be able
> > to remove these entirely. But as much as possible we should internally.
> >
> > regards,
> > dan carpenter
> >
>
> Hi Dan, hi Simon,
>
> I think, it's a pretty nice idea to remove th optionOnOff and replace it by
> bool.
>
> <history>
> In former times, the variables in the config struct had very different names
> - not containing "enable". Therefore optionOnOff was used to make absolutely
> clear (in user space), wheter something was switched on, or off.
> Now the variable have nice names, so bool is fine, even better now :-)
> </history>
>
> I would suggest not to split the amp-functions but to rename them, to also
> contain an enable:
> rf69_set_amp_X_enable()
That's a bad name, because it doesn't just enable it also disables.
Please split them.
regards,
dan carpenter
Powered by blists - more mailing lists