Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628860 > unrolled thread

[PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.

Started byEric Curtin <ericcurtin17@gmail.com>
First post2017-04-22 17:30 +0200
Last post2017-04-23 01:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc. Eric Curtin <ericcurtin17@gmail.com> - 2017-04-22 17:30 +0200
    Re: [PATCH] staging: fbtft: fix character limit, trailing ;  warning, etc. Joe Perches <joe@perches.com> - 2017-04-23 01:40 +0200

#1628860 — [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.

FromEric Curtin <ericcurtin17@gmail.com>
Date2017-04-22 17:30 +0200
Subject[PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
Message-ID<tz590-4wC-5@gated-at.bofh.it>
checkpatch spits out a warning about the 80 character line limit. Split
the parameters of these functions onto different lines. Put the ; with
the macro caller instead. Lined up parameters as there was another
CHECK warning about that.

Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
---
 drivers/staging/fbtft/fbtft-bus.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index ec45043..3143050 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -24,7 +24,14 @@ void func(struct fbtft_par *par, int len, ...)                                \
 			buf[i] = (type)va_arg(args, unsigned int);            \
 		}                                                             \
 		va_end(args);                                                 \
-		fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__);   \
+		fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER,			      \
+				  par,					      \
+				  par->info->device,			      \
+				  type,					      \
+				  buf,					      \
+				  len,					      \
+				  "%s: ",				      \
+				  __func__);				      \
 	}                                                                     \
 									      \
 	va_start(args, len);                                                  \
@@ -41,7 +48,10 @@ void func(struct fbtft_par *par, int len, ...)                                \
 	ret = par->fbtftops.write(par, par->buf, sizeof(type) + offset);      \
 	if (ret < 0) {                                                        \
 		va_end(args);                                                 \
-		dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \
+		dev_err(par->info->device,				      \
+			"%s: write() failed and returned %d\n",		      \
+			__func__,					      \
+			ret);						      \
 		return;                                                       \
 	}                                                                     \
 	len--;                                                                \
@@ -60,17 +70,20 @@ void func(struct fbtft_par *par, int len, ...)                                \
 					  len * (sizeof(type) + offset));     \
 		if (ret < 0) {                                                \
 			va_end(args);                                         \
-			dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \
+			dev_err(par->info->device,			      \
+				"%s: write() failed and returned %d\n",	      \
+				__func__,				      \
+				ret);					      \
 			return;                                               \
 		}                                                             \
 	}                                                                     \
 	va_end(args);                                                         \
 }                                                                             \
-EXPORT_SYMBOL(func);
+EXPORT_SYMBOL(func)
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, )
-define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, );
+define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16);
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, );
 
 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
 {
-- 
2.7.4

[toc] | [next] | [standalone]


#1628891 — Re: [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.

FromJoe Perches <joe@perches.com>
Date2017-04-23 01:40 +0200
SubjectRe: [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
Message-ID<tzcNc-Li-9@gated-at.bofh.it>
In reply to#1628860
On Sat, 2017-04-22 at 16:26 +0100, Eric Curtin wrote:
> checkpatch spits out a warning about the 80 character line limit. Split
> the parameters of these functions onto different lines. Put the ; with
> the macro caller instead. Lined up parameters as there was another
> CHECK warning about that.
[]
> diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
[]
> @@ -24,7 +24,14 @@ void func(struct fbtft_par *par, int len, ...)                                \
>  			buf[i] = (type)va_arg(args, unsigned int);            \
>  		}                                                             \
>  		va_end(args);                                                 \
> -		fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__);   \
> +		fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER,			      \
> +				  par,					      \
> +				  par->info->device,			      \
> +				  type,					      \
> +				  buf,					      \
> +				  len,					      \
> +				  "%s: ",				      \
> +				  __func__);				      \
>  	}                                                                     \

Multiple arguments per line please before 80 columns

		fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,                  \
				  par->info->device, type, buf, len,          \
				  "%s: ", __func__);                          \

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web