From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20190107105214.GA31559@kroah.com> <20190107130314.GD3200@kadam> <20190114105123.GA22496@kadam> <20190114123727.GE4504@kadam> In-Reply-To: <20190114123727.GE4504@kadam> From: Himadri Pandya Date: Tue, 15 Jan 2019 13:33:08 +0530 Message-ID: Subject: Re: rtl8192e: need help with variable naming convention Content-Type: multipart/alternative; boundary="0000000000004c8db7057f7a98e9" List-ID: To: Dan Carpenter Cc: Greg KH , driverdev-devel@linuxdriverproject.org --0000000000004c8db7057f7a98e9 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 14, 2019 at 6:07 PM Dan Carpenter wrote: > On Mon, Jan 14, 2019 at 05:39:24PM +0530, Himadri Pandya wrote: > > On Mon, 14 Jan, 2019, 4:21 PM Dan Carpenter wrote: > > > > Naming is hard. Having "_array" in the name isn't great either. It's > > > normally obvious it's an array because of the [] characters. > > > > > > > Okay. How about renaming it to "_list[ ]" ? But I'm not sure if calling > it > > a list will introduce redundancy or increase readability by showing we're > > implementing a list with an array? > > _list is fine. Or _array is fine, really. Even channal_plan[] seems > Ok to me. Something that mentions region, perhaps? It's all fine. > Alright. keeping it _array then. > > So long as you're thinking about naming and trying to say something > then it's probably fine. We're not trying to be ogres or to reject > patches. > It's fine. In fact, I really appreciate your remarks. It helped me in better understanding significance of meaningful variable names. Thank you. - Himadri --0000000000004c8db7057f7a98e9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jan 14, 2019 at 6:07 PM Dan Carpenter <dan.carpenter@oracle.com> wrote= :
On Mon, Jan 14= , 2019 at 05:39:24PM +0530, Himadri Pandya wrote:
> On Mon, 14 Jan, 2019, 4:21 PM Dan Carpenter <dan.carpenter@oracle.com wrote:=
>
> Naming is hard.=C2=A0 Having "_array" in the name isn't = great either.=C2=A0 It's
> > normally obvious it's an array because of the [] characters.<= br> > >
>
> Okay. How about renaming it to "_list[ ]" ? But I'm not = sure if calling it
> a list will introduce redundancy or increase readability by showing we= 're
> implementing a list with an array?

_list is fine.=C2=A0 Or _array is fine, really.=C2=A0 Even channal_plan[] s= eems
Ok to me.=C2=A0 Something that mentions region, perhaps?=C2=A0 It's all= fine.

Alright. keeping it _array then.=
=C2=A0

So long as you're thinking about naming and trying to say something
then it's probably fine.=C2=A0 We're not trying to be ogres or to r= eject
patches.
=C2=A0
It's fine. In fact, = I really appreciate your remarks. It helped me in better understanding sign= ificance of meaningful variable names. Thank you.=C2=A0

- Himadri
--0000000000004c8db7057f7a98e9--