All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Correct bit mask for ADC result according to ADC's resolution.
@ 2021-02-04 15:54 Wilfried Wessner
  2021-02-04 16:11 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Wilfried Wessner @ 2021-02-04 15:54 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Peter Meerwald-Stadler
  Cc: linux-iio, gregkh

Signed-off-by: Wilfried Wessner <wilfried.wessner@gmail.com>
---
 drivers/iio/adc/ad7949.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ad7949.c b/drivers/iio/adc/ad7949.c
index 5d597e5050f6..a5b4858cb6dc 100644
--- a/drivers/iio/adc/ad7949.c
+++ b/drivers/iio/adc/ad7949.c
@@ -91,7 +91,7 @@ static int ad7949_spi_read_channel(struct ad7949_adc_chip *ad7949_adc, int *val,
 	int ret;
 	int i;
 	int bits_per_word = ad7949_adc->resolution;
-	int mask = GENMASK(ad7949_adc->resolution, 0);
+	int mask = GENMASK((ad7949_adc->resolution-1), 0);
 	struct spi_message msg;
 	struct spi_transfer tx[] = {
 		{
-- 
2.25.1


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

* Re: [PATCH] Correct bit mask for ADC result according to ADC's resolution.
  2021-02-04 15:54 [PATCH] Correct bit mask for ADC result according to ADC's resolution Wilfried Wessner
@ 2021-02-04 16:11 ` Greg KH
  2021-02-04 17:17   ` Wilfried Wessner
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-02-04 16:11 UTC (permalink / raw)
  To: Wilfried Wessner
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Peter Meerwald-Stadler, linux-iio

On Thu, Feb 04, 2021 at 04:54:30PM +0100, Wilfried Wessner wrote:
> Signed-off-by: Wilfried Wessner <wilfried.wessner@gmail.com>

I know I can't take patches without any changelog text :(


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

* Re: [PATCH] Correct bit mask for ADC result according to ADC's resolution.
  2021-02-04 16:11 ` Greg KH
@ 2021-02-04 17:17   ` Wilfried Wessner
  2021-02-05  9:06     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Wilfried Wessner @ 2021-02-04 17:17 UTC (permalink / raw)
  To: Greg KH
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Peter Meerwald-Stadler, linux-iio

On Thu, Feb 4, 2021 at 5:11 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, Feb 04, 2021 at 04:54:30PM +0100, Wilfried Wessner wrote:
> > Signed-off-by: Wilfried Wessner <wilfried.wessner@gmail.com>
>
> I know I can't take patches without any changelog text :(
>
Sorry, it's my first submitted patch, but what exactly do you mean by
"changelog text"?

Soemthing like:
"This patch fixes a wrong result mask, which was caused by an improper
 usage of the GENMASK macro.
The GENMASK macro indexing is zero based, so if the ADC-result is
right aligned stored in an integer based type, the mask
goes from [resolution -1 , 0]."

Thank you for your help!

Best regards,
Willi

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

* Re: [PATCH] Correct bit mask for ADC result according to ADC's resolution.
  2021-02-04 17:17   ` Wilfried Wessner
@ 2021-02-05  9:06     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-02-05  9:06 UTC (permalink / raw)
  To: Wilfried Wessner
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Peter Meerwald-Stadler, linux-iio

On Thu, Feb 04, 2021 at 06:17:46PM +0100, Wilfried Wessner wrote:
> On Thu, Feb 4, 2021 at 5:11 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, Feb 04, 2021 at 04:54:30PM +0100, Wilfried Wessner wrote:
> > > Signed-off-by: Wilfried Wessner <wilfried.wessner@gmail.com>
> >
> > I know I can't take patches without any changelog text :(
> >
> Sorry, it's my first submitted patch, but what exactly do you mean by
> "changelog text"?

As my patch bot will say:

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

Read that file and then resend (with the proper version information) and
all should be good!

thanks,

greg k-h

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

end of thread, other threads:[~2021-02-05  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 15:54 [PATCH] Correct bit mask for ADC result according to ADC's resolution Wilfried Wessner
2021-02-04 16:11 ` Greg KH
2021-02-04 17:17   ` Wilfried Wessner
2021-02-05  9:06     ` Greg KH

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.