linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: luster: cl_object.h Checkpatch Cleanup
@ 2016-06-18 21:25 Craig Inches
  2016-06-18 21:25 ` [PATCH 1/3] " Craig Inches
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Craig Inches @ 2016-06-18 21:25 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman
  Cc: lustre-devel, devel, linux-kernel

Fix three different issues from checkpatch:
Line over 80 Chars
Unsigned int prefered over unsigned
Macros with complex values should be enclosed in parenthesis

Craig Inches (3):
  checkpatch style issue: Line over 80 char
  Checkpatch style issue:
  Checkpatch error cleanup

 drivers/staging/lustre/lustre/include/cl_object.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

-- 
2.7.3

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

* [PATCH 1/3] staging: luster: cl_object.h Checkpatch Cleanup
  2016-06-18 21:25 [PATCH 0/3] staging: luster: cl_object.h Checkpatch Cleanup Craig Inches
@ 2016-06-18 21:25 ` Craig Inches
  2016-06-19  2:03   ` Greg Kroah-Hartman
  2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
  2016-06-18 21:26 ` [PATCH 3/3] " Craig Inches
  2 siblings, 1 reply; 11+ messages in thread
From: Craig Inches @ 2016-06-18 21:25 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman
  Cc: lustre-devel, devel, linux-kernel

Line length greater than 80 char.

Signed-off-by: Craig Inches <craig@craiginches.com>

---
 drivers/staging/lustre/lustre/include/cl_object.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h
index 99fc28e..3004625 100644
--- a/drivers/staging/lustre/lustre/include/cl_object.h
+++ b/drivers/staging/lustre/lustre/include/cl_object.h
@@ -1054,7 +1054,7 @@ do {								    \
 #define CL_PAGE_HEADER(mask, env, page, format, ...)			  \
 do {									  \
 	if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) {			 \
-		LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, NULL);		\
+		LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, NULL);	\
 		cl_page_header_print(env, &msgdata, lu_cdebug_printer, page); \
 		CDEBUG(mask, format, ## __VA_ARGS__);			\
 	}								     \
-- 
2.7.3

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

