2019-10-16 15:36:00

by Patrik Jakobsson

[permalink] [raw]
Subject: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

Fix typo where bits got compared (x < y) instead of shifted (x << y).

Signed-off-by: Patrik Jakobsson <[email protected]>
---
include/drm/drm_scdc_helper.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h
index f92eb2094d6b..6a483533aae4 100644
--- a/include/drm/drm_scdc_helper.h
+++ b/include/drm/drm_scdc_helper.h
@@ -50,9 +50,9 @@
#define SCDC_READ_REQUEST_ENABLE (1 << 0)

#define SCDC_STATUS_FLAGS_0 0x40
-#define SCDC_CH2_LOCK (1 < 3)
-#define SCDC_CH1_LOCK (1 < 2)
-#define SCDC_CH0_LOCK (1 < 1)
+#define SCDC_CH2_LOCK (1 << 3)
+#define SCDC_CH1_LOCK (1 << 2)
+#define SCDC_CH0_LOCK (1 << 1)
#define SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
#define SCDC_CLOCK_DETECT (1 << 0)

--
2.23.0


2019-10-22 08:18:54

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

On Wed, 16 Oct 2019, Patrik Jakobsson <[email protected]> wrote:
> Fix typo where bits got compared (x < y) instead of shifted (x << y).

Fixes: 3ad33ae2bc80 ("drm: Add SCDC helpers")
Cc: Thierry Reding <[email protected]>

> Signed-off-by: Patrik Jakobsson <[email protected]>
> ---
> include/drm/drm_scdc_helper.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h
> index f92eb2094d6b..6a483533aae4 100644
> --- a/include/drm/drm_scdc_helper.h
> +++ b/include/drm/drm_scdc_helper.h
> @@ -50,9 +50,9 @@
> #define SCDC_READ_REQUEST_ENABLE (1 << 0)
>
> #define SCDC_STATUS_FLAGS_0 0x40
> -#define SCDC_CH2_LOCK (1 < 3)
> -#define SCDC_CH1_LOCK (1 < 2)
> -#define SCDC_CH0_LOCK (1 < 1)
> +#define SCDC_CH2_LOCK (1 << 3)
> +#define SCDC_CH1_LOCK (1 << 2)
> +#define SCDC_CH0_LOCK (1 << 1)
> #define SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
> #define SCDC_CLOCK_DETECT (1 << 0)

--
Jani Nikula, Intel Open Source Graphics Center

2019-10-22 08:45:00

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

On Wed, Oct 16, 2019 at 02:33:42PM +0200, Patrik Jakobsson wrote:
> Fix typo where bits got compared (x < y) instead of shifted (x << y).
>
> Signed-off-by: Patrik Jakobsson <[email protected]>
> ---
> include/drm/drm_scdc_helper.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Oh my...

Reviewed-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (378.00 B)
signature.asc (849.00 B)
Download all attachments

2019-10-22 08:48:30

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

On Tue, Oct 22, 2019 at 11:16:51AM +0300, Jani Nikula wrote:
> On Wed, 16 Oct 2019, Patrik Jakobsson <[email protected]> wrote:
> > Fix typo where bits got compared (x < y) instead of shifted (x << y).
>
> Fixes: 3ad33ae2bc80 ("drm: Add SCDC helpers")
> Cc: Thierry Reding <[email protected]>

I'm not sure we really need the Fixes: tag here. These defines aren't
used anywhere, so technically there's no bug.

Thierry

>
> > Signed-off-by: Patrik Jakobsson <[email protected]>
> > ---
> > include/drm/drm_scdc_helper.h | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h
> > index f92eb2094d6b..6a483533aae4 100644
> > --- a/include/drm/drm_scdc_helper.h
> > +++ b/include/drm/drm_scdc_helper.h
> > @@ -50,9 +50,9 @@
> > #define SCDC_READ_REQUEST_ENABLE (1 << 0)
> >
> > #define SCDC_STATUS_FLAGS_0 0x40
> > -#define SCDC_CH2_LOCK (1 < 3)
> > -#define SCDC_CH1_LOCK (1 < 2)
> > -#define SCDC_CH0_LOCK (1 < 1)
> > +#define SCDC_CH2_LOCK (1 << 3)
> > +#define SCDC_CH1_LOCK (1 << 2)
> > +#define SCDC_CH0_LOCK (1 << 1)
> > #define SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
> > #define SCDC_CLOCK_DETECT (1 << 0)
>
> --
> Jani Nikula, Intel Open Source Graphics Center
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


