diff mbox series

[v3] staging: media: zoran: reduce length of a line

Message ID YHXITpUbYOb2lO/u@kali (mailing list archive)
State New, archived
Headers show
Series [v3] staging: media: zoran: reduce length of a line | expand

Commit Message

Mitali Borkar April 13, 2021, 4:35 p.m. UTC
Reduced length of a line which exceed the 100 columns limit by splitting
the line into two statements and commenting it with '*' to meet linux
kernel coding style for long(multi-line) comments.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---

Changes from v2:- Rebased this patch and made changes against mainline
code.
Changes from v1:- Made style changes according to linux kernel coding style
for long comments.

 drivers/staging/media/zoran/zr36060.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Hans Verkuil April 15, 2021, 1:36 p.m. UTC | #1
On 13/04/2021 18:35, Mitali Borkar wrote:
> Reduced length of a line which exceed the 100 columns limit by splitting
> the line into two statements and commenting it with '*' to meet linux
> kernel coding style for long(multi-line) comments.
> Reported by checkpatch.
> 
> Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
> ---
> 
> Changes from v2:- Rebased this patch and made changes against mainline
> code.
> Changes from v1:- Made style changes according to linux kernel coding style
> for long comments.
> 
>  drivers/staging/media/zoran/zr36060.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c
> index 4f9eb9ff2c42..27eec3446592 100644
> --- a/drivers/staging/media/zoran/zr36060.c
> +++ b/drivers/staging/media/zoran/zr36060.c
> @@ -249,7 +249,11 @@ static const char zr36060_ta[8] = { 0, 1, 1, 0, 0, 0, 0, 0 };	//table idx's AC
>  static const char zr36060_decimation_h[8] = { 2, 1, 1, 0, 0, 0, 0, 0 };
>  static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 };
>  
> -/* SOF (start of frame) segment depends on width, height and sampling ratio of each color component */
> +/*
> + * SOF (start of frame) segment depends on width,
> + * height and sampling ratio of each color component
> + */
> +

No need for this extra newline. The comment block describes the function,
so the function should directly follow that comment.

Regards,

	Hans

>  static int zr36060_set_sof(struct zr36060 *ptr)
>  {
>  	char sof_data[34];	// max. size of register set
>
diff mbox series

Patch

diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c
index 4f9eb9ff2c42..27eec3446592 100644
--- a/drivers/staging/media/zoran/zr36060.c
+++ b/drivers/staging/media/zoran/zr36060.c
@@ -249,7 +249,11 @@  static const char zr36060_ta[8] = { 0, 1, 1, 0, 0, 0, 0, 0 };	//table idx's AC
 static const char zr36060_decimation_h[8] = { 2, 1, 1, 0, 0, 0, 0, 0 };
 static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 };
 
-/* SOF (start of frame) segment depends on width, height and sampling ratio of each color component */
+/*
+ * SOF (start of frame) segment depends on width,
+ * height and sampling ratio of each color component
+ */
+
 static int zr36060_set_sof(struct zr36060 *ptr)
 {
 	char sof_data[34];	// max. size of register set