diff mbox series

[v2,4/7] iio: chemical: bme680: change MSK->MASK in #defines

Message ID 20180815203835.21079-5-dpfrey@gmail.com (mailing list archive)
State New, archived
Headers show
Series bme680 cleanup | expand

Commit Message

David Frey Aug. 15, 2018, 8:38 p.m. UTC
Convert all defines to use "MASK" instead of a mix of "MSK" and "MASK"

Signed-off-by: David Frey <dpfrey@gmail.com>
---
 drivers/iio/chemical/bme680.h      | 6 +++---
 drivers/iio/chemical/bme680_core.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

David Frey Aug. 15, 2018, 9:03 p.m. UTC | #1
On 8/15/2018 1:38 PM, David Frey wrote:

<snip>

> diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c
> index 49bb6b84f181..d62cb88af481 100644
> --- a/drivers/iio/chemical/bme680_core.c
> +++ b/drivers/iio/chemical/bme680_core.c

When splitting the patches apart, I screwed this one up slightly.  The 
patch should also include this hunk:

> @@ -206,7 +206,7 @@ static int bme680_read_calib(struct bme680_data *data,
>                 return ret;
>         }
>         calib->par_h1 = (tmp_msb << BME680_HUM_REG_SHIFT_VAL) |
> -                       (tmp_lsb & BME680_BIT_H1_DATA_MSK);
> +                       (tmp_lsb & BME680_BIT_H1_DATA_MASK);
> 
>         ret = regmap_read(data->regmap, BME680_H2_MSB_REG, &tmp_msb);
>         if (ret < 0) {

What is the correct course of action in the situation?  Should I resend 
just this one patch immediately?  Would it get a new version number 
"[PATCH v3 4/7]"?  I think the version number refers to the whole patch 
series, so it seems wrong to bump the revision of one patch and not 
transmit the whole series.

Thanks,
David Frey
Himanshu Jha Aug. 16, 2018, 6:17 a.m. UTC | #2
On Wed, Aug 15, 2018 at 02:03:31PM -0700, David Frey wrote:
> On 8/15/2018 1:38 PM, David Frey wrote:
> 
> <snip>
> 
> > diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c
> > index 49bb6b84f181..d62cb88af481 100644
> > --- a/drivers/iio/chemical/bme680_core.c
> > +++ b/drivers/iio/chemical/bme680_core.c
> 
> When splitting the patches apart, I screwed this one up slightly.  The patch
> should also include this hunk:
> 
> > @@ -206,7 +206,7 @@ static int bme680_read_calib(struct bme680_data *data,
> >                 return ret;
> >         }
> >         calib->par_h1 = (tmp_msb << BME680_HUM_REG_SHIFT_VAL) |
> > -                       (tmp_lsb & BME680_BIT_H1_DATA_MSK);
> > +                       (tmp_lsb & BME680_BIT_H1_DATA_MASK);
> > 
> >         ret = regmap_read(data->regmap, BME680_H2_MSB_REG, &tmp_msb);
> >         if (ret < 0) {
> 
> What is the correct course of action in the situation?  Should I resend just
> this one patch immediately?  Would it get a new version number "[PATCH v3
> 4/7]"?  I think the version number refers to the whole patch series, so it
> seems wrong to bump the revision of one patch and not transmit the whole
> series.

The rule is send the whole series again with the changelog mentioned
below the '---' and in your case mentioning
"no changes in this patch" in the changelog for all other patches in
series would be nice.

Another issue which I see is that you would need to rebase on top of my
patch that I sent a while ago because otherwise the patch won't apply
cleanly to the iio tree.

https://lore.kernel.org/lkml/20180811102636.6171-1-himanshujha199640@gmail.com/t/#u

As soon as you would next version, I would get it tested.

Thanks
diff mbox series

Patch

diff --git a/drivers/iio/chemical/bme680.h b/drivers/iio/chemical/bme680.h
index dd4247d364a0..437d75c2bad5 100644
--- a/drivers/iio/chemical/bme680.h
+++ b/drivers/iio/chemical/bme680.h
@@ -39,13 +39,13 @@ 
 
 #define BME680_MAX_OVERFLOW_VAL			0x40000000
 #define BME680_HUM_REG_SHIFT_VAL		4
-#define BME680_BIT_H1_DATA_MSK			0x0F
+#define BME680_BIT_H1_DATA_MASK			0x0F
 
 #define BME680_REG_RES_HEAT_RANGE		0x02
-#define   BME680_RHRANGE_MSK			0x30
+#define   BME680_RHRANGE_MASK			0x30
 #define BME680_REG_RES_HEAT_VAL			0x00
 #define BME680_REG_RANGE_SW_ERR			0x04
-#define   BME680_RSERROR_MSK			0xF0
+#define   BME680_RSERROR_MASK			0xF0
 #define BME680_REG_RES_HEAT_0			0x5A
 #define BME680_REG_GAS_WAIT_0			0x64
 #define BME680_ADC_GAS_RES_SHIFT		6
diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c
index 49bb6b84f181..d62cb88af481 100644
--- a/drivers/iio/chemical/bme680_core.c
+++ b/drivers/iio/chemical/bme680_core.c
@@ -285,7 +285,7 @@  static int bme680_read_calib(struct bme680_data *data,
 		dev_err(dev, "failed to read resistance heat range\n");
 		return ret;
 	}
-	calib->res_heat_range = (tmp & BME680_RHRANGE_MSK) / 16;
+	calib->res_heat_range = (tmp & BME680_RHRANGE_MASK) / 16;
 
 	ret = regmap_read(data->regmap, BME680_REG_RES_HEAT_VAL, &tmp);
 	if (ret < 0) {
@@ -299,7 +299,7 @@  static int bme680_read_calib(struct bme680_data *data,
 		dev_err(dev, "failed to read range software error\n");
 		return ret;
 	}
-	calib->range_sw_err = (tmp & BME680_RSERROR_MSK) / 16;
+	calib->range_sw_err = (tmp & BME680_RSERROR_MASK) / 16;
 
 	return 0;
 }