2021-04-03 18:11:16

by Zhansaya Bagdauletkyzy

[permalink] [raw]
Subject: [PATCH 0/7] staging: media: zoran: Eliminate camelcase

This patchset fixes 'avoid camelcase' warning by converting local variables to lowercase and separating words using '_'.
Renaming of each variable is implemented in separate patches.

Zhansaya Bagdauletkyzy (7):
Rename 'HEnd' to 'h_end'
Rename 'VEnd' to 'v_end'
Rename 'DispMode' to 'disp_mode'
Rename 'VidWinWid' to 'vid_win_wid'
Rename 'VidWinHt' to 'vid_win_ht'
Rename 'We' to 'we'
Rename 'He' to 'he'

drivers/staging/media/zoran/zoran_device.c | 48 +++++++++++-----------
1 file changed, 24 insertions(+), 24 deletions(-)

--
2.25.1


2021-04-03 18:12:03

by Zhansaya Bagdauletkyzy

[permalink] [raw]
Subject: [PATCH 4/7] staging: media: zoran: Rename 'VidWinWid' to 'vid_win_wid'

Rename variable 'VidWinWid' to 'vid_win_wid' to eliminate camelcase.
Reported by checkpatch.pl.

Signed-off-by: Zhansaya Bagdauletkyzy <[email protected]>
---
drivers/staging/media/zoran/zoran_device.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c
index 8891f11f6276..f0344f4a4727 100644
--- a/drivers/staging/media/zoran/zoran_device.c
+++ b/drivers/staging/media/zoran/zoran_device.c
@@ -293,7 +293,7 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
const struct tvnorm *tvn;
unsigned int h_start, h_end, v_start, v_end;
unsigned int disp_mode;
- unsigned int VidWinWid, VidWinHt;
+ unsigned int vid_win_wid, VidWinHt;
unsigned int hcrop1, hcrop2, vcrop1, vcrop2;
unsigned int wa, We, ha, He;
unsigned int X, Y, hor_dcm, ver_dcm;
@@ -316,9 +316,9 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
/**** zr36057 ****/

/* horizontal */
- VidWinWid = video_width;
- X = DIV_ROUND_UP(VidWinWid * 64, tvn->wa);
- We = (VidWinWid * 64) / X;
+ vid_win_wid = video_width;
+ X = DIV_ROUND_UP(vid_win_wid * 64, tvn->wa);
+ We = (vid_win_wid * 64) / X;
hor_dcm = 64 - X;
hcrop1 = 2 * ((tvn->wa - We) / 4);
hcrop2 = tvn->wa - We - hcrop1;
@@ -384,7 +384,7 @@ static void zr36057_set_vfe(struct zoran *zr, int video_width, int video_height,
/* display configuration */
reg = (16 << ZR36057_VDCR_MIN_PIX)
| (VidWinHt << ZR36057_VDCR_VID_WIN_HT)
- | (VidWinWid << ZR36057_VDCR_VID_WIN_WID);
+ | (vid_win_wid << ZR36057_VDCR_VID_WIN_WID);
if (pci_pci_problems & PCIPCI_TRITON)
// || zr->revision < 1) // Revision 1 has also Triton support
reg &= ~ZR36057_VDCR_TRITON;
--
2.25.1

2021-04-04 09:56:25

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/7] staging: media: zoran: Eliminate camelcase

On Sun, Apr 04, 2021 at 12:08:57AM +0600, Zhansaya Bagdauletkyzy wrote:
> This patchset fixes 'avoid camelcase' warning by converting local variables to lowercase and separating words using '_'.
> Renaming of each variable is implemented in separate patches.
>
> Zhansaya Bagdauletkyzy (7):
> Rename 'HEnd' to 'h_end'
> Rename 'VEnd' to 'v_end'
> Rename 'DispMode' to 'disp_mode'
> Rename 'VidWinWid' to 'vid_win_wid'
> Rename 'VidWinHt' to 'vid_win_ht'
> Rename 'We' to 'we'
> Rename 'He' to 'he'
>
> drivers/staging/media/zoran/zoran_device.c | 48 +++++++++++-----------
> 1 file changed, 24 insertions(+), 24 deletions(-)

You did not read the instructions for the outreachy work, sorry, but I
can not take these.

good luck!

greg k-h

2021-04-07 21:20:02

by Hans Verkuil

[permalink] [raw]
Subject: Re: [PATCH 0/7] staging: media: zoran: Eliminate camelcase

Hi Zhansaya,

On 03/04/2021 20:08, Zhansaya Bagdauletkyzy wrote:
> This patchset fixes 'avoid camelcase' warning by converting local variables to lowercase and separating words using '_'.
> Renaming of each variable is implemented in separate patches.
>
> Zhansaya Bagdauletkyzy (7):
> Rename 'HEnd' to 'h_end'
> Rename 'VEnd' to 'v_end'
> Rename 'DispMode' to 'disp_mode'
> Rename 'VidWinWid' to 'vid_win_wid'
> Rename 'VidWinHt' to 'vid_win_ht'
> Rename 'We' to 'we'
> Rename 'He' to 'he'
>
> drivers/staging/media/zoran/zoran_device.c | 48 +++++++++++-----------
> 1 file changed, 24 insertions(+), 24 deletions(-)
>

Looks good. I'll take these patches.

You can use this reference to record your contributions:

https://patchwork.linuxtv.org/project/linux-media/list/?series=5052

The patch states will change to Accepted once it is merged in our media tree
here: https://git.linuxtv.org/media_tree.git/log/

I hate CamelCase, so this is a nice cleanup :-)

Regards,

Hans