* [PATCH] NFC: fdp: make struct nci_ops static
@ 2017-10-05 9:47 Colin King
2017-10-05 15:09 ` Stephen Hemminger
2017-11-06 0:06 ` Samuel Ortiz
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-10-05 9:47 UTC (permalink / raw)
To: Samuel Ortiz, Andy Shevchenko, David S . Miller,
Stephen Hemminger, Johannes Berg, linux-wireless
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The structure nci_ops is local to the source and does not need to
be in global scope, so make it static.
Cleans up sparse warning:
symbol 'nci_ops' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/nfc/fdp/fdp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c
index ec50027b0d8b..d5784a47fc13 100644
--- a/drivers/nfc/fdp/fdp.c
+++ b/drivers/nfc/fdp/fdp.c
@@ -726,7 +726,7 @@ static struct nci_driver_ops fdp_prop_ops[] = {
},
};
-struct nci_ops nci_ops = {
+static struct nci_ops nci_ops = {
.open = fdp_nci_open,
.close = fdp_nci_close,
.send = fdp_nci_send,
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NFC: fdp: make struct nci_ops static
2017-10-05 9:47 [PATCH] NFC: fdp: make struct nci_ops static Colin King
@ 2017-10-05 15:09 ` Stephen Hemminger
2017-11-06 0:06 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-10-05 15:09 UTC (permalink / raw)
To: Colin King
Cc: Samuel Ortiz, Andy Shevchenko, David S . Miller, Johannes Berg,
linux-wireless, kernel-janitors, linux-kernel
On Thu, 5 Oct 2017 10:47:12 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The structure nci_ops is local to the source and does not need to
> be in global scope, so make it static.
>
> Cleans up sparse warning:
> symbol 'nci_ops' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/nfc/fdp/fdp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c
> index ec50027b0d8b..d5784a47fc13 100644
> --- a/drivers/nfc/fdp/fdp.c
> +++ b/drivers/nfc/fdp/fdp.c
> @@ -726,7 +726,7 @@ static struct nci_driver_ops fdp_prop_ops[] = {
> },
> };
>
> -struct nci_ops nci_ops = {
> +static struct nci_ops nci_ops = {
> .open = fdp_nci_open,
> .close = fdp_nci_close,
> .send = fdp_nci_send,
Why not static const?
Yes this goes deeper. NFC needs to make all nfc ops const.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NFC: fdp: make struct nci_ops static
2017-10-05 9:47 [PATCH] NFC: fdp: make struct nci_ops static Colin King
2017-10-05 15:09 ` Stephen Hemminger
@ 2017-11-06 0:06 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2017-11-06 0:06 UTC (permalink / raw)
To: Colin King
Cc: Andy Shevchenko, David S . Miller, Stephen Hemminger,
Johannes Berg, linux-wireless, kernel-janitors, linux-kernel
On Thu, Oct 05, 2017 at 10:47:12AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The structure nci_ops is local to the source and does not need to
> be in global scope, so make it static.
>
> Cleans up sparse warning:
> symbol 'nci_ops' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/nfc/fdp/fdp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied as well, thanks.
Cheers,
Samuel.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-06 0:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-05 9:47 [PATCH] NFC: fdp: make struct nci_ops static Colin King
2017-10-05 15:09 ` Stephen Hemminger
2017-11-06 0:06 ` Samuel Ortiz
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).