* [PATCH] usb: typec: ucsi: make yoga_c630_ucsi_ops be static
@ 2024-12-27 5:51 Pei Xiao
2024-12-27 7:54 ` Greg KH
2024-12-31 2:38 ` [PATCH] " Dmitry Baryshkov
0 siblings, 2 replies; 4+ messages in thread
From: Pei Xiao @ 2024-12-27 5:51 UTC (permalink / raw)
To: linux-usb, linux-kernel, heikki.krogerus, dmitry.baryshkov
Cc: Pei Xiao, kernel test robot
sparse warnings:
drivers/usb/typec/ucsi/ucsi_yoga_c630.c:101:30: sparse: sparse:
symbol 'yoga_c630_ucsi_ops' was not declared. Should it be static?
Fixes: 2ea6d07efe53 ("usb: typec: ucsi: add Lenovo Yoga C630 glue driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412102033.J4vZNaaR-lkp@intel.com/
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
drivers/usb/typec/ucsi/ucsi_yoga_c630.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/ucsi_yoga_c630.c b/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
index f3a5e24ea84d..4cae85c0dc12 100644
--- a/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
+++ b/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
@@ -71,7 +71,7 @@ static int yoga_c630_ucsi_async_control(struct ucsi *ucsi, u64 command)
return yoga_c630_ec_ucsi_write(uec->ec, (u8*)&command);
}
-const struct ucsi_operations yoga_c630_ucsi_ops = {
+static const struct ucsi_operations yoga_c630_ucsi_ops = {
.read_version = yoga_c630_ucsi_read_version,
.read_cci = yoga_c630_ucsi_read_cci,
.read_message_in = yoga_c630_ucsi_read_message_in,
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: ucsi: make yoga_c630_ucsi_ops be static
2024-12-27 5:51 [PATCH] usb: typec: ucsi: make yoga_c630_ucsi_ops be static Pei Xiao
@ 2024-12-27 7:54 ` Greg KH
2024-12-27 8:54 ` [PATCH V2] " Pei Xiao
2024-12-31 2:38 ` [PATCH] " Dmitry Baryshkov
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2024-12-27 7:54 UTC (permalink / raw)
To: Pei Xiao
Cc: linux-usb, linux-kernel, heikki.krogerus, dmitry.baryshkov,
kernel test robot
On Fri, Dec 27, 2024 at 01:51:51PM +0800, Pei Xiao wrote:
> sparse warnings:
> drivers/usb/typec/ucsi/ucsi_yoga_c630.c:101:30: sparse: sparse:
> symbol 'yoga_c630_ucsi_ops' was not declared. Should it be static?
>
That's a nice warning message, but doesn't explain what this change is
actually doing. Please read the kernel documentation for how to
properly write a changelog commit for what needs to go here.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] usb: typec: ucsi: make yoga_c630_ucsi_ops be static
2024-12-27 7:54 ` Greg KH
@ 2024-12-27 8:54 ` Pei Xiao
0 siblings, 0 replies; 4+ messages in thread
From: Pei Xiao @ 2024-12-27 8:54 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, linux-usb, lkp, xiaopei01
sparse warnings:
drivers/usb/typec/ucsi/ucsi_yoga_c630.c:101:30: sparse: sparse:
symbol 'yoga_c630_ucsi_ops' was not declared. Should it be static?
Add static to fix sparse warnings.
Fixes: 2ea6d07efe53 ("usb: typec: ucsi: add Lenovo Yoga C630 glue driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412102033.J4vZNaaR-lkp@intel.com/
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
Changes for V2:
- Add information on how to fix
---
drivers/usb/typec/ucsi/ucsi_yoga_c630.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/ucsi_yoga_c630.c b/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
index f3a5e24ea84d..4cae85c0dc12 100644
--- a/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
+++ b/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
@@ -71,7 +71,7 @@ static int yoga_c630_ucsi_async_control(struct ucsi *ucsi, u64 command)
return yoga_c630_ec_ucsi_write(uec->ec, (u8*)&command);
}
-const struct ucsi_operations yoga_c630_ucsi_ops = {
+static const struct ucsi_operations yoga_c630_ucsi_ops = {
.read_version = yoga_c630_ucsi_read_version,
.read_cci = yoga_c630_ucsi_read_cci,
.read_message_in = yoga_c630_ucsi_read_message_in,
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: ucsi: make yoga_c630_ucsi_ops be static
2024-12-27 5:51 [PATCH] usb: typec: ucsi: make yoga_c630_ucsi_ops be static Pei Xiao
2024-12-27 7:54 ` Greg KH
@ 2024-12-31 2:38 ` Dmitry Baryshkov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2024-12-31 2:38 UTC (permalink / raw)
To: Pei Xiao; +Cc: linux-usb, linux-kernel, heikki.krogerus, kernel test robot
On Fri, Dec 27, 2024 at 01:51:51PM +0800, Pei Xiao wrote:
> sparse warnings:
> drivers/usb/typec/ucsi/ucsi_yoga_c630.c:101:30: sparse: sparse:
> symbol 'yoga_c630_ucsi_ops' was not declared. Should it be static?
>
> Fixes: 2ea6d07efe53 ("usb: typec: ucsi: add Lenovo Yoga C630 glue driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202412102033.J4vZNaaR-lkp@intel.com/
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
> drivers/usb/typec/ucsi/ucsi_yoga_c630.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-31 2:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27 5:51 [PATCH] usb: typec: ucsi: make yoga_c630_ucsi_ops be static Pei Xiao
2024-12-27 7:54 ` Greg KH
2024-12-27 8:54 ` [PATCH V2] " Pei Xiao
2024-12-31 2:38 ` [PATCH] " Dmitry Baryshkov
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).