All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: lustre: fixed comments without */ on a separate line
@ 2015-07-25 16:22 Mario Bambagini
  2015-07-25 16:22 ` [PATCH 2/2] staging: lustre: fixed 80-char rule Mario Bambagini
  0 siblings, 1 reply; 6+ messages in thread
From: Mario Bambagini @ 2015-07-25 16:22 UTC (permalink / raw)
  To: oleg.drokin; +Cc: andreas.dilger, gregkh, devel, linux-kernel, mario.bambagini

this set of patches fixes several code style problems:
-patch 1: comments without */ on a separate line
-patch 2: lines with more than 80 chars

This patch fixes 4 comments without */ on a new line

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_capa.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
index a626871..119f017 100644
--- a/drivers/staging/lustre/lustre/llite/llite_capa.c
+++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
@@ -206,7 +206,8 @@ static int capa_thread_main(void *unused)
 			 * lock.
 			 */
 			/* ibits may be changed by ll_have_md_lock() so we have
-			 * to set it each time */
+			 * to set it each time
+			 */
 			ibits = MDS_INODELOCK_LOOKUP;
 			if (capa_for_mds(&ocapa->c_capa) &&
 			    !S_ISDIR(ocapa->u.cli.inode->i_mode) &&
@@ -225,7 +226,8 @@ static int capa_thread_main(void *unused)
 			if (capa_for_oss(&ocapa->c_capa) &&
 			    obd_capa_open_count(ocapa) == 0) {
 				/* oss capa with open count == 0 won't renew,
-				 * move to idle list */
+				 * move to idle list
+				 */
 				sort_add_capa(ocapa, &ll_idle_capas);
 				continue;
 			}
@@ -447,7 +449,8 @@ static inline void inode_add_oss_capa(struct inode *inode,
 	struct list_head *next = NULL;
 
 	/* capa is sorted in lli_oss_capas so lookup can always find the
-	 * latest one */
+	 * latest one
+	 */
 	list_for_each_entry(tmp, &lli->lli_oss_capas, u.cli.lli_list) {
 		if (cfs_time_after(ocapa->c_expiry, tmp->c_expiry)) {
 			next = &tmp->u.cli.lli_list;
@@ -537,7 +540,8 @@ static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa)
 			ll_capa_renewal_failed++;
 
 			/* failed capa won't be renewed any longer, but if -EIO,
-			 * client might be doing recovery, retry in 2 min. */
+			 * client might be doing recovery, retry in 2 min.
+			 */
 			if (rc == -EIO && !capa_is_expired(ocapa)) {
 				delay_capa_renew(ocapa, 120);
 				DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] staging: lustre: fixed 80-char rule
  2015-07-25 16:22 [PATCH 1/2] staging: lustre: fixed comments without */ on a separate line Mario Bambagini
@ 2015-07-25 16:22 ` Mario Bambagini
  2015-07-26 19:14   ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Mario Bambagini @ 2015-07-25 16:22 UTC (permalink / raw)
  To: oleg.drokin; +Cc: andreas.dilger, gregkh, devel, linux-kernel, mario.bambagini

This patch fixes 2 lines longer than 80 chars

The first one is a function whose argument has been moved to next line.
The second one is a comment split on two lines

The script checkpatch does not complain anymore

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_capa.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
index 119f017..1f72066 100644
--- a/drivers/staging/lustre/lustre/llite/llite_capa.c
+++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
@@ -70,7 +70,8 @@ static unsigned long long ll_capa_renewal_retries;
 
 static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);
 
