Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver
@ 2020-09-29  6:22 Mauro Carvalho Chehab
  2020-09-29  6:22 ` [PATCH v2 1/2] spmi: get rid of a warning when built with W=1 Mauro Carvalho Chehab
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-29  6:22 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

Hi Stephen,

While double-checking against yesterday's linux-next, I noticed
that those two patches weren't merge yet. 

As you replied to both with your Reviewed-by:, are you expecting
them to be merged via someone's tree, or are you intending
to merge them via your tree?

Thanks!
Mauro


Mauro Carvalho Chehab (2):
  spmi: get rid of a warning when built with W=1
  spmi: fix some coding style issues at the spmi core

 drivers/spmi/spmi.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.26.2



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

* [PATCH v2 1/2] spmi: get rid of a warning when built with W=1
  2020-09-29  6:22 [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Mauro Carvalho Chehab
@ 2020-09-29  6:22 ` Mauro Carvalho Chehab
  2020-09-29  6:22 ` [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core Mauro Carvalho Chehab
  2020-10-02 21:22 ` [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Stephen Boyd
  2 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-29  6:22 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

The SPMI core complaing with this warning when built with W=1:

	drivers/spmi/spmi.c: In function ‘spmi_controller_remove’:
	drivers/spmi/spmi.c:548:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
	  548 |  int dummy;
	      |      ^~~~~

As the dummy var isn't needed, remove it.

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/spmi/spmi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index c16b60f645a4..fd3ff6079b15 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -545,13 +545,10 @@ static int spmi_ctrl_remove_device(struct device *dev, void *data)
  */
 void spmi_controller_remove(struct spmi_controller *ctrl)
 {
-	int dummy;
-
 	if (!ctrl)
 		return;
 
-	dummy = device_for_each_child(&ctrl->dev, NULL,
-				      spmi_ctrl_remove_device);
+	device_for_each_child(&ctrl->dev, NULL, spmi_ctrl_remove_device);
 	device_del(&ctrl->dev);
 }
 EXPORT_SYMBOL_GPL(spmi_controller_remove);
-- 
2.26.2


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

* [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core
  2020-09-29  6:22 [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Mauro Carvalho Chehab
  2020-09-29  6:22 ` [PATCH v2 1/2] spmi: get rid of a warning when built with W=1 Mauro Carvalho Chehab
@ 2020-09-29  6:22 ` Mauro Carvalho Chehab
  2020-09-29  9:13   ` Marc Gonzalez
  2020-10-02 21:22 ` [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Stephen Boyd
  2 siblings, 1 reply; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-29  6:22 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

While preparing to port the HiSilicon 6421v600 SPMI driver,
I noticed some coding style issues at the SPMI core.

Address them.

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/spmi/spmi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index fd3ff6079b15..253340e10dab 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -23,6 +23,7 @@ static DEFINE_IDA(ctrl_ida);
 static void spmi_dev_release(struct device *dev)
 {
 	struct spmi_device *sdev = to_spmi_device(dev);
+
 	kfree(sdev);
 }
 
@@ -33,6 +34,7 @@ static const struct device_type spmi_dev_type = {
 static void spmi_ctrl_release(struct device *dev)
 {
 	struct spmi_controller *ctrl = to_spmi_controller(dev);
+
 	ida_simple_remove(&ctrl_ida, ctrl->nr);
 	kfree(ctrl);
 }
@@ -487,7 +489,7 @@ static void of_spmi_register_devices(struct spmi_controller *ctrl)
 			continue;
 
 		sdev->dev.of_node = node;
-		sdev->usid = (u8) reg[0];
+		sdev->usid = (u8)reg[0];
 
 		err = spmi_device_add(sdev);
 		if (err) {
@@ -531,6 +533,7 @@ EXPORT_SYMBOL_GPL(spmi_controller_add);
 static int spmi_ctrl_remove_device(struct device *dev, void *data)
 {
 	struct spmi_device *spmidev = to_spmi_device(dev);
+
 	if (dev->type == &spmi_dev_type)
 		spmi_device_remove(spmidev);
 	return 0;
-- 
2.26.2


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

* Re: [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core
  2020-09-29  6:22 ` [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core Mauro Carvalho Chehab
@ 2020-09-29  9:13   ` Marc Gonzalez
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Gonzalez @ 2020-09-29  9:13 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Stephen Boyd
  Cc: John Stultz, Manivannan Sadhasivam, MSM, LKML

On 29/09/2020 08:22, Mauro Carvalho Chehab wrote:

> @@ -487,7 +489,7 @@ static void of_spmi_register_devices(struct spmi_controller *ctrl)
>  			continue;
>  
>  		sdev->dev.of_node = node;
> -		sdev->usid = (u8) reg[0];
> +		sdev->usid = (u8)reg[0];

typeof(sdev->usid) is u8.

What is the point of this cast?

Does GCC warn that u32 is being truncated to u8?

Regards.

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

* Re: [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver
  2020-09-29  6:22 [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Mauro Carvalho Chehab
  2020-09-29  6:22 ` [PATCH v2 1/2] spmi: get rid of a warning when built with W=1 Mauro Carvalho Chehab
  2020-09-29  6:22 ` [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core Mauro Carvalho Chehab
@ 2020-10-02 21:22 ` Stephen Boyd
  2020-10-03 10:56   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Boyd @ 2020-10-02 21:22 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

Quoting Mauro Carvalho Chehab (2020-09-28 23:22:11)
> Hi Stephen,
> 
> While double-checking against yesterday's linux-next, I noticed
> that those two patches weren't merge yet. 
> 
> As you replied to both with your Reviewed-by:, are you expecting
> them to be merged via someone's tree, or are you intending
> to merge them via your tree?

Per the maintainers file I am a reviewer not a maintainer of SPMI.
Usually Greg applies patches here. I can collect patches and send them
on up if that helps.

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

* Re: [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver
  2020-10-02 21:22 ` [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Stephen Boyd
@ 2020-10-03 10:56   ` Greg Kroah-Hartman
  2020-10-14 21:26     ` Stephen Boyd
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2020-10-03 10:56 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Mauro Carvalho Chehab, linuxarm, mauro.chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

On Fri, Oct 02, 2020 at 02:22:17PM -0700, Stephen Boyd wrote:
> Quoting Mauro Carvalho Chehab (2020-09-28 23:22:11)
> > Hi Stephen,
> > 
> > While double-checking against yesterday's linux-next, I noticed
> > that those two patches weren't merge yet. 
> > 
> > As you replied to both with your Reviewed-by:, are you expecting
> > them to be merged via someone's tree, or are you intending
> > to merge them via your tree?
> 
> Per the maintainers file I am a reviewer not a maintainer of SPMI.
> Usually Greg applies patches here. I can collect patches and send them
> on up if that helps.

Who is the maintainer?  Having a "reviewer only" is confusing to
everyone involved, as you might have someone who can review patches, but
no one to actually merge them anywhere?

Not a good situation :(

greg k-h

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

* Re: [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver
  2020-10-03 10:56   ` Greg Kroah-Hartman
@ 2020-10-14 21:26     ` Stephen Boyd
  2020-10-15 12:55       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Boyd @ 2020-10-14 21:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, linuxarm, mauro.chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

Quoting Greg Kroah-Hartman (2020-10-03 03:56:53)
> On Fri, Oct 02, 2020 at 02:22:17PM -0700, Stephen Boyd wrote:
> > Quoting Mauro Carvalho Chehab (2020-09-28 23:22:11)
> > > Hi Stephen,
> > > 
> > > While double-checking against yesterday's linux-next, I noticed
> > > that those two patches weren't merge yet. 
> > > 
> > > As you replied to both with your Reviewed-by:, are you expecting
> > > them to be merged via someone's tree, or are you intending
> > > to merge them via your tree?
> > 
> > Per the maintainers file I am a reviewer not a maintainer of SPMI.
> > Usually Greg applies patches here. I can collect patches and send them
> > on up if that helps.
> 
> Who is the maintainer?  Having a "reviewer only" is confusing to
> everyone involved, as you might have someone who can review patches, but
> no one to actually merge them anywhere?
> 
> Not a good situation :(
> 

Ok. I can spin up an SPMI tree on kernel.org and make this change to the
MAINTAINERS file (plus whatever tree path I can make). Do you want me to
send you patches in email form as a pull request? I imagine the patch
load will be fairly low.

----8<-----
diff --git a/MAINTAINERS b/MAINTAINERS
index deaafb617361..3e09630455d4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16338,7 +16338,7 @@ F:	Documentation/networking/device_drivers/ethernet/toshiba/spider_net.rst
 F:	drivers/net/ethernet/toshiba/spider_net*
 
 SPMI SUBSYSTEM
-R:	Stephen Boyd <sboyd@kernel.org>
+M:	Stephen Boyd <sboyd@kernel.org>
 L:	linux-arm-msm@vger.kernel.org
 F:	Documentation/devicetree/bindings/spmi/
 F:	drivers/spmi/

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

* Re: [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver
  2020-10-14 21:26     ` Stephen Boyd
@ 2020-10-15 12:55       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2020-10-15 12:55 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Mauro Carvalho Chehab, linuxarm, mauro.chehab, John Stultz,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel

On Wed, Oct 14, 2020 at 02:26:36PM -0700, Stephen Boyd wrote:
> Quoting Greg Kroah-Hartman (2020-10-03 03:56:53)
> > On Fri, Oct 02, 2020 at 02:22:17PM -0700, Stephen Boyd wrote:
> > > Quoting Mauro Carvalho Chehab (2020-09-28 23:22:11)
> > > > Hi Stephen,
> > > > 
> > > > While double-checking against yesterday's linux-next, I noticed
> > > > that those two patches weren't merge yet. 
> > > > 
> > > > As you replied to both with your Reviewed-by:, are you expecting
> > > > them to be merged via someone's tree, or are you intending
> > > > to merge them via your tree?
> > > 
> > > Per the maintainers file I am a reviewer not a maintainer of SPMI.
> > > Usually Greg applies patches here. I can collect patches and send them
> > > on up if that helps.
> > 
> > Who is the maintainer?  Having a "reviewer only" is confusing to
> > everyone involved, as you might have someone who can review patches, but
> > no one to actually merge them anywhere?
> > 
> > Not a good situation :(
> > 
> 
> Ok. I can spin up an SPMI tree on kernel.org and make this change to the
> MAINTAINERS file (plus whatever tree path I can make). Do you want me to
> send you patches in email form as a pull request? I imagine the patch
> load will be fairly low.

email form is great, I can handle those easily.  IF you really want to
create a git tree, I can pull from that too, but for low-volume stuff,
it's usually not worth it.

thanks,

greg k-h

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

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  6:22 [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Mauro Carvalho Chehab
2020-09-29  6:22 ` [PATCH v2 1/2] spmi: get rid of a warning when built with W=1 Mauro Carvalho Chehab
2020-09-29  6:22 ` [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core Mauro Carvalho Chehab
2020-09-29  9:13   ` Marc Gonzalez
2020-10-02 21:22 ` [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Stephen Boyd
2020-10-03 10:56   ` Greg Kroah-Hartman
2020-10-14 21:26     ` Stephen Boyd
2020-10-15 12:55       ` Greg Kroah-Hartman

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org
	public-inbox-index linux-arm-msm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git