* [PATCH][next] gnss: make struct ubx_gserial_ops static
@ 2018-06-30 11:22 Colin King
2018-07-02 8:59 ` Johan Hovold
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-06-30 11:22 UTC (permalink / raw)
To: Johan Hovold; +Cc: kernel-janitors, linux-kernel
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>
---
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.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] gnss: make struct ubx_gserial_ops static
2018-06-30 11:22 [PATCH][next] gnss: make struct ubx_gserial_ops static Colin King
@ 2018-07-02 8:59 ` Johan Hovold
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2018-07-02 8:59 UTC (permalink / raw)
To: Colin King
Cc: Johan Hovold, kernel-janitors, linux-kernel, Greg Kroah-Hartman
On Sat, Jun 30, 2018 at 12:22:46PM +0100, Colin King wrote:
> 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>
This was reported by the kbuild test robot and an automated RFC patch
submitted was a while back.
I prefer this man-generated one with a proper commit message, so:
Acked-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,
> };
Thanks,
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-02 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-30 11:22 [PATCH][next] gnss: make struct ubx_gserial_ops static Colin King
2018-07-02 8:59 ` Johan Hovold
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).