-static inline void update_capa_timer(struct obd_capa *ocapa, unsigned long expiry)
+static inline void update_capa_timer(struct obd_capa *ocapa,
+							   unsigned long expiry)
 {
 	if (time_before(expiry, ll_capa_timer.expires) ||
 	    !timer_pending(&ll_capa_timer)) {
@@ -165,7 +166,8 @@ static void ll_delete_capa(struct obd_capa *ocapa)
 /* three places where client capa is deleted:
  * 1. capa_thread_main(), main place to delete expired capa.
  * 2. ll_clear_inode_capas() in ll_clear_inode().
- * 3. ll_truncate_free_capa() delete truncate capa explicitly in ll_setattr_ost().
+ * 3. ll_truncate_free_capa() delete truncate capa explicitly in
+ *    ll_setattr_ost().
  */
 static int capa_thread_main(void *unused)
 {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: lustre: fixed 80-char rule
  2015-07-25 16:22 ` [PATCH 2/2] staging: lustre: fixed 80-char rule Mario Bambagini
@ 2015-07-26 19:14   ` Dan Carpenter
  2015-07-26 19:48     ` [RFC PATCH] checkpatch: Make --strict the default for drivers/staging files and patches Joe Perches
  2015-07-27 19:14     ` [PATCH 2/2] staging: lustre: fixed 80-char rule Mario Bambagini
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-07-26 19:14 UTC (permalink / raw)
  To: Mario Bambagini; +Cc: oleg.drokin, devel, gregkh, andreas.dilger, linux-kernel

On Sat, Jul 25, 2015 at 06:22:52PM +0200, Mario Bambagini wrote:
> This patch fixes 2 lines longer than 80 chars
> 
> The first one is a function whose argument has been moved to next line.
> The second one is a comment split on two lines
> 
> The script checkpatch does not complain anymore
> 
> Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
> ---
>  drivers/staging/lustre/lustre/llite/llite_capa.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
> index 119f017..1f72066 100644
> --- a/drivers/staging/lustre/lustre/llite/llite_capa.c
> +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
> @@ -70,7 +70,8 @@ static unsigned long long ll_capa_renewal_retries;
>  
>  static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);
>  
> -static inline void update_capa_timer(struct obd_capa *ocapa, unsigned long expiry)
> +static inline void update_capa_timer(struct obd_capa *ocapa,
> +							   unsigned long expiry)

This is wrong.  Run your patch through checkpatch.pl --strict and it
will help you.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC PATCH] checkpatch: Make --strict the default for drivers/staging files and patches
  2015-07-26 19:14   ` Dan Carpenter
@ 2015-07-26 19:48     ` Joe Perches
  2015-07-27  9:21       ` Dan Carpenter
  2015-07-27 19:14     ` [PATCH 2/2] staging: lustre: fixed 80-char rule Mario Bambagini
  1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2015-07-26 19:48 UTC (permalink / raw)
  To: Dan Carpenter, Andrew Morton
  Cc: Mario Bambagini, oleg.drokin, devel, gregkh, andreas.dilger,
	linux-kernel, Andy Whitcroft

Making --strict the default for staging may help some people
submit patches without obvious defects.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 34ca400..50693f5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2174,7 +2174,7 @@ sub process {
 		}
 
 		if ($found_file) {
-			if ($realfile =~ m@^(drivers/net/|net/)@) {
+			if ($realfile =~ m@^(?:drivers/net/|net/|drivers/staging/)@) {
 				$check = 1;
 			} else {
 				$check = $check_orig;



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH] checkpatch: Make --strict the default for drivers/staging files and patches
  2015-07-26 19:48     ` [RFC PATCH] checkpatch: Make --strict the default for drivers/staging files and patches Joe Perches
@ 2015-07-27  9:21       ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-07-27  9:21 UTC (permalink / raw)
  To: Joe Perches
  Cc: Andrew Morton, Mario Bambagini, oleg.drokin, devel, gregkh,
	andreas.dilger, linux-kernel, Andy Whitcroft

I wish there were some way to say that, "this is important enough that
we will make you redo your patch but not important enough to redo all
the existing code."

Although for staging I guess we welcome the churn so I am ok with this.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: lustre: fixed 80-char rule
  2015-07-26 19:14   ` Dan Carpenter
  2015-07-26 19:48     ` [RFC PATCH] checkpatch: Make --strict the default for drivers/staging files and patches Joe Perches
@ 2015-07-27 19:14     ` Mario Bambagini
  1 sibling, 0 replies; 6+ messages in thread
From: Mario Bambagini @ 2015-07-27 19:14 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: oleg.drokin, devel, gregkh, andreas.dilger, linux-kernel

On Sun, Jul 26, 2015 at 10:14:11PM +0300, Dan Carpenter wrote:
> On Sat, Jul 25, 2015 at 06:22:52PM +0200, Mario Bambagini wrote:
> > This patch fixes 2 lines longer than 80 chars
> > 
> > The first one is a function whose argument has been moved to next line.
> > The second one is a comment split on two lines
> > 
> > The script checkpatch does not complain anymore
> > 
> > Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
> > ---
> >  drivers/staging/lustre/lustre/llite/llite_capa.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
> > index 119f017..1f72066 100644
> > --- a/drivers/staging/lustre/lustre/llite/llite_capa.c
> > +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
> > @@ -70,7 +70,8 @@ static unsigned long long ll_capa_renewal_retries;
> >  
> >  static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);
> >  
> > -static inline void update_capa_timer(struct obd_capa *ocapa, unsigned long expiry)
> > +static inline void update_capa_timer(struct obd_capa *ocapa,
> > +							   unsigned long expiry)
> 
> This is wrong.  Run your patch through checkpatch.pl --strict and it
> will help you.
> 
> regards,
> dan carpenter
> 

Thank you for the hint. I'll resend the set of patches.

regards
MB


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-27 19:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-25 16:22 [PATCH 1/2] staging: lustre: fixed comments without */ on a separate line Mario Bambagini
2015-07-25 16:22 ` [PATCH 2/2] staging: lustre: fixed 80-char rule Mario Bambagini
2015-07-26 19:14   ` Dan Carpenter
2015-07-26 19:48     ` [RFC PATCH] checkpatch: Make --strict the default for drivers/staging files and patches Joe Perches
2015-07-27  9:21       ` Dan Carpenter
2015-07-27 19:14     ` [PATCH 2/2] staging: lustre: fixed 80-char rule Mario Bambagini

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.