public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: tidspbridge: Fix pointer spacing
@ 2014-06-14  2:48 Jeff Oczek
  2014-06-14  2:48 ` [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition Jeff Oczek
  2014-06-14 13:21 ` [PATCH v2 1/2] staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs Jeff Oczek
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Oczek @ 2014-06-14  2:48 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Jeff Oczek

Simple coding style changes
This is for Eudyptula Challenge task 10

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
---
 drivers/staging/tidspbridge/include/dspbridge/dblldefs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index 30e0aa0..5e44ba6 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -130,7 +130,7 @@ typedef s32(*dbll_seek_fxn) (void *, long, int);
  *      FALSE:          Failed to find symbol.
  */
 typedef bool(*dbll_sym_lookup) (void *handle, void *parg, void *rmm_handle,
-				const char *name, struct dbll_sym_val ** sym);
+				const char *name, struct dbll_sym_val **sym);
 
 /*
  *  ======== dbll_tell_fxn ========
@@ -309,7 +309,7 @@ typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,
  *  Ensures:
  */
 typedef int(*dbll_get_sect_fxn) (struct dbll_library_obj *lib,
-					char *name, u32 * addr, u32 * size);
+					char *name, u32 *addr, u32 *size);
 
 /*
  *  ======== dbll_init ========
-- 
1.9.1


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

* [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition
  2014-06-14  2:48 [PATCH 1/2] staging: tidspbridge: Fix pointer spacing Jeff Oczek
@ 2014-06-14  2:48 ` Jeff Oczek
  2014-06-14  3:31   ` Joe Perches
  2014-06-14 13:21 ` [PATCH v2 1/2] staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs Jeff Oczek
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Oczek @ 2014-06-14  2:48 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Jeff Oczek

Simple coding style changes
This is for the Eudyptula Challenge task 10

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
---
 drivers/staging/tidspbridge/include/dspbridge/dblldefs.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index 5e44ba6..dd3e6eb 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -168,11 +168,11 @@ struct dbll_attrs {
 	 *  These file manipulation functions should be compatible with the
 	 *  "C" run time library functions of the same name.
 	 */
-	 s32(*fread) (void *, size_t, size_t, void *);
-	 s32(*fseek) (void *, long, int);
-	 s32(*ftell) (void *);
-	 s32(*fclose) (void *);
-	void *(*fopen) (const char *, const char *);
+	 s32 (*fread)(void *, size_t, size_t, void *);
+	 s32 (*fseek)(void *, long, int);
+	 s32 (*ftell)(void *);
+	 s32 (*fclose)(void *);
+	void *(*fopen)(const char *, const char *);
 };
 
 /*
-- 
1.9.1


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

* Re: [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition
  2014-06-14  2:48 ` [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition Jeff Oczek
@ 2014-06-14  3:31   ` Joe Perches
  2014-06-14 13:09     ` Jeff Oczek
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2014-06-14  3:31 UTC (permalink / raw)
  To: Jeff Oczek; +Cc: gregkh, devel, linux-kernel

On Fri, 2014-06-13 at 22:48 -0400, Jeff Oczek wrote:
> Simple coding style changes
[]
> diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
[]
> @@ -168,11 +168,11 @@ struct dbll_attrs {
[]
> -	 s32(*fread) (void *, size_t, size_t, void *);
> -	 s32(*fseek) (void *, long, int);
> -	 s32(*ftell) (void *);
> -	 s32(*fclose) (void *);
> -	void *(*fopen) (const char *, const char *);
> +	 s32 (*fread)(void *, size_t, size_t, void *);
> +	 s32 (*fseek)(void *, long, int);
> +	 s32 (*ftell)(void *);
> +	 s32 (*fclose)(void *);
> +	void *(*fopen)(const char *, const char *);
>  };

Better would be to describe the arguments with
variable names and align all the return values

	void *(*fopen

	s32 (*fread)(void *arg1, size_t val1, size_t val2, void *ptr1);
	s32 (*fseek)(void *ptr1, long arg2, int arg3);
	s32 (*ftell)(void * ptr);
	s32 (*fclose)(void *ptr);
	void *(*fopen)(const char *ptr1, const char *ptr2);

where arg, val, ptr are actually useful descriptors


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

* Re: [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition
  2014-06-14  3:31   ` Joe Perches
@ 2014-06-14 13:09     ` Jeff Oczek
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Oczek @ 2014-06-14 13:09 UTC (permalink / raw)
  To: Joe Perches; +Cc: gregkh, devel, linux-kernel

On Fri, Jun 13, 2014 at 08:31:40PM -0700, Joe Perches wrote:
> On Fri, 2014-06-13 at 22:48 -0400, Jeff Oczek wrote:
> > -	 s32(*fread) (void *, size_t, size_t, void *);
> > -	 s32(*fseek) (void *, long, int);
> > -	 s32(*ftell) (void *);
> > -	 s32(*fclose) (void *);
> > -	void *(*fopen) (const char *, const char *);
> > +	 s32 (*fread)(void *, size_t, size_t, void *);
> > +	 s32 (*fseek)(void *, long, int);
> > +	 s32 (*ftell)(void *);
> > +	 s32 (*fclose)(void *);
> > +	void *(*fopen)(const char *, const char *);
> 
> Better would be to describe the arguments with
> variable names and align all the return values
> 
> 	void *(*fopen
> 
> 	s32 (*fread)(void *arg1, size_t val1, size_t val2, void *ptr1);
> 	s32 (*fseek)(void *ptr1, long arg2, int arg3);
> 	s32 (*ftell)(void * ptr);
> 	s32 (*fclose)(void *ptr);
> 	void *(*fopen)(const char *ptr1, const char *ptr2);
> 
> where arg, val, ptr are actually useful descriptors
> 

Thanks Joe.  I was just trying to stay in the scope of making a
really trivial coding style change for the sake of following the
submission process for the first time.  But I'll resend based on
your suggestion.

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

* [PATCH v2 1/2] staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs
  2014-06-14  2:48 [PATCH 1/2] staging: tidspbridge: Fix pointer spacing Jeff Oczek
  2014-06-14  2:48 ` [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition Jeff Oczek
@ 2014-06-14 13:21 ` Jeff Oczek
  2014-06-14 13:21   ` [PATCH v2 2/2] staging: tidspbridge: Fix whitespace for pointers in function headers Jeff Oczek
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Oczek @ 2014-06-14 13:21 UTC (permalink / raw)
  To: gregkh; +Cc: joe, devel, linux-kernel, Jeff Oczek

Add more descriptive names to function pointers in definition of struct dbll_attrs

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
---
 drivers/staging/tidspbridge/include/dspbridge/dblldefs.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index 30e0aa0..e988e1e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -168,11 +168,11 @@ struct dbll_attrs {
 	 *  These file manipulation functions should be compatible with the
 	 *  "C" run time library functions of the same name.
 	 */
