All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: i2c: remove unused pointers
@ 2020-03-12 12:12 Lourdes Pedrajas
  2020-03-12 12:41 ` [Outreachy kernel] " Julia Lawall
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lourdes Pedrajas @ 2020-03-12 12:12 UTC (permalink / raw)
  To: outreachy-kernel, gregkh, vireshk, johan, elder; +Cc: Lourdes Pedrajas

Remove unused pointers in gb_i2c_functionality() and int gb_i2c_probe()
functions.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Suggested-by: Johan Hovold <johan@kernel.org>
---
 drivers/staging/greybus/i2c.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
index c48fa1de89b0..de2f6516da09 100644
--- a/drivers/staging/greybus/i2c.c
+++ b/drivers/staging/greybus/i2c.c
@@ -224,7 +224,6 @@ static u32 gb_i2c_functionality(struct i2c_adapter *adap)
 
 static const struct i2c_algorithm gb_i2c_algorithm = {
 	.master_xfer	= gb_i2c_master_xfer,
-	/* .smbus_xfer	= gb_i2c_smbus_xfer, */
 	.functionality	= gb_i2c_functionality,
 };
 
@@ -267,7 +266,6 @@ static int gb_i2c_probe(struct gbphy_device *gbphy_dev,
 	adapter->owner = THIS_MODULE;
 	adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adapter->algo = &gb_i2c_algorithm;
-	/* adapter->algo_data = what? */
 
 	adapter->dev.parent = &gbphy_dev->dev;
 	snprintf(adapter->name, sizeof(adapter->name), "Greybus i2c adapter");
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH] staging: greybus: i2c: remove unused pointers
  2020-03-12 12:12 [PATCH] staging: greybus: i2c: remove unused pointers Lourdes Pedrajas
@ 2020-03-12 12:41 ` Julia Lawall
  2020-03-12 16:21   ` Lourdes Pedrajas
  2020-03-12 12:42 ` Stefano Brivio
  2020-03-12 12:47 ` Johan Hovold
  2 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2020-03-12 12:41 UTC (permalink / raw)
  To: Lourdes Pedrajas; +Cc: outreachy-kernel, gregkh, vireshk, johan, elder



On Thu, 12 Mar 2020, Lourdes Pedrajas wrote:

> Remove unused pointers in gb_i2c_functionality() and int gb_i2c_probe()
> functions.

There is no connection to gb_i2c_functionality.  Diff doesn't provide the
right location information when the code extract covers two top level
entities.

You can refer to gb_i2c_probe without the return type.

It could be helpful to mention how long this code has been commented out.
You can find this with git blame.

julia

>
> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> Suggested-by: Johan Hovold <johan@kernel.org>
> ---
>  drivers/staging/greybus/i2c.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
> index c48fa1de89b0..de2f6516da09 100644
> --- a/drivers/staging/greybus/i2c.c
> +++ b/drivers/staging/greybus/i2c.c
> @@ -224,7 +224,6 @@ static u32 gb_i2c_functionality(struct i2c_adapter *adap)
>
>  static const struct i2c_algorithm gb_i2c_algorithm = {
>  	.master_xfer	= gb_i2c_master_xfer,
> -	/* .smbus_xfer	= gb_i2c_smbus_xfer, */
>  	.functionality	= gb_i2c_functionality,
>  };
>
> @@ -267,7 +266,6 @@ static int gb_i2c_probe(struct gbphy_device *gbphy_dev,
>  	adapter->owner = THIS_MODULE;
>  	adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>  	adapter->algo = &gb_i2c_algorithm;
> -	/* adapter->algo_data = what? */
>
>  	adapter->dev.parent = &gbphy_dev->dev;
>  	snprintf(adapter->name, sizeof(adapter->name), "Greybus i2c adapter");
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200312121222.6609-1-lu%40pplo.net.
>


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

* Re: [Outreachy kernel] [PATCH] staging: greybus: i2c: remove unused pointers
  2020-03-12 12:12 [PATCH] staging: greybus: i2c: remove unused pointers Lourdes Pedrajas
  2020-03-12 12:41 ` [Outreachy kernel] " Julia Lawall
@ 2020-03-12 12:42 ` Stefano Brivio
  2020-03-12 16:24   ` Lourdes Pedrajas
  2020-03-12 12:47 ` Johan Hovold
  2 siblings, 1 reply; 6+ messages in thread
From: Stefano Brivio @ 2020-03-12 12:42 UTC (permalink / raw)
  To: Lourdes Pedrajas; +Cc: outreachy-kernel, gregkh, vireshk, johan, elder

On Thu, 12 Mar 2020 13:12:22 +0100
Lourdes Pedrajas <lu@pplo.net> wrote:

> Remove unused pointers in gb_i2c_functionality() and int gb_i2c_probe()

No, wait, gb_i2c_functionality() is a function, but you're not touching
it. I guess you got confused by 'git diff'.

> functions.
> 
> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> Suggested-by: Johan Hovold <johan@kernel.org>

This might be a pet peeve of mine, I'm quite sure I've seen similar
observations by others (on netdev?) but I can't find related messages
right now: I think it's nice to reflect a temporal or causal ordering
here.

That is, Johan suggested it, and you made the change, so Suggested-by:
should come first. It helps following the logic, especially with
growing numbers of tags.

What I personally do, and this is totally subject to taste (hence not
documented or formalised), is:

1. Reported-by/Suggested-by: (if any)
2. Fixes: (if any)
3. Co-authored-by: (if any)
4. Signed-off-by:
5. Reviewed-by/Acked-by: (if I'm carrying any before they are added by
   the maintainer)

-- 
Stefano



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

* Re: [PATCH] staging: greybus: i2c: remove unused pointers
  2020-03-12 12:12 [PATCH] staging: greybus: i2c: remove unused pointers Lourdes Pedrajas
  2020-03-12 12:41 ` [Outreachy kernel] " Julia Lawall
  2020-03-12 12:42 ` Stefano Brivio
@ 2020-03-12 12:47 ` Johan Hovold
  2 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2020-03-12 12:47 UTC (permalink / raw)
  To: Lourdes Pedrajas; +Cc: outreachy-kernel, gregkh, vireshk, johan, elder

