diff mbox

[v3,1/3] iio: accel: mma8452: Rename structs holding event configuration registers to more appropriate names.

Message ID 1506336008-4480-2-git-send-email-harinath922@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Harinath Nampally Sept. 25, 2017, 10:40 a.m. UTC
Improves code readability, no impact on functionality.

Signed-off-by: Harinath Nampally <harinath922@gmail.com>
---
 drivers/iio/accel/mma8452.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Martin Kepplinger Sept. 27, 2017, 6:52 a.m. UTC | #1
Am 25.09.2017 12:40 schrieb Harinath Nampally:
> Improves code readability, no impact on functionality.
> 
> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
> ---

I'd prefer a shorter subject line here too, see patch 2/3.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jonathan Cameron Sept. 30, 2017, 5:59 p.m. UTC | #2
On Wed, 27 Sep 2017 08:52:54 +0200
Martin Kepplinger <martink@posteo.de> wrote:

> Am 25.09.2017 12:40 schrieb Harinath Nampally:
> > Improves code readability, no impact on functionality.
> > 
> > Signed-off-by: Harinath Nampally <harinath922@gmail.com>
> > ---  
> 
> I'd prefer a shorter subject line here too, see patch 2/3

Agreed.  I'm unconvinced the change helps.  Perhaps that is
because I don't fully understand why you are making the change?

Thanks,

Jonathan

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin Kepplinger Oct. 1, 2017, 6:10 p.m. UTC | #3
On 2017-09-30 19:59, Jonathan Cameron wrote:
> On Wed, 27 Sep 2017 08:52:54 +0200
> Martin Kepplinger <martink@posteo.de> wrote:
> 
>> Am 25.09.2017 12:40 schrieb Harinath Nampally:
>>> Improves code readability, no impact on functionality.
>>>
>>> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
>>> ---  
>>
>> I'd prefer a shorter subject line here too, see patch 2/3
> 
> Agreed.  I'm unconvinced the change helps.  Perhaps that is
> because I don't fully understand why you are making the change?
> 

It's understandable for me. It simply uses "transient" and "ff_mt" in
order to describe sets of device-registers instead of "rising" and
"falling". That's more appropriate. I'd apply this if possible.

Even though it should be clear after reading the data sheet, this
particular issue sometimes gets confusing for people. Maybe a short
descriptive comment, pointing to the data sheet, would make sense?

                      martin
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jonathan Cameron Oct. 2, 2017, 10:35 a.m. UTC | #4
On Sun, 1 Oct 2017 20:10:49 +0200
Martin Kepplinger <martink@posteo.de> wrote:

> On 2017-09-30 19:59, Jonathan Cameron wrote:
> > On Wed, 27 Sep 2017 08:52:54 +0200
> > Martin Kepplinger <martink@posteo.de> wrote:
> >   
> >> Am 25.09.2017 12:40 schrieb Harinath Nampally:  
> >>> Improves code readability, no impact on functionality.
> >>>
> >>> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
> >>> ---    
> >>
> >> I'd prefer a shorter subject line here too, see patch 2/3  
> > 
> > Agreed.  I'm unconvinced the change helps.  Perhaps that is
> > because I don't fully understand why you are making the change?
> >   
> 
> It's understandable for me. It simply uses "transient" and "ff_mt" in
> order to describe sets of device-registers instead of "rising" and
> "falling". That's more appropriate. I'd apply this if possible.
> 
> Even though it should be clear after reading the data sheet, this
> particular issue sometimes gets confusing for people. Maybe a short
> descriptive comment, pointing to the data sheet, would make sense?
> 

With the addition of some description, this should be fine.

Thanks,

Jonathan

>                       martin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Harinath Nampally Oct. 3, 2017, 2:57 a.m. UTC | #5
> > On 2017-09-30 19:59, Jonathan Cameron wrote:
> > > On Wed, 27 Sep 2017 08:52:54 +0200
> > > Martin Kepplinger <martink@posteo.de> wrote:
> > >
> > >> Am 25.09.2017 12:40 schrieb Harinath Nampally:
> > >>> Improves code readability, no impact on functionality.
> > >>>
> > >>> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
> > >>> ---
> > >>
> > >> I'd prefer a shorter subject line here too, see patch 2/3
> > >
> > > Agreed.  I'm unconvinced the change helps.  Perhaps that is
> > > because I don't fully understand why you are making the change?
> > >
> >
> > It's understandable for me. It simply uses "transient" and "ff_mt" in
> > order to describe sets of device-registers instead of "rising" and
> > "falling". That's more appropriate. I'd apply this if possible.
> >
> > Even though it should be clear after reading the data sheet, this
> > particular issue sometimes gets confusing for people. Maybe a short
> > descriptive comment, pointing to the data sheet, would make sense?
> >
>
> With the addition of some description, this should be fine.
Sure will do.

Thanks,
Harinath

On Mon, Oct 2, 2017 at 6:35 AM, Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
> On Sun, 1 Oct 2017 20:10:49 +0200
> Martin Kepplinger <martink@posteo.de> wrote:
>
>> On 2017-09-30 19:59, Jonathan Cameron wrote:
>> > On Wed, 27 Sep 2017 08:52:54 +0200
>> > Martin Kepplinger <martink@posteo.de> wrote:
>> >
>> >> Am 25.09.2017 12:40 schrieb Harinath Nampally:
>> >>> Improves code readability, no impact on functionality.
>> >>>
>> >>> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
>> >>> ---
>> >>
>> >> I'd prefer a shorter subject line here too, see patch 2/3
>> >
>> > Agreed.  I'm unconvinced the change helps.  Perhaps that is
>> > because I don't fully understand why you are making the change?
>> >
>>
>> It's understandable for me. It simply uses "transient" and "ff_mt" in
>> order to describe sets of device-registers instead of "rising" and
>> "falling". That's more appropriate. I'd apply this if possible.
>>
>> Even though it should be clear after reading the data sheet, this
>> particular issue sometimes gets confusing for people. Maybe a short
>> descriptive comment, pointing to the data sheet, would make sense?
>>
>
> With the addition of some description, this should be fine.
>
> Thanks,
>
> Jonathan
>
>>                       martin
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 6194169..3472e7e 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -135,7 +135,7 @@  struct mma8452_event_regs {
 		u8 ev_count;
 };
 
-static const struct mma8452_event_regs ev_regs_accel_falling = {
+static const struct mma8452_event_regs ff_mt_ev_regs = {
 		.ev_cfg = MMA8452_FF_MT_CFG,
 		.ev_cfg_ele = MMA8452_FF_MT_CFG_ELE,
 		.ev_cfg_chan_shift = MMA8452_FF_MT_CHAN_SHIFT,
@@ -145,7 +145,7 @@  static const struct mma8452_event_regs ev_regs_accel_falling = {
 		.ev_count = MMA8452_FF_MT_COUNT
 };
 
-static const struct mma8452_event_regs ev_regs_accel_rising = {
+static const struct mma8452_event_regs trans_ev_regs = {
 		.ev_cfg = MMA8452_TRANSIENT_CFG,
 		.ev_cfg_ele = MMA8452_TRANSIENT_CFG_ELE,
 		.ev_cfg_chan_shift = MMA8452_TRANSIENT_CHAN_SHIFT,
@@ -777,12 +777,12 @@  static int mma8452_get_event_regs(struct mma8452_data *data,
 					& MMA8452_INT_TRANS) &&
 				(data->chip_info->enabled_events
 					& MMA8452_INT_TRANS))
-				*ev_reg = &ev_regs_accel_rising;
+				*ev_reg = &trans_ev_regs;
 			else
-				*ev_reg = &ev_regs_accel_falling;
+				*ev_reg = &ff_mt_ev_regs;
 			return 0;
 		case IIO_EV_DIR_FALLING:
-			*ev_reg = &ev_regs_accel_falling;
+			*ev_reg = &ff_mt_ev_regs;
 			return 0;
 		default:
 			return -EINVAL;