-	 s32(*fread) (void *, size_t, size_t, void *);
-	 s32(*fseek) (void *, long, int);
-	 s32(*ftell) (void *);
-	 s32(*fclose) (void *);
-	void *(*fopen) (const char *, const char *);
+	 s32 (*fread)(void *ptr, size_t size, size_t count, void *filp);
+	 s32 (*fseek)(void *filp, long offset, int origin);
+	 s32 (*ftell)(void *filp);
+	 s32 (*fclose)(void *filp);
+	 void *(*fopen)(const char *path, const char *mode);
 };
 
 /*
-- 
1.9.1


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

* [PATCH v2 2/2] staging: tidspbridge: Fix whitespace for pointers in function headers
  2014-06-14 13:21 ` [PATCH v2 1/2] staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs Jeff Oczek
@ 2014-06-14 13:21   ` Jeff Oczek
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Oczek @ 2014-06-14 13:21 UTC (permalink / raw)
  To: gregkh; +Cc: joe, devel, linux-kernel, Jeff Oczek

Change style in function headers from 'type * ptr' to 'type *ptr'

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
---
 drivers/staging/tidspbridge/include/dspbridge/dblldefs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index e988e1e..a2ff7a1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -130,7 +130,7 @@ typedef s32(*dbll_seek_fxn) (void *, long, int);
  *      FALSE:          Failed to find symbol.
  */
 typedef bool(*dbll_sym_lookup) (void *handle, void *parg, void *rmm_handle,
-				const char *name, struct dbll_sym_val ** sym);
+				const char *name, struct dbll_sym_val **sym);
 
 /*
  *  ======== dbll_tell_fxn ========
@@ -309,7 +309,7 @@ typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,
  *  Ensures:
  */
 typedef int(*dbll_get_sect_fxn) (struct dbll_library_obj *lib,
-					char *name, u32 * addr, u32 * size);
+					char *name, u32 *addr, u32 *size);
 
 /*
  *  ======== dbll_init ========
-- 
1.9.1


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

end of thread, other threads:[~2014-06-14 13:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-14  2:48 [PATCH 1/2] staging: tidspbridge: Fix pointer spacing Jeff Oczek
2014-06-14  2:48 ` [PATCH 2/2] staging: tidspbridge: Fix function pointer spacing in struct definition Jeff Oczek
2014-06-14  3:31   ` Joe Perches
2014-06-14 13:09     ` Jeff Oczek
2014-06-14 13:21 ` [PATCH v2 1/2] staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs Jeff Oczek
2014-06-14 13:21   ` [PATCH v2 2/2] staging: tidspbridge: Fix whitespace for pointers in function headers Jeff Oczek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox