Skip to contentSkip to conversation

staging:iio:light: Add some missing brackets to make sure code works as intended. Note this is not a bug due to the fact the region cannot be reached without the sanity check passing. The autobuilder reported it as missaligned code which is kind of true as well.

PATCH In review Jonathan Cameron 2 participants 3 messages May 2, 2015 – May 3, 2015

Subsystems (3)
lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 staging:iio:light: Add some missing brackets to make sure code works as intended. Note this is not a bug due to the fact the region cannot be reached without the sanity check passing. The autobuilder reported it as missaligned code which is kind of true as well.

---
 drivers/staging/iio/light/isl29018.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/iio/light/isl29018.c +2 -1
index 08ca9a4172e3..e646c5d24004 100644
@@ -369,12 +369,13 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
 		}
 		break;
 	case IIO_CHAN_INFO_INT_TIME:
-		if (chan->type == IIO_LIGHT)
+		if (chan->type == IIO_LIGHT) {
 			if (val != 0) {
 				mutex_unlock(&chip->lock);
 				return -EINVAL;
 			}
 			ret = isl29018_set_integration_time(chip, val2);
+		}
 		break;
 	case IIO_CHAN_INFO_SCALE:
 		if (chan->type == IIO_LIGHT)
Signature · 1 line
2.3.5
#1 lore raw

This looks good to me. Anyhow, we need a newline somewhere in the commit subject.

Quoted 32 lines · Jonathan Cameron
---
 drivers/staging/iio/light/isl29018.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/iio/light/isl29018.c +2 -2
index 08ca9a4172e3..e646c5d24004 100644
@@ -369,12 +369,13 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
                }
                break;
        case IIO_CHAN_INFO_INT_TIME:
-               if (chan->type == IIO_LIGHT)
+               if (chan->type == IIO_LIGHT) {
                        if (val != 0) {
                                mutex_unlock(&chip->lock);
                                return -EINVAL;
                        }
                        ret = isl29018_set_integration_time(chip, val2);
+               }
                break;
        case IIO_CHAN_INFO_SCALE:
                if (chan->type == IIO_LIGHT)
--

2.3.5

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

author maintainer
#2 lore raw
Quoted 2 lines · Daniel Baluta

This looks good to me. Anyhow, we need a newline somewhere in the commit subject.

Yeah, I messed that up. Anyhow, applied with an appropriate new line to the togreg branch of iio.git.

Thanks,

J

Quoted 39 lines · Jonathan Cameron
Quoted 28 lines
---
 drivers/staging/iio/light/isl29018.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/iio/light/isl29018.c +2 -2
index 08ca9a4172e3..e646c5d24004 100644
@@ -369,12 +369,13 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
                }
                break;
        case IIO_CHAN_INFO_INT_TIME:
-               if (chan->type == IIO_LIGHT)
+               if (chan->type == IIO_LIGHT) {
                        if (val != 0) {
                                mutex_unlock(&chip->lock);
                                return -EINVAL;
                        }
                        ret = isl29018_set_integration_time(chip, val2);
+               }
                break;
        case IIO_CHAN_INFO_SCALE:
                if (chan->type == IIO_LIGHT)
--

2.3.5

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html