All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: adc: ad7793: removed unnecessary else.
@ 2015-11-08  8:54 Nizam Haider
  0 siblings, 0 replies; 3+ messages in thread
From: Nizam Haider @ 2015-11-08  8:54 UTC (permalink / raw)
  To: jic23
  Cc: lars, Michael.Hennerich, knaack.h, pmeerw, linux-iio,
	linux-kernel, Nizam Haider, Nizam Haider

Else is not generally useful after a break or return.

Signed-off-by: Nizam Haider <nijamh@cdac.in>
---
 drivers/iio/adc/ad7793.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
index eea0c79..3bc5655 100644
--- a/drivers/iio/adc/ad7793.c
+++ b/drivers/iio/adc/ad7793.c
@@ -478,10 +478,9 @@ static int ad7793_read_raw(struct iio_dev *indio_dev,
 				*val2 = st->
 					scale_avail[(st->conf >> 8) & 0x7][1];
 				return IIO_VAL_INT_PLUS_NANO;
-			} else {
-				/* 1170mV / 2^23 * 6 */
-				scale_uv = (1170ULL * 1000000000ULL * 6ULL);
 			}
+			/* 1170mV / 2^23 * 6 */
+			scale_uv = (1170ULL * 1000000000ULL * 6ULL);
 			break;
 		case IIO_TEMP:
 				/* 1170mV / 0.81 mV/C / 2^23 */
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: adc: ad7793: removed unnecessary else.
  2015-11-09 12:50 Nizam Haider
@ 2015-11-15 11:14 ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2015-11-15 11:14 UTC (permalink / raw)
  To: Nizam Haider
  Cc: lars, Michael.Hennerich, knaack.h, pmeerw, linux-iio,
	linux-kernel, Nizam Haider

On 09/11/15 12:50, Nizam Haider wrote:
> Else is not generally useful after a break or return.
> 
> Signed-off-by: Nizam Haider <nijamh@cdac.in>
Applied, thanks.

Jonathan
> ---
>  drivers/iio/adc/ad7793.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
> index eea0c79..3bc5655 100644
> --- a/drivers/iio/adc/ad7793.c
> +++ b/drivers/iio/adc/ad7793.c
> @@ -478,10 +478,9 @@ static int ad7793_read_raw(struct iio_dev *indio_dev,
>  				*val2 = st->
>  					scale_avail[(st->conf >> 8) & 0x7][1];
>  				return IIO_VAL_INT_PLUS_NANO;
> -			} else {
> -				/* 1170mV / 2^23 * 6 */
> -				scale_uv = (1170ULL * 1000000000ULL * 6ULL);
>  			}
> +			/* 1170mV / 2^23 * 6 */
> +			scale_uv = (1170ULL * 1000000000ULL * 6ULL);
>  			break;
>  		case IIO_TEMP:
>  				/* 1170mV / 0.81 mV/C / 2^23 */
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] iio: adc: ad7793: removed unnecessary else.
@ 2015-11-09 12:50 Nizam Haider
  2015-11-15 11:14 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Nizam Haider @ 2015-11-09 12:50 UTC (permalink / raw)
  To: jic23
  Cc: lars, Michael.Hennerich, knaack.h, pmeerw, linux-iio,
	linux-kernel, Nizam Haider, Nizam Haider

Else is not generally useful after a break or return.

Signed-off-by: Nizam Haider <nijamh@cdac.in>
---
 drivers/iio/adc/ad7793.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
index eea0c79..3bc5655 100644
--- a/drivers/iio/adc/ad7793.c
+++ b/drivers/iio/adc/ad7793.c
@@ -478,10 +478,9 @@ static int ad7793_read_raw(struct iio_dev *indio_dev,
 				*val2 = st->
 					scale_avail[(st->conf >> 8) & 0x7][1];
 				return IIO_VAL_INT_PLUS_NANO;
-			} else {
-				/* 1170mV / 2^23 * 6 */
-				scale_uv = (1170ULL * 1000000000ULL * 6ULL);
 			}
+			/* 1170mV / 2^23 * 6 */
+			scale_uv = (1170ULL * 1000000000ULL * 6ULL);
 			break;
 		case IIO_TEMP:
 				/* 1170mV / 0.81 mV/C / 2^23 */
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-15 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-08  8:54 [PATCH] iio: adc: ad7793: removed unnecessary else Nizam Haider
2015-11-09 12:50 Nizam Haider
2015-11-15 11:14 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.