* [PATCH 2/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:25 [PATCH 0/3] staging: luster: cl_object.h Checkpatch Cleanup Craig Inches
  2016-06-18 21:25 ` [PATCH 1/3] " Craig Inches
@ 2016-06-18 21:25 ` Craig Inches
  2016-06-18 23:39   ` kbuild test robot
                     ` (3 more replies)
  2016-06-18 21:26 ` [PATCH 3/3] " Craig Inches
  2 siblings, 4 replies; 11+ messages in thread
From: Craig Inches @ 2016-06-18 21:25 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman
  Cc: lustre-devel, devel, linux-kernel

Macros with complex values should be enclosed in parenthesis

Signed-off-by: Craig Inches <craig@craiginches.com>
---
 drivers/staging/lustre/lustre/include/cl_object.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h
index 3004625..712355a 100644
--- a/drivers/staging/lustre/lustre/include/cl_object.h
+++ b/drivers/staging/lustre/lustre/include/cl_object.h
@@ -1207,8 +1207,8 @@ struct cl_lock_descr {
 
 #define DDESCR "%s(%d):[%lu, %lu]:%x"
 #define PDESCR(descr)						   \
-	cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode,	\
-	(descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags
+	(cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode,	\
+	(descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags)
 
 const char *cl_lock_mode_name(const enum cl_lock_mode mode);
 
-- 
2.7.3

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

* [PATCH 3/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:25 [PATCH 0/3] staging: luster: cl_object.h Checkpatch Cleanup Craig Inches
  2016-06-18 21:25 ` [PATCH 1/3] " Craig Inches
  2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
@ 2016-06-18 21:26 ` Craig Inches
  2016-06-19  2:03   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 11+ messages in thread
From: Craig Inches @ 2016-06-18 21:26 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman
  Cc: lustre-devel, devel, linux-kernel

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Craig Inches <craig@craiginches.com>
---
 drivers/staging/lustre/lustre/include/cl_object.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h
index 712355a..5c5e319 100644
--- a/drivers/staging/lustre/lustre/include/cl_object.h
+++ b/drivers/staging/lustre/lustre/include/cl_object.h
@@ -371,7 +371,7 @@ struct cl_object_operations {
 	 * cl_object_operations::coo_attr_get() is used.
 	 */
 	int (*coo_attr_set)(const struct lu_env *env, struct cl_object *obj,
-			    const struct cl_attr *attr, unsigned valid);
+			    const struct cl_attr *attr, unsigned int valid);
 	/**
 	 * Update object configuration. Called top-to-bottom to modify object
 	 * configuration.
@@ -761,7 +761,7 @@ struct cl_page {
 	/** Link to a queue, for debugging. */
 	struct lu_ref_link       cp_queue_ref;
 	/** Per-page flags from enum cl_page_flags. Protected by a VM lock. */
-	unsigned                 cp_flags;
+	unsigned int                cp_flags;
 	/** Assigned if doing a sync_io */
 	struct cl_sync_io       *cp_sync_io;
 };
@@ -1320,7 +1320,7 @@ do {								    \
  * @{
  */
 struct cl_page_list {
-	unsigned	     pl_nr;
+	unsigned int	     pl_nr;
 	struct list_head	   pl_pages;
 	struct task_struct	*pl_owner;
 };
@@ -1838,7 +1838,7 @@ struct cl_io {
 	/**
 	 * Number of pages owned by this IO. For invariant checking.
 	 */
-	unsigned	     ci_owned_nr;
+	unsigned int	     ci_owned_nr;
 };
 
 /** @} cl_io */
@@ -1996,11 +1996,11 @@ struct cl_req {
 	/** A list of pages being transferred */
 	struct list_head	    crq_pages;
 	/** Number of pages in cl_req::crq_pages */
-	unsigned	      crq_nrpages;
+	unsigned int	      crq_nrpages;
 	/** An array of objects which pages are in ->crq_pages */
 	struct cl_req_obj    *crq_o;
 	/** Number of elements in cl_req::crq_objs[] */
-	unsigned	      crq_nrobjs;
+	unsigned int	      crq_nrobjs;
 	struct list_head	    crq_layers;
 };
 
@@ -2181,7 +2181,7 @@ void cl_object_attr_unlock(struct cl_object *o);
 int  cl_object_attr_get(const struct lu_env *env, struct cl_object *obj,
 			struct cl_attr *attr);
 int  cl_object_attr_set(const struct lu_env *env, struct cl_object *obj,
-			const struct cl_attr *attr, unsigned valid);
+			const struct cl_attr *attr, unsigned int valid);
 int  cl_object_glimpse(const struct lu_env *env, struct cl_object *obj,
 		       struct ost_lvb *lvb);
 int  cl_conf_set(const struct lu_env *env, struct cl_object *obj,
-- 
2.7.3

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

* Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
@ 2016-06-18 23:39   ` kbuild test robot
  2016-06-19  1:19   ` kbuild test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2016-06-18 23:39 UTC (permalink / raw)
  To: Craig Inches
  Cc: kbuild-all, Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman,
	lustre-devel, devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 6456 bytes --]

Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/lustre/lustre/obdclass/cl_lock.c:44:0:
   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 'cl_lock_descr_print':
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1206:39: warning: right-hand operand of comma expression has no effect [-Wunused-value]
     (cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \
                                          ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: note: in expansion of macro 'PDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                                            ^~~~~~
   drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1206:58: warning: right-hand operand of comma expression has no effect [-Wunused-value]
     (cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \
                                                             ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: note: in expansion of macro 'PDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                                            ^~~~~~
   drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1207:20: warning: right-hand operand of comma expression has no effect [-Wunused-value]
     (descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags)
                       ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: note: in expansion of macro 'PDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                                            ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%s' expects argument of type 'char *', but argument 4 has type '__u32 {aka const unsigned int}' [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%d' expects argument of type 'int', but argument 5 has type '__u64 {aka const long long unsigned int}' [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type '__u32 {aka const unsigned int}' [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
   drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type '__u32 {aka const unsigned int}' [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%llx' expects a matching 'long long unsigned int' argument [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~
>> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
    #define DDESCR "%s(%d):[%lu, %lu]:%x"
                   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR'
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~

vim +1206 drivers/staging/lustre/lustre/obdclass/../include/cl_object.h

  1198		 * flags to enqueue lock. A combination of bit-flags from
  1199		 * enum cl_enq_flags.
  1200		 */
  1201		__u32	     cld_enq_flags;
  1202	};
  1203	
> 1204	#define DDESCR "%s(%d):[%lu, %lu]:%x"
  1205	#define PDESCR(descr)						   \
> 1206		(cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode,	\
> 1207		(descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags)
  1208	
  1209	const char *cl_lock_mode_name(const enum cl_lock_mode mode);
  1210	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 54771 bytes --]

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

* Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
  2016-06-18 23:39   ` kbuild test robot
@ 2016-06-19  1:19   ` kbuild test robot
  2016-06-19  1:46   ` kbuild test robot
  2016-06-19  2:02   ` Greg Kroah-Hartman
  3 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2016-06-19  1:19 UTC (permalink / raw)
  To: Craig Inches
  Cc: kbuild-all, Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman,
	lustre-devel, devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5172 bytes --]

Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 'cl_lock_descr_print':
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:113: warning: right-hand operand of comma expression has no effect [-Wunused-value]
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                                                                                                                    ^
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:132: warning: right-hand operand of comma expression has no effect [-Wunused-value]
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                                                                                                                                       ^
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:152: warning: right-hand operand of comma expression has no effect [-Wunused-value]
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                                                                                                                                                           ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%s' expects argument of type 'char *', but argument 4 has type '__u32 {aka const unsigned int}' [-Wformat=]
     (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
                             ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%d' expects argument of type 'int', but argument 5 has type '__u64 {aka const long long unsigned int}' [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type '__u32 {aka const unsigned int}' [-Wformat=]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type '__u32 {aka const unsigned int}' [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%llx' expects a matching 'long long unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]

vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c

d7e09d039 Peng Tao 2013-05-02  233  		return names[mode];
d7e09d039 Peng Tao 2013-05-02  234  	else
d7e09d039 Peng Tao 2013-05-02  235  		return "U";
d7e09d039 Peng Tao 2013-05-02  236  }
d7e09d039 Peng Tao 2013-05-02  237  EXPORT_SYMBOL(cl_lock_mode_name);
d7e09d039 Peng Tao 2013-05-02  238  
d7e09d039 Peng Tao 2013-05-02  239  /**
d7e09d039 Peng Tao 2013-05-02  240   * Prints human readable representation of a lock description.
d7e09d039 Peng Tao 2013-05-02  241   */
d7e09d039 Peng Tao 2013-05-02  242  void cl_lock_descr_print(const struct lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  243  			 lu_printer_t printer,
d7e09d039 Peng Tao 2013-05-02  244  			 const struct cl_lock_descr *descr)
d7e09d039 Peng Tao 2013-05-02  245  {
d7e09d039 Peng Tao 2013-05-02  246  	const struct lu_fid  *fid;
d7e09d039 Peng Tao 2013-05-02  247  
d7e09d039 Peng Tao 2013-05-02  248  	fid = lu_object_fid(&descr->cld_obj->co_lu);
d7e09d039 Peng Tao 2013-05-02 @249  	(*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
d7e09d039 Peng Tao 2013-05-02  250  }
d7e09d039 Peng Tao 2013-05-02  251  EXPORT_SYMBOL(cl_lock_descr_print);
d7e09d039 Peng Tao 2013-05-02  252  
d7e09d039 Peng Tao 2013-05-02  253  /**
d7e09d039 Peng Tao 2013-05-02  254   * Prints human readable representation of \a lock to the \a f.
d7e09d039 Peng Tao 2013-05-02  255   */
d7e09d039 Peng Tao 2013-05-02  256  void cl_lock_print(const struct lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  257  		   lu_printer_t printer, const struct cl_lock *lock)

:::::: The code at line 249 was first introduced by commit
:::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support

:::::: TO: Peng Tao <bergwolf@gmail.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 54411 bytes --]

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

* Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
  2016-06-18 23:39   ` kbuild test robot
  2016-06-19  1:19   ` kbuild test robot
@ 2016-06-19  1:46   ` kbuild test robot
  2016-06-19  2:02   ` Greg Kroah-Hartman
  3 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2016-06-19  1:46 UTC (permalink / raw)
  To: Craig Inches
  Cc: kbuild-all, Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman,
	lustre-devel, devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4366 bytes --]

Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: tile-allyesconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 'cl_lock_descr_print':
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value computed is not used [-Wunused-value]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value computed is not used [-Wunused-value]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value computed is not used [-Wunused-value]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%s' expects argument of type 'char *', but argument 4 has type '__u32' [-Wformat]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%d' expects argument of type 'int', but argument 5 has type '__u64' [-Wformat]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type '__u32' [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type '__u32' [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%llx' expects a matching 'long long unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat]

vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c

d7e09d039 Peng Tao 2013-05-02  233  		return names[mode];
d7e09d039 Peng Tao 2013-05-02  234  	else
d7e09d039 Peng Tao 2013-05-02  235  		return "U";
d7e09d039 Peng Tao 2013-05-02  236  }
d7e09d039 Peng Tao 2013-05-02  237  EXPORT_SYMBOL(cl_lock_mode_name);
d7e09d039 Peng Tao 2013-05-02  238  
d7e09d039 Peng Tao 2013-05-02  239  /**
d7e09d039 Peng Tao 2013-05-02  240   * Prints human readable representation of a lock description.
d7e09d039 Peng Tao 2013-05-02  241   */
d7e09d039 Peng Tao 2013-05-02  242  void cl_lock_descr_print(const struct lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  243  			 lu_printer_t printer,
d7e09d039 Peng Tao 2013-05-02  244  			 const struct cl_lock_descr *descr)
d7e09d039 Peng Tao 2013-05-02  245  {
d7e09d039 Peng Tao 2013-05-02  246  	const struct lu_fid  *fid;
d7e09d039 Peng Tao 2013-05-02  247  
d7e09d039 Peng Tao 2013-05-02  248  	fid = lu_object_fid(&descr->cld_obj->co_lu);
d7e09d039 Peng Tao 2013-05-02 @249  	(*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
d7e09d039 Peng Tao 2013-05-02  250  }
d7e09d039 Peng Tao 2013-05-02  251  EXPORT_SYMBOL(cl_lock_descr_print);
d7e09d039 Peng Tao 2013-05-02  252  
d7e09d039 Peng Tao 2013-05-02  253  /**
d7e09d039 Peng Tao 2013-05-02  254   * Prints human readable representation of \a lock to the \a f.
d7e09d039 Peng Tao 2013-05-02  255   */
d7e09d039 Peng Tao 2013-05-02  256  void cl_lock_print(const struct lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  257  		   lu_printer_t printer, const struct cl_lock *lock)

:::::: The code at line 249 was first introduced by commit
:::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support

:::::: TO: Peng Tao <bergwolf@gmail.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 44884 bytes --]

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

* Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
                     ` (2 preceding siblings ...)
  2016-06-19  1:46   ` kbuild test robot
@ 2016-06-19  2:02   ` Greg Kroah-Hartman
  2016-06-19 19:53     ` Craig Inches
  3 siblings, 1 reply; 11+ messages in thread
From: Greg Kroah-Hartman @ 2016-06-19  2:02 UTC (permalink / raw)
  To: Craig Inches
  Cc: Oleg Drokin, Andreas Dilger, lustre-devel, devel, linux-kernel

On Sat, Jun 18, 2016 at 10:25:55PM +0100, Craig Inches wrote:
> Macros with complex values should be enclosed in parenthesis
> 
> Signed-off-by: Craig Inches <craig@craiginches.com>
> ---
>  drivers/staging/lustre/lustre/include/cl_object.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ALWAYS test build your patches, to not do so just makes maintainers
grumpy...

Remember, checkpatch is a _hint_, it's not always right.

greg k-h

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

* Re: [PATCH 1/3] staging: luster: cl_object.h Checkpatch Cleanup
  2016-06-18 21:25 ` [PATCH 1/3] " Craig Inches
@ 2016-06-19  2:03   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2016-06-19  2:03 UTC (permalink / raw)
  To: Craig Inches
  Cc: Oleg Drokin, Andreas Dilger, devel, linux-kernel, lustre-devel

On Sat, Jun 18, 2016 at 10:25:42PM +0100, Craig Inches wrote:
> Line length greater than 80 char.

What does that mean?

What does your subject mean?

Please be more descriptive, again, look at other patches that have been
merged for examples...

greg k-h

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

* Re: [PATCH 3/3] staging: luster: Checkpatch Cleanup
  2016-06-18 21:26 ` [PATCH 3/3] " Craig Inches
@ 2016-06-19  2:03   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2016-06-19  2:03 UTC (permalink / raw)
  To: Craig Inches
  Cc: Oleg Drokin, Andreas Dilger, devel, linux-kernel, lustre-devel

On Sat, Jun 18, 2016 at 10:26:08PM +0100, Craig Inches wrote:
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

You can't send 3 different patches all with the same subject line :(

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

* Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup
  2016-06-19  2:02   ` Greg Kroah-Hartman
@ 2016-06-19 19:53     ` Craig Inches
  0 siblings, 0 replies; 11+ messages in thread
From: Craig Inches @ 2016-06-19 19:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Oleg Drokin, Andreas Dilger, lustre-devel, devel, linux-kernel

I did build the kernel 1 for each change, then a final with all changes
applied.

Apologies if I missed something,

Craig

On Sat, Jun 18, 2016 at 07:02:35PM -0700, Greg Kroah-Hartman wrote:
> On Sat, Jun 18, 2016 at 10:25:55PM +0100, Craig Inches wrote:
> > Macros with complex values should be enclosed in parenthesis
> > 
> > Signed-off-by: Craig Inches <craig@craiginches.com>
> > ---
> >  drivers/staging/lustre/lustre/include/cl_object.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> ALWAYS test build your patches, to not do so just makes maintainers
> grumpy...
> 
> Remember, checkpatch is a _hint_, it's not always right.
> 
> greg k-h

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

end of thread, other threads:[~2016-06-19 19:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-18 21:25 [PATCH 0/3] staging: luster: cl_object.h Checkpatch Cleanup Craig Inches
2016-06-18 21:25 ` [PATCH 1/3] " Craig Inches
2016-06-19  2:03   ` Greg Kroah-Hartman
2016-06-18 21:25 ` [PATCH 2/3] staging: luster: " Craig Inches
2016-06-18 23:39   ` kbuild test robot
2016-06-19  1:19   ` kbuild test robot
2016-06-19  1:46   ` kbuild test robot
2016-06-19  2:02   ` Greg Kroah-Hartman
2016-06-19 19:53     ` Craig Inches
2016-06-18 21:26 ` [PATCH 3/3] " Craig Inches
2016-06-19  2:03   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).