Attachments:
(No filename) (1.50 kB)
signature.asc (849.00 B)
Download all attachments

2019-10-22 09:52:54

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

On Tue, 22 Oct 2019, Thierry Reding <[email protected]> wrote:
> On Tue, Oct 22, 2019 at 11:16:51AM +0300, Jani Nikula wrote:
>> On Wed, 16 Oct 2019, Patrik Jakobsson <[email protected]> wrote:
>> > Fix typo where bits got compared (x < y) instead of shifted (x << y).
>>
>> Fixes: 3ad33ae2bc80 ("drm: Add SCDC helpers")
>> Cc: Thierry Reding <[email protected]>
>
> I'm not sure we really need the Fixes: tag here. These defines aren't
> used anywhere, so technically there's no bug.

Yeah well, I just logged it here as I happened to do the drive-by git
blame.

BR,
Jani.



>
> Thierry
>
>>
>> > Signed-off-by: Patrik Jakobsson <[email protected]>
>> > ---
>> > include/drm/drm_scdc_helper.h | 6 +++---
>> > 1 file changed, 3 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h
>> > index f92eb2094d6b..6a483533aae4 100644
>> > --- a/include/drm/drm_scdc_helper.h
>> > +++ b/include/drm/drm_scdc_helper.h
>> > @@ -50,9 +50,9 @@
>> > #define SCDC_READ_REQUEST_ENABLE (1 << 0)
>> >
>> > #define SCDC_STATUS_FLAGS_0 0x40
>> > -#define SCDC_CH2_LOCK (1 < 3)
>> > -#define SCDC_CH1_LOCK (1 < 2)
>> > -#define SCDC_CH0_LOCK (1 < 1)
>> > +#define SCDC_CH2_LOCK (1 << 3)
>> > +#define SCDC_CH1_LOCK (1 << 2)
>> > +#define SCDC_CH0_LOCK (1 << 1)
>> > #define SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
>> > #define SCDC_CLOCK_DETECT (1 << 0)
>>
>> --
>> Jani Nikula, Intel Open Source Graphics Center
>> _______________________________________________
>> dri-devel mailing list
>> [email protected]
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Jani Nikula, Intel Open Source Graphics Center

2019-10-22 17:06:56

by Patrik Jakobsson

[permalink] [raw]
Subject: Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

On Tue, Oct 22, 2019 at 11:51 AM Jani Nikula
<[email protected]> wrote:
>
> On Tue, 22 Oct 2019, Thierry Reding <[email protected]> wrote:
> > On Tue, Oct 22, 2019 at 11:16:51AM +0300, Jani Nikula wrote:
> >> On Wed, 16 Oct 2019, Patrik Jakobsson <[email protected]> wrote:
> >> > Fix typo where bits got compared (x < y) instead of shifted (x << y).
> >>
> >> Fixes: 3ad33ae2bc80 ("drm: Add SCDC helpers")
> >> Cc: Thierry Reding <[email protected]>
> >
> > I'm not sure we really need the Fixes: tag here. These defines aren't
> > used anywhere, so technically there's no bug.
>
> Yeah well, I just logged it here as I happened to do the drive-by git
> blame.

I think we can skip the fixes tag here. Thanks for review!

Did anyone apply this or can I take it through drm-misc-next?

-Patrik

