* [PATCH] interconnect: Fix a GCC compiler warning @ 2018-09-16 14:31 zhong jiang 2018-09-17 6:15 ` zhong jiang 2018-09-17 8:53 ` zhong jiang 0 siblings, 2 replies; 11+ messages in thread From: zhong jiang @ 2018-09-16 14:31 UTC (permalink / raw) To: georgi.djakov; +Cc: linux-kernel Fix the following compile warning: drivers/interconnect/core.c:26:23: warning: icc_debugfs_dir defined but not used [-Wunused-variable] static struct dentry *icc_debugfs_dir; Signed-off-by: zhong jiang <zhongjiang@huawei.com> --- drivers/interconnect/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 2740f1a..9ea9959 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -23,7 +23,10 @@ static DEFINE_IDR(icc_idr); static LIST_HEAD(icc_provider_list); static DEFINE_MUTEX(icc_lock); + +#ifdef CONFIG_DEBUG_FS static struct dentry *icc_debugfs_dir; +#endif /** * struct icc_req - constraints that are attached to each node -- 1.7.12.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-16 14:31 [PATCH] interconnect: Fix a GCC compiler warning zhong jiang @ 2018-09-17 6:15 ` zhong jiang 2018-09-17 6:54 ` Greg KH 2018-09-17 8:53 ` zhong jiang 1 sibling, 1 reply; 11+ messages in thread From: zhong jiang @ 2018-09-17 6:15 UTC (permalink / raw) To: georgi.djakov, Andrew Morton, Greg KH; +Cc: linux-kernel On 2018/9/16 22:31, zhong jiang wrote: > Fix the following compile warning: +to Andrew and Greg ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 6:15 ` zhong jiang @ 2018-09-17 6:54 ` Greg KH 2018-09-17 7:15 ` zhong jiang 0 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2018-09-17 6:54 UTC (permalink / raw) To: zhong jiang; +Cc: georgi.djakov, Andrew Morton, linux-kernel On Mon, Sep 17, 2018 at 02:15:31PM +0800, zhong jiang wrote: > On 2018/9/16 22:31, zhong jiang wrote: > > Fix the following compile warning: > +to Andrew and Greg > +me for what? Nothing is here :( ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 6:54 ` Greg KH @ 2018-09-17 7:15 ` zhong jiang 2018-09-17 8:48 ` Greg KH 0 siblings, 1 reply; 11+ messages in thread From: zhong jiang @ 2018-09-17 7:15 UTC (permalink / raw) To: Greg KH; +Cc: georgi.djakov, Andrew Morton, linux-kernel On 2018/9/17 14:54, Greg KH wrote: > On Mon, Sep 17, 2018 at 02:15:31PM +0800, zhong jiang wrote: >> On 2018/9/16 22:31, zhong jiang wrote: >>> Fix the following compile warning: >> +to Andrew and Greg >> > +me for what? Nothing is here :( The drivers/interconnect/core.c is not updated since 2017. I think the maintainer is busy with other things. Therefore, I hope that you or Andrew and pick up the patch. :-) . if you can not do this. I am sorry for disturbing you. Thanks, zhong jiang ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 7:15 ` zhong jiang @ 2018-09-17 8:48 ` Greg KH 2018-09-17 8:56 ` zhong jiang 0 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2018-09-17 8:48 UTC (permalink / raw) To: zhong jiang; +Cc: georgi.djakov, Andrew Morton, linux-kernel On Mon, Sep 17, 2018 at 03:15:59PM +0800, zhong jiang wrote: > On 2018/9/17 14:54, Greg KH wrote: > > On Mon, Sep 17, 2018 at 02:15:31PM +0800, zhong jiang wrote: > >> On 2018/9/16 22:31, zhong jiang wrote: > >>> Fix the following compile warning: > >> +to Andrew and Greg > >> > > +me for what? Nothing is here :( > The drivers/interconnect/core.c is not updated since 2017. I think the maintainer > is busy with other things. Therefore, I hope that you or Andrew and pick up the > patch. :-) . if you can not do this. I am sorry for disturbing you. I can do that, but again, I do not see any patch here in this email at all, sorry. greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 8:48 ` Greg KH @ 2018-09-17 8:56 ` zhong jiang 0 siblings, 0 replies; 11+ messages in thread From: zhong jiang @ 2018-09-17 8:56 UTC (permalink / raw) To: Greg KH; +Cc: georgi.djakov, Andrew Morton, linux-kernel On 2018/9/17 16:48, Greg KH wrote: > On Mon, Sep 17, 2018 at 03:15:59PM +0800, zhong jiang wrote: >> On 2018/9/17 14:54, Greg KH wrote: >>> On Mon, Sep 17, 2018 at 02:15:31PM +0800, zhong jiang wrote: >>>> On 2018/9/16 22:31, zhong jiang wrote: >>>>> Fix the following compile warning: >>>> +to Andrew and Greg >>>> >>> +me for what? Nothing is here :( >> The drivers/interconnect/core.c is not updated since 2017. I think the maintainer >> is busy with other things. Therefore, I hope that you or Andrew and pick up the >> patch. :-) . if you can not do this. I am sorry for disturbing you. > I can do that, but again, I do not see any patch here in this email at > all, sorry. :-[ , I am sorry for handling email mistakely. Thanks, zhong jiang > greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-16 14:31 [PATCH] interconnect: Fix a GCC compiler warning zhong jiang 2018-09-17 6:15 ` zhong jiang @ 2018-09-17 8:53 ` zhong jiang 2018-09-17 8:59 ` Greg KH 1 sibling, 1 reply; 11+ messages in thread From: zhong jiang @ 2018-09-17 8:53 UTC (permalink / raw) To: georgi.djakov, Andrew Morton, Greg KH; +Cc: linux-kernel +to Greg and Andrew. On 2018/9/16 22:31, zhong jiang wrote: > Fix the following compile warning: > > drivers/interconnect/core.c:26:23: warning: icc_debugfs_dir defined but not used [-Wunused-variable] > static struct dentry *icc_debugfs_dir; > > Signed-off-by: zhong jiang <zhongjiang@huawei.com> > --- > drivers/interconnect/core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c > index 2740f1a..9ea9959 100644 > --- a/drivers/interconnect/core.c > +++ b/drivers/interconnect/core.c > @@ -23,7 +23,10 @@ > static DEFINE_IDR(icc_idr); > static LIST_HEAD(icc_provider_list); > static DEFINE_MUTEX(icc_lock); > + > +#ifdef CONFIG_DEBUG_FS > static struct dentry *icc_debugfs_dir; > +#endif > > /** > * struct icc_req - constraints that are attached to each node ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 8:53 ` zhong jiang @ 2018-09-17 8:59 ` Greg KH 2018-09-17 9:19 ` zhong jiang 0 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2018-09-17 8:59 UTC (permalink / raw) To: zhong jiang; +Cc: georgi.djakov, Andrew Morton, linux-kernel On Mon, Sep 17, 2018 at 04:53:31PM +0800, zhong jiang wrote: > +to Greg and Andrew. > > On 2018/9/16 22:31, zhong jiang wrote: > > Fix the following compile warning: > > > > drivers/interconnect/core.c:26:23: warning: icc_debugfs_dir defined but not used [-Wunused-variable] > > static struct dentry *icc_debugfs_dir; > > > > Signed-off-by: zhong jiang <zhongjiang@huawei.com> > > --- > > drivers/interconnect/core.c | 3 +++ This file is not in a released tree, where are you seeing it? > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c > > index 2740f1a..9ea9959 100644 > > --- a/drivers/interconnect/core.c > > +++ b/drivers/interconnect/core.c > > @@ -23,7 +23,10 @@ > > static DEFINE_IDR(icc_idr); > > static LIST_HEAD(icc_provider_list); > > static DEFINE_MUTEX(icc_lock); > > + > > +#ifdef CONFIG_DEBUG_FS > > static struct dentry *icc_debugfs_dir; > > +#endif Why not move the variable to where it is used? It should be able to go under an existing #ifdef section, right? thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 8:59 ` Greg KH @ 2018-09-17 9:19 ` zhong jiang 2018-09-17 9:24 ` Greg KH 0 siblings, 1 reply; 11+ messages in thread From: zhong jiang @ 2018-09-17 9:19 UTC (permalink / raw) To: Greg KH; +Cc: georgi.djakov, Andrew Morton, linux-kernel On 2018/9/17 16:59, Greg KH wrote: > On Mon, Sep 17, 2018 at 04:53:31PM +0800, zhong jiang wrote: >> +to Greg and Andrew. >> >> On 2018/9/16 22:31, zhong jiang wrote: >>> Fix the following compile warning: >>> >>> drivers/interconnect/core.c:26:23: warning: 'icc_debugfs_dir' defined but not used [-Wunused-variable] >>> static struct dentry *icc_debugfs_dir; >>> >>> Signed-off-by: zhong jiang <zhongjiang@huawei.com> >>> --- >>> drivers/interconnect/core.c | 3 +++ > This file is not in a released tree, where are you seeing it? I see it in linux-next. >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c >>> index 2740f1a..9ea9959 100644 >>> --- a/drivers/interconnect/core.c >>> +++ b/drivers/interconnect/core.c >>> @@ -23,7 +23,10 @@ >>> static DEFINE_IDR(icc_idr); >>> static LIST_HEAD(icc_provider_list); >>> static DEFINE_MUTEX(icc_lock); >>> + >>> +#ifdef CONFIG_DEBUG_FS >>> static struct dentry *icc_debugfs_dir; >>> +#endif > Why not move the variable to where it is used? It should be able to go > under an existing #ifdef section, right? Because the variable need to be used in __init and __exit. So it should be identified as a gloabl variable. I fix it under the #ifdef condition. Thanks, zhong jiang > thanks, > > greg k-h > > . > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 9:19 ` zhong jiang @ 2018-09-17 9:24 ` Greg KH 2018-09-17 10:38 ` Georgi Djakov 0 siblings, 1 reply; 11+ messages in thread From: Greg KH @ 2018-09-17 9:24 UTC (permalink / raw) To: zhong jiang; +Cc: georgi.djakov, Andrew Morton, linux-kernel On Mon, Sep 17, 2018 at 05:19:18PM +0800, zhong jiang wrote: > On 2018/9/17 16:59, Greg KH wrote: > > On Mon, Sep 17, 2018 at 04:53:31PM +0800, zhong jiang wrote: > >> +to Greg and Andrew. > >> > >> On 2018/9/16 22:31, zhong jiang wrote: > >>> Fix the following compile warning: > >>> > >>> drivers/interconnect/core.c:26:23: warning: 'icc_debugfs_dir' defined but not used [-Wunused-variable] > >>> static struct dentry *icc_debugfs_dir; > >>> > >>> Signed-off-by: zhong jiang <zhongjiang@huawei.com> > >>> --- > >>> drivers/interconnect/core.c | 3 +++ > > This file is not in a released tree, where are you seeing it? > I see it in linux-next. Then please contact the owner of the branch where it came from. They are the only ones that can handle such a patch, not anyone else. > >>> 1 file changed, 3 insertions(+) > >>> > >>> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c > >>> index 2740f1a..9ea9959 100644 > >>> --- a/drivers/interconnect/core.c > >>> +++ b/drivers/interconnect/core.c > >>> @@ -23,7 +23,10 @@ > >>> static DEFINE_IDR(icc_idr); > >>> static LIST_HEAD(icc_provider_list); > >>> static DEFINE_MUTEX(icc_lock); > >>> + > >>> +#ifdef CONFIG_DEBUG_FS > >>> static struct dentry *icc_debugfs_dir; > >>> +#endif > > Why not move the variable to where it is used? It should be able to go > > under an existing #ifdef section, right? > Because the variable need to be used in __init and __exit. So it should be identified as > a gloabl variable. I fix it under the #ifdef condition. If the variable is being used this way, then the code is written incorrectly, such an #ifdef should not be needed for any debugfs calls/variables. thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] interconnect: Fix a GCC compiler warning 2018-09-17 9:24 ` Greg KH @ 2018-09-17 10:38 ` Georgi Djakov 0 siblings, 0 replies; 11+ messages in thread From: Georgi Djakov @ 2018-09-17 10:38 UTC (permalink / raw) To: Greg KH, zhong jiang; +Cc: Andrew Morton, linux-kernel Hi Zhong and Greg, On 09/17/2018 02:24 AM, Greg KH wrote: > On Mon, Sep 17, 2018 at 05:19:18PM +0800, zhong jiang wrote: >> On 2018/9/17 16:59, Greg KH wrote: >>> On Mon, Sep 17, 2018 at 04:53:31PM +0800, zhong jiang wrote: >>>> +to Greg and Andrew. >>>> >>>> On 2018/9/16 22:31, zhong jiang wrote: >>>>> Fix the following compile warning: >>>>> >>>>> drivers/interconnect/core.c:26:23: warning: 'icc_debugfs_dir' defined but not used [-Wunused-variable] >>>>> static struct dentry *icc_debugfs_dir; >>>>> >>>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com> >>>>> --- >>>>> drivers/interconnect/core.c | 3 +++ >>> This file is not in a released tree, where are you seeing it? >> I see it in linux-next. Yes, it has been recently pulled into linux-next for wider testing coverage. Thank you Zhong for reporting this. > > Then please contact the owner of the branch where it came from. They > are the only ones that can handle such a patch, not anyone else. > >>>>> 1 file changed, 3 insertions(+) >>>>> >>>>> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c >>>>> index 2740f1a..9ea9959 100644 >>>>> --- a/drivers/interconnect/core.c >>>>> +++ b/drivers/interconnect/core.c >>>>> @@ -23,7 +23,10 @@ >>>>> static DEFINE_IDR(icc_idr); >>>>> static LIST_HEAD(icc_provider_list); >>>>> static DEFINE_MUTEX(icc_lock); >>>>> + >>>>> +#ifdef CONFIG_DEBUG_FS >>>>> static struct dentry *icc_debugfs_dir; >>>>> +#endif >>> Why not move the variable to where it is used? It should be able to go >>> under an existing #ifdef section, right? >> Because the variable need to be used in __init and __exit. So it should be identified as >> a gloabl variable. I fix it under the #ifdef condition. > > If the variable is being used this way, then the code is written > incorrectly, such an #ifdef should not be needed for any debugfs > calls/variables. Thanks for the comments. Will improve it. BR, Georgi ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-09-17 10:38 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-09-16 14:31 [PATCH] interconnect: Fix a GCC compiler warning zhong jiang 2018-09-17 6:15 ` zhong jiang 2018-09-17 6:54 ` Greg KH 2018-09-17 7:15 ` zhong jiang 2018-09-17 8:48 ` Greg KH 2018-09-17 8:56 ` zhong jiang 2018-09-17 8:53 ` zhong jiang 2018-09-17 8:59 ` Greg KH 2018-09-17 9:19 ` zhong jiang 2018-09-17 9:24 ` Greg KH 2018-09-17 10:38 ` Georgi Djakov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox