All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gnss: fixes for char-misc-next
@ 2018-07-16 10:42 Johan Hovold
  2018-07-16 10:42 ` [PATCH 1/2] gnss: ubx: make struct ubx_gserial_ops static Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Johan Hovold @ 2018-07-16 10:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Johan Hovold

Hi Greg,

Here's a resend of two gnss fixes for char-misc-next which I noted you
haven't picked up directly (I'll continue picking these up an forwarding
to you in batches if that's alright).

Thanks,
Johan


Colin Ian King (1):
  gnss: ubx: make struct ubx_gserial_ops static

Dan Carpenter (1):
  gnss: fix potential error pointer dereference

 drivers/gnss/core.c | 4 ++--
 drivers/gnss/ubx.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.18.0


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

* [PATCH 1/2] gnss: ubx: make struct ubx_gserial_ops static
  2018-07-16 10:42 [PATCH 0/2] gnss: fixes for char-misc-next Johan Hovold
@ 2018-07-16 10:42 ` Johan Hovold
  2018-07-16 10:42 ` [PATCH 2/2] gnss: fix potential error pointer dereference Johan Hovold
  2018-07-16 10:48 ` [PATCH 0/2] gnss: fixes for char-misc-next Greg Kroah-Hartman
  2 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2018-07-16 10:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Colin Ian King, Johan Hovold

From: Colin Ian King <colin.king@canonical.com>

The structure ubx_gserial_ops is local to the source and does not need
to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'ubx_gserial_ops' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/gnss/ubx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gnss/ubx.c b/drivers/gnss/ubx.c
index 902b6854b7db..12568aebb7f6 100644
--- a/drivers/gnss/ubx.c
+++ b/drivers/gnss/ubx.c
@@ -59,7 +59,7 @@ static int ubx_set_power(struct gnss_serial *gserial,
 	return -EINVAL;
 }
 
-const struct gnss_serial_ops ubx_gserial_ops = {
+static const struct gnss_serial_ops ubx_gserial_ops = {
 	.set_power = ubx_set_power,
 };
 
-- 
2.18.0


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

* [PATCH 2/2] gnss: fix potential error pointer dereference
  2018-07-16 10:42 [PATCH 0/2] gnss: fixes for char-misc-next Johan Hovold
  2018-07-16 10:42 ` [PATCH 1/2] gnss: ubx: make struct ubx_gserial_ops static Johan Hovold
@ 2018-07-16 10:42 ` Johan Hovold
  2018-07-16 10:48 ` [PATCH 0/2] gnss: fixes for char-misc-next Greg Kroah-Hartman
  2 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2018-07-16 10:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Dan Carpenter, Johan Hovold

From: Dan Carpenter <dan.carpenter@oracle.com>

The gnss_allocate_device() function returns a mix of NULL and error
pointers on error.  It should only return one or the other.  Since the
callers both check for NULL, I've modified it to return NULL on error.

Fixes: 2b6a44035143 ("gnss: add GNSS receiver subsystem")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/gnss/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index f30ef8338b3a..4291a0dd22aa 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -235,7 +235,7 @@ struct gnss_device *gnss_allocate_device(struct device *parent)
 	id = ida_simple_get(&gnss_minors, 0, GNSS_MINORS, GFP_KERNEL);
 	if (id < 0) {
 		kfree(gdev);
-		return ERR_PTR(id);
+		return NULL;
 	}
 
 	gdev->id = id;
@@ -270,7 +270,7 @@ struct gnss_device *gnss_allocate_device(struct device *parent)
 err_put_device:
 	put_device(dev);
 
-	return ERR_PTR(-ENOMEM);
+	return NULL;
 }
 EXPORT_SYMBOL_GPL(gnss_allocate_device);
 
-- 
2.18.0


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

* Re: [PATCH 0/2] gnss: fixes for char-misc-next
  2018-07-16 10:42 [PATCH 0/2] gnss: fixes for char-misc-next Johan Hovold
  2018-07-16 10:42 ` [PATCH 1/2] gnss: ubx: make struct ubx_gserial_ops static Johan Hovold
  2018-07-16 10:42 ` [PATCH 2/2] gnss: fix potential error pointer dereference Johan Hovold
@ 2018-07-16 10:48 ` Greg Kroah-Hartman
  2018-07-16 12:16   ` Johan Hovold
  2 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-16 10:48 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-kernel

On Mon, Jul 16, 2018 at 12:42:01PM +0200, Johan Hovold wrote:
> Hi Greg,
> 
> Here's a resend of two gnss fixes for char-misc-next which I noted you
> haven't picked up directly (I'll continue picking these up an forwarding
> to you in batches if that's alright).

That's fine, I didn't see them myself, which is why I didn't pick them
up.  I'll just wait for you to forward patches on for this subsystem, as
that makes things a lot easier for me.

thanks,

greg k-h

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

* Re: [PATCH 0/2] gnss: fixes for char-misc-next
  2018-07-16 10:48 ` [PATCH 0/2] gnss: fixes for char-misc-next Greg Kroah-Hartman
@ 2018-07-16 12:16   ` Johan Hovold
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2018-07-16 12:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Johan Hovold, linux-kernel

On Mon, Jul 16, 2018 at 12:48:45PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 16, 2018 at 12:42:01PM +0200, Johan Hovold wrote:
> > Hi Greg,
> > 
> > Here's a resend of two gnss fixes for char-misc-next which I noted you
> > haven't picked up directly (I'll continue picking these up an forwarding
> > to you in batches if that's alright).
> 
> That's fine, I didn't see them myself, which is why I didn't pick them
> up.  I'll just wait for you to forward patches on for this subsystem, as
> that makes things a lot easier for me.

Perfect, thanks!

Johan

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

end of thread, other threads:[~2018-07-16 12:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 10:42 [PATCH 0/2] gnss: fixes for char-misc-next Johan Hovold
2018-07-16 10:42 ` [PATCH 1/2] gnss: ubx: make struct ubx_gserial_ops static Johan Hovold
2018-07-16 10:42 ` [PATCH 2/2] gnss: fix potential error pointer dereference Johan Hovold
2018-07-16 10:48 ` [PATCH 0/2] gnss: fixes for char-misc-next Greg Kroah-Hartman
2018-07-16 12:16   ` 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.