>
> BR,
> Jani.
>
>
>
> >
> > Thierry
> >
> >>
> >> > Signed-off-by: Patrik Jakobsson <[email protected]>
> >> > ---
> >> > include/drm/drm_scdc_helper.h | 6 +++---
> >> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >> >
> >> > diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h
> >> > index f92eb2094d6b..6a483533aae4 100644
> >> > --- a/include/drm/drm_scdc_helper.h
> >> > +++ b/include/drm/drm_scdc_helper.h
> >> > @@ -50,9 +50,9 @@
> >> > #define SCDC_READ_REQUEST_ENABLE (1 << 0)
> >> >
> >> > #define SCDC_STATUS_FLAGS_0 0x40
> >> > -#define SCDC_CH2_LOCK (1 < 3)
> >> > -#define SCDC_CH1_LOCK (1 < 2)
> >> > -#define SCDC_CH0_LOCK (1 < 1)
> >> > +#define SCDC_CH2_LOCK (1 << 3)
> >> > +#define SCDC_CH1_LOCK (1 << 2)
> >> > +#define SCDC_CH0_LOCK (1 << 1)
> >> > #define SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
> >> > #define SCDC_CLOCK_DETECT (1 << 0)
> >>
> >> --
> >> Jani Nikula, Intel Open Source Graphics Center
> >> _______________________________________________
> >> dri-devel mailing list
> >> [email protected]
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Jani Nikula, Intel Open Source Graphics Center

2019-11-04 17:06:40

by Patrik Jakobsson

[permalink] [raw]
Subject: Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

On Tue, Oct 22, 2019 at 5:53 PM Patrik Jakobsson
<[email protected]> wrote:
>
> On Tue, Oct 22, 2019 at 11:51 AM Jani Nikula
> <[email protected]> wrote:
> >
> > On Tue, 22 Oct 2019, Thierry Reding <[email protected]> wrote:
> > > On Tue, Oct 22, 2019 at 11:16:51AM +0300, Jani Nikula wrote:
> > >> On Wed, 16 Oct 2019, Patrik Jakobsson <[email protected]> wrote:
> > >> > Fix typo where bits got compared (x < y) instead of shifted (x << y).
> > >>
> > >> Fixes: 3ad33ae2bc80 ("drm: Add SCDC helpers")
> > >> Cc: Thierry Reding <[email protected]>
> > >
> > > I'm not sure we really need the Fixes: tag here. These defines aren't
> > > used anywhere, so technically there's no bug.
> >
> > Yeah well, I just logged it here as I happened to do the drive-by git
> > blame.
>
> I think we can skip the fixes tag here. Thanks for review!
>
> Did anyone apply this or can I take it through drm-misc-next?
>
> -Patrik

Applied to drm-misc-next

>
> >
> > BR,
> > Jani.
> >
> >
> >
> > >
> > > Thierry
> > >
> > >>
> > >> > Signed-off-by: Patrik Jakobsson <[email protected]>
> > >> > ---
> > >> > include/drm/drm_scdc_helper.h | 6 +++---
> > >> > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >> >
> > >> > diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h
> > >> > index f92eb2094d6b..6a483533aae4 100644
> > >> > --- a/include/drm/drm_scdc_helper.h
> > >> > +++ b/include/drm/drm_scdc_helper.h
> > >> > @@ -50,9 +50,9 @@
> > >> > #define SCDC_READ_REQUEST_ENABLE (1 << 0)
> > >> >
> > >> > #define SCDC_STATUS_FLAGS_0 0x40
> > >> > -#define SCDC_CH2_LOCK (1 < 3)
> > >> > -#define SCDC_CH1_LOCK (1 < 2)
> > >> > -#define SCDC_CH0_LOCK (1 < 1)
> > >> > +#define SCDC_CH2_LOCK (1 << 3)
> > >> > +#define SCDC_CH1_LOCK (1 << 2)
> > >> > +#define SCDC_CH0_LOCK (1 << 1)
> > >> > #define SCDC_CH_LOCK_MASK (SCDC_CH2_LOCK | SCDC_CH1_LOCK | SCDC_CH0_LOCK)
> > >> > #define SCDC_CLOCK_DETECT (1 << 0)
> > >>
> > >> --
> > >> Jani Nikula, Intel Open Source Graphics Center
> > >> _______________________________________________
> > >> dri-devel mailing list
> > >> [email protected]
> > >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
> > --
> > Jani Nikula, Intel Open Source Graphics Center