On Thu, Mar 12, 2020 at 01:12:22PM +0100, Lourdes Pedrajas wrote:
> Remove unused pointers in gb_i2c_functionality() and int gb_i2c_probe()
> functions.

The out-commented function pointer is in the gb_i2c_algorithm struct,
not gb_i2c_functionality().

Looks good otherwise.

> Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> Suggested-by: Johan Hovold <johan@kernel.org>
> ---
>  drivers/staging/greybus/i2c.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
> index c48fa1de89b0..de2f6516da09 100644
> --- a/drivers/staging/greybus/i2c.c
> +++ b/drivers/staging/greybus/i2c.c
> @@ -224,7 +224,6 @@ static u32 gb_i2c_functionality(struct i2c_adapter *adap)
>  
>  static const struct i2c_algorithm gb_i2c_algorithm = {
>  	.master_xfer	= gb_i2c_master_xfer,
> -	/* .smbus_xfer	= gb_i2c_smbus_xfer, */
>  	.functionality	= gb_i2c_functionality,
>  };
>  
> @@ -267,7 +266,6 @@ static int gb_i2c_probe(struct gbphy_device *gbphy_dev,
>  	adapter->owner = THIS_MODULE;
>  	adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>  	adapter->algo = &gb_i2c_algorithm;
> -	/* adapter->algo_data = what? */
>  
>  	adapter->dev.parent = &gbphy_dev->dev;
>  	snprintf(adapter->name, sizeof(adapter->name), "Greybus i2c adapter");

Johan


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

* Re: [Outreachy kernel] [PATCH] staging: greybus: i2c: remove unused pointers
  2020-03-12 12:41 ` [Outreachy kernel] " Julia Lawall
@ 2020-03-12 16:21   ` Lourdes Pedrajas
  0 siblings, 0 replies; 6+ messages in thread
From: Lourdes Pedrajas @ 2020-03-12 16:21 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel, gregkh, vireshk, johan, elder

On Thu, Mar 12, 2020 at 01:41:40PM +0100, Julia Lawall wrote:
> 
> 
> On Thu, 12 Mar 2020, Lourdes Pedrajas wrote:
> 
> > Remove unused pointers in gb_i2c_functionality() and int gb_i2c_probe()
> > functions.
> 
> There is no connection to gb_i2c_functionality.  Diff doesn't provide the
> right location information when the code extract covers two top level
> entities.
> 
> You can refer to gb_i2c_probe without the return type.
> 
> It could be helpful to mention how long this code has been commented out.
> You can find this with git blame.
> 
> julia
> 
I agree, thank you, Julia.

Lourdes.


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

* Re: [Outreachy kernel] [PATCH] staging: greybus: i2c: remove unused pointers
  2020-03-12 12:42 ` Stefano Brivio
@ 2020-03-12 16:24   ` Lourdes Pedrajas
  0 siblings, 0 replies; 6+ messages in thread
From: Lourdes Pedrajas @ 2020-03-12 16:24 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: outreachy-kernel, gregkh, vireshk, johan, elder

On Thu, Mar 12, 2020 at 01:42:02PM +0100, Stefano Brivio wrote:
> On Thu, 12 Mar 2020 13:12:22 +0100
> Lourdes Pedrajas <lu@pplo.net> wrote:
> 
> > Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
> > Suggested-by: Johan Hovold <johan@kernel.org>
> 
> This might be a pet peeve of mine, I'm quite sure I've seen similar
> observations by others (on netdev?) but I can't find related messages
> right now: I think it's nice to reflect a temporal or causal ordering
> here.
> 
> That is, Johan suggested it, and you made the change, so Suggested-by:
> should come first. It helps following the logic, especially with
> growing numbers of tags.
> 
> What I personally do, and this is totally subject to taste (hence not
> documented or formalised), is:
> 
> 1. Reported-by/Suggested-by: (if any)
> 2. Fixes: (if any)
> 3. Co-authored-by: (if any)
> 4. Signed-off-by:
> 5. Reviewed-by/Acked-by: (if I'm carrying any before they are added by
>    the maintainer)
> 
> -- 
> Stefano
> 
I will follow your advice for the ordering, thank you, Stefano!

Lourdes.


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

end of thread, other threads:[~2020-03-12 16:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-12 12:12 [PATCH] staging: greybus: i2c: remove unused pointers Lourdes Pedrajas
2020-03-12 12:41 ` [Outreachy kernel] " Julia Lawall
2020-03-12 16:21   ` Lourdes Pedrajas
2020-03-12 12:42 ` Stefano Brivio
2020-03-12 16:24   ` Lourdes Pedrajas
2020-03-12 12:47 ` Johan Hovold

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.