* [PATCH] drm/stm: checkpatch strict minor updates
@ 2017-10-26 10:24 ` Philippe Cornu
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Cornu @ 2017-10-26 10:24 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
Vincent Abriou, David Airlie, dri-devel, linux-kernel
Cc: Fabien Dessenne, Mickael Reulier, Gabriel Fernandez,
Ludovic Barre, Alexandre Torgue, Maxime Coquelin
Minor fixes detected with "scripts/checkpatch.pl --strict"
Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 ++--
drivers/gpu/drm/stm/ltdc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
index 10b2b77..3e8b9ed 100644
--- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
+++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
@@ -129,7 +129,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
int fvco_min, fvco_max, delta, best_delta; /* all in khz */
/* Early checks preventing division by 0 & odd results */
- if ((clkin_khz <= 0) || (clkout_khz <= 0))
+ if (clkin_khz <= 0 || clkout_khz <= 0)
return -EINVAL;
fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
@@ -155,7 +155,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
/* Check ndiv according to vco range */
- if ((n < n_min) || (n > n_max))
+ if (n < n_min || n > n_max)
continue;
/* Check if new delta is better & saves parameters */
delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 735c908..7be6710 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
src_h = state->src_h >> 16;
/* Reject scaling */
- if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
+ if (src_w != state->crtc_w || src_h != state->crtc_h) {
DRM_ERROR("Scaling is not supported");
return -EINVAL;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/stm: checkpatch strict minor updates
@ 2017-10-26 10:24 ` Philippe Cornu
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Cornu @ 2017-10-26 10:24 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
Vincent Abriou, David Airlie, dri-devel, linux-kernel
Cc: Fabien Dessenne, Mickael Reulier, Gabriel Fernandez,
Ludovic Barre, Alexandre Torgue, Maxime Coquelin
Minor fixes detected with "scripts/checkpatch.pl --strict"
Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 ++--
drivers/gpu/drm/stm/ltdc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
index 10b2b77..3e8b9ed 100644
--- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
+++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
@@ -129,7 +129,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
int fvco_min, fvco_max, delta, best_delta; /* all in khz */
/* Early checks preventing division by 0 & odd results */
- if ((clkin_khz <= 0) || (clkout_khz <= 0))
+ if (clkin_khz <= 0 || clkout_khz <= 0)
return -EINVAL;
fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
@@ -155,7 +155,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
/* Check ndiv according to vco range */
- if ((n < n_min) || (n > n_max))
+ if (n < n_min || n > n_max)
continue;
/* Check if new delta is better & saves parameters */
delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 735c908..7be6710 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
src_h = state->src_h >> 16;
/* Reject scaling */
- if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
+ if (src_w != state->crtc_w || src_h != state->crtc_h) {
DRM_ERROR("Scaling is not supported");
return -EINVAL;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/stm: checkpatch strict minor updates
2017-10-26 10:24 ` Philippe Cornu
@ 2017-11-01 11:33 ` Gustavo Padovan
-1 siblings, 0 replies; 6+ messages in thread
From: Gustavo Padovan @ 2017-11-01 11:33 UTC (permalink / raw)
To: Philippe Cornu
Cc: Yannick Fertre, Benjamin Gaignard, Vincent Abriou, David Airlie,
dri-devel, linux-kernel, Alexandre Torgue, Fabien Dessenne,
Maxime Coquelin, Mickael Reulier, Gabriel Fernandez,
Ludovic Barre
2017-10-26 Philippe Cornu <philippe.cornu@st.com>:
> Minor fixes detected with "scripts/checkpatch.pl --strict"
>
> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> ---
> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 ++--
> drivers/gpu/drm/stm/ltdc.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> index 10b2b77..3e8b9ed 100644
> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> @@ -129,7 +129,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
> int fvco_min, fvco_max, delta, best_delta; /* all in khz */
>
> /* Early checks preventing division by 0 & odd results */
> - if ((clkin_khz <= 0) || (clkout_khz <= 0))
> + if (clkin_khz <= 0 || clkout_khz <= 0)
> return -EINVAL;
>
> fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
> @@ -155,7 +155,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
> for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
> n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
> /* Check ndiv according to vco range */
> - if ((n < n_min) || (n > n_max))
> + if (n < n_min || n > n_max)
> continue;
> /* Check if new delta is better & saves parameters */
> delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 735c908..7be6710 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
> src_h = state->src_h >> 16;
>
> /* Reject scaling */
> - if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
> + if (src_w != state->crtc_w || src_h != state->crtc_h) {
> DRM_ERROR("Scaling is not supported");
> return -EINVAL;
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/stm: checkpatch strict minor updates
@ 2017-11-01 11:33 ` Gustavo Padovan
0 siblings, 0 replies; 6+ messages in thread
From: Gustavo Padovan @ 2017-11-01 11:33 UTC (permalink / raw)
To: Philippe Cornu
Cc: Maxime Coquelin, Alexandre Torgue, David Airlie, linux-kernel,
dri-devel, Yannick Fertre, Fabien Dessenne, Mickael Reulier,
Vincent Abriou, Gabriel Fernandez, Ludovic Barre
2017-10-26 Philippe Cornu <philippe.cornu@st.com>:
> Minor fixes detected with "scripts/checkpatch.pl --strict"
>
> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> ---
> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 ++--
> drivers/gpu/drm/stm/ltdc.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> index 10b2b77..3e8b9ed 100644
> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> @@ -129,7 +129,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
> int fvco_min, fvco_max, delta, best_delta; /* all in khz */
>
> /* Early checks preventing division by 0 & odd results */
> - if ((clkin_khz <= 0) || (clkout_khz <= 0))
> + if (clkin_khz <= 0 || clkout_khz <= 0)
> return -EINVAL;
>
> fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
> @@ -155,7 +155,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
> for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
> n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
> /* Check ndiv according to vco range */
> - if ((n < n_min) || (n > n_max))
> + if (n < n_min || n > n_max)
> continue;
> /* Check if new delta is better & saves parameters */
> delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 735c908..7be6710 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
> src_h = state->src_h >> 16;
>
> /* Reject scaling */
> - if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
> + if (src_w != state->crtc_w || src_h != state->crtc_h) {
> DRM_ERROR("Scaling is not supported");
> return -EINVAL;
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/stm: checkpatch strict minor updates
2017-11-01 11:33 ` Gustavo Padovan
@ 2017-11-07 13:57 ` Benjamin Gaignard
-1 siblings, 0 replies; 6+ messages in thread
From: Benjamin Gaignard @ 2017-11-07 13:57 UTC (permalink / raw)
To: Gustavo Padovan
Cc: Philippe Cornu, Yannick Fertre, Vincent Abriou, David Airlie,
dri-devel, Linux Kernel Mailing List, Alexandre Torgue,
Fabien Dessenne, Maxime Coquelin, Mickael Reulier,
Gabriel Fernandez, Ludovic Barre
2017-11-01 12:33 GMT+01:00 Gustavo Padovan <gustavo@padovan.org>:
> 2017-10-26 Philippe Cornu <philippe.cornu@st.com>:
>
>> Minor fixes detected with "scripts/checkpatch.pl --strict"
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
>> ---
>> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 ++--
>> drivers/gpu/drm/stm/ltdc.c | 2 +-
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> index 10b2b77..3e8b9ed 100644
>> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> @@ -129,7 +129,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
>> int fvco_min, fvco_max, delta, best_delta; /* all in khz */
>>
>> /* Early checks preventing division by 0 & odd results */
>> - if ((clkin_khz <= 0) || (clkout_khz <= 0))
>> + if (clkin_khz <= 0 || clkout_khz <= 0)
>> return -EINVAL;
>>
>> fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
>> @@ -155,7 +155,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
>> for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
>> n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
>> /* Check ndiv according to vco range */
>> - if ((n < n_min) || (n > n_max))
>> + if (n < n_min || n > n_max)
>> continue;
>> /* Check if new delta is better & saves parameters */
>> delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index 735c908..7be6710 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
>> src_h = state->src_h >> 16;
>>
>> /* Reject scaling */
>> - if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
>> + if (src_w != state->crtc_w || src_h != state->crtc_h) {
>> DRM_ERROR("Scaling is not supported");
>> return -EINVAL;
>
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
>
Applied on drm-misc-next.
Thanks
Benjamin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/stm: checkpatch strict minor updates
@ 2017-11-07 13:57 ` Benjamin Gaignard
0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Gaignard @ 2017-11-07 13:57 UTC (permalink / raw)
To: Gustavo Padovan
Cc: Alexandre Torgue, David Airlie, Philippe Cornu, dri-devel,
Linux Kernel Mailing List, Yannick Fertre, Fabien Dessenne,
Maxime Coquelin, Mickael Reulier, Vincent Abriou,
Gabriel Fernandez, Ludovic Barre
2017-11-01 12:33 GMT+01:00 Gustavo Padovan <gustavo@padovan.org>:
> 2017-10-26 Philippe Cornu <philippe.cornu@st.com>:
>
>> Minor fixes detected with "scripts/checkpatch.pl --strict"
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
>> ---
>> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 ++--
>> drivers/gpu/drm/stm/ltdc.c | 2 +-
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> index 10b2b77..3e8b9ed 100644
>> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
>> @@ -129,7 +129,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
>> int fvco_min, fvco_max, delta, best_delta; /* all in khz */
>>
>> /* Early checks preventing division by 0 & odd results */
>> - if ((clkin_khz <= 0) || (clkout_khz <= 0))
>> + if (clkin_khz <= 0 || clkout_khz <= 0)
>> return -EINVAL;
>>
>> fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
>> @@ -155,7 +155,7 @@ static int dsi_pll_get_params(int clkin_khz, int clkout_khz,
>> for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
>> n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
>> /* Check ndiv according to vco range */
>> - if ((n < n_min) || (n > n_max))
>> + if (n < n_min || n > n_max)
>> continue;
>> /* Check if new delta is better & saves parameters */
>> delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index 735c908..7be6710 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
>> src_h = state->src_h >> 16;
>>
>> /* Reject scaling */
>> - if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
>> + if (src_w != state->crtc_w || src_h != state->crtc_h) {
>> DRM_ERROR("Scaling is not supported");
>> return -EINVAL;
>
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
>
Applied on drm-misc-next.
Thanks
Benjamin
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-07 13:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 10:24 [PATCH] drm/stm: checkpatch strict minor updates Philippe Cornu
2017-10-26 10:24 ` Philippe Cornu
2017-11-01 11:33 ` Gustavo Padovan
2017-11-01 11:33 ` Gustavo Padovan
2017-11-07 13:57 ` Benjamin Gaignard
2017-11-07 13:57 ` Benjamin Gaignard
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.