linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] coresight: syscfg: fix compiler warnings
@ 2021-08-30 17:28 Jian Cai
  2021-09-06 15:06 ` Mathieu Poirier
  0 siblings, 1 reply; 4+ messages in thread
From: Jian Cai @ 2021-08-30 17:28 UTC (permalink / raw)
  Cc: mike.leach, linux, dianders, mka, manojgupta, llozano, coresight,
	linux-arm-kernel, clang-built-linux, Jian Cai, Mathieu Poirier,
	Suzuki K Poulose, Leo Yan, Alexander Shishkin,
	Greg Kroah-Hartman, linux-kernel

This fixes warnings with -Wimplicit-function-declaration, e.g.

drivers/hwtracing/coresight/coresight-syscfg.c:455:15: error:
implicit declaration of function 'kzalloc' [-Werror,
-Wimplicit-function-declaration]
        csdev_item = kzalloc(sizeof(struct cscfg_registered_csdev),
                             GFP_KERNEL);

Fixes: 85e2414c518a ("coresight: syscfg: Initial coresight system configuration")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jian Cai <jiancai@google.com>
---

Changes v1 -> v2:
  Format the commit message and add Fixes and Reviewed-by tag.

 drivers/hwtracing/coresight/coresight-syscfg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/coresight-syscfg.c b/drivers/hwtracing/coresight/coresight-syscfg.c
index fc0760f55c53..43054568430f 100644
--- a/drivers/hwtracing/coresight/coresight-syscfg.c
+++ b/drivers/hwtracing/coresight/coresight-syscfg.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/platform_device.h>
+#include <linux/slab.h>
 
 #include "coresight-config.h"
 #include "coresight-etm-perf.h"
-- 
2.33.0.259.gc128427fd7-goog


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

* Re: [PATCH v2] coresight: syscfg: fix compiler warnings
  2021-08-30 17:28 [PATCH v2] coresight: syscfg: fix compiler warnings Jian Cai
@ 2021-09-06 15:06 ` Mathieu Poirier
  2021-09-07 17:51   ` Doug Anderson
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Poirier @ 2021-09-06 15:06 UTC (permalink / raw)
  To: Jian Cai
  Cc: mike.leach, linux, dianders, mka, manojgupta, llozano, coresight,
	linux-arm-kernel, clang-built-linux, Suzuki K Poulose, Leo Yan,
	Alexander Shishkin, Greg Kroah-Hartman, linux-kernel

On Mon, Aug 30, 2021 at 10:28:19AM -0700, Jian Cai wrote:
> This fixes warnings with -Wimplicit-function-declaration, e.g.
> 
> drivers/hwtracing/coresight/coresight-syscfg.c:455:15: error:
> implicit declaration of function 'kzalloc' [-Werror,
> -Wimplicit-function-declaration]
>         csdev_item = kzalloc(sizeof(struct cscfg_registered_csdev),
>                              GFP_KERNEL);
> 
> Fixes: 85e2414c518a ("coresight: syscfg: Initial coresight system configuration")
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Jian Cai <jiancai@google.com>
> ---
> 
> Changes v1 -> v2:
>   Format the commit message and add Fixes and Reviewed-by tag.
> 
>  drivers/hwtracing/coresight/coresight-syscfg.c | 1 +
>  1 file changed, 1 insertion(+)
>

I have applied this patch to my local tree.  I will push it to the coresight-next
branch when 5.15-rc1 is published next week.

Thanks,
Mathieu

> diff --git a/drivers/hwtracing/coresight/coresight-syscfg.c b/drivers/hwtracing/coresight/coresight-syscfg.c
> index fc0760f55c53..43054568430f 100644
> --- a/drivers/hwtracing/coresight/coresight-syscfg.c
> +++ b/drivers/hwtracing/coresight/coresight-syscfg.c
> @@ -5,6 +5,7 @@
>   */
>  
>  #include <linux/platform_device.h>
> +#include <linux/slab.h>
>  
>  #include "coresight-config.h"
>  #include "coresight-etm-perf.h"
> -- 
> 2.33.0.259.gc128427fd7-goog
> 

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

* Re: [PATCH v2] coresight: syscfg: fix compiler warnings
  2021-09-06 15:06 ` Mathieu Poirier
@ 2021-09-07 17:51   ` Doug Anderson
  2021-09-07 17:58     ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Anderson @ 2021-09-07 17:51 UTC (permalink / raw)
  To: Mathieu Poirier
  Cc: Jian Cai, Mike Leach, Guenter Roeck, Matthias Kaehlcke,
	Manoj Gupta, Luis Lozano, coresight, Linux ARM,
	clang-built-linux, Suzuki K Poulose, Leo Yan, Alexander Shishkin,
	Greg Kroah-Hartman, LKML

Hi,

On Mon, Sep 6, 2021 at 8:06 AM Mathieu Poirier
<mathieu.poirier@linaro.org> wrote:
>
> On Mon, Aug 30, 2021 at 10:28:19AM -0700, Jian Cai wrote:
> > This fixes warnings with -Wimplicit-function-declaration, e.g.
> >
> > drivers/hwtracing/coresight/coresight-syscfg.c:455:15: error:
> > implicit declaration of function 'kzalloc' [-Werror,
> > -Wimplicit-function-declaration]
> >         csdev_item = kzalloc(sizeof(struct cscfg_registered_csdev),
> >                              GFP_KERNEL);
> >
> > Fixes: 85e2414c518a ("coresight: syscfg: Initial coresight system configuration")
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > Signed-off-by: Jian Cai <jiancai@google.com>
> > ---
> >
> > Changes v1 -> v2:
> >   Format the commit message and add Fixes and Reviewed-by tag.
> >
> >  drivers/hwtracing/coresight/coresight-syscfg.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> I have applied this patch to my local tree.  I will push it to the coresight-next
> branch when 5.15-rc1 is published next week.

Out of curiosity, does the fact that it'll be in coresight-next mean
that this will target v5.15 or v5.16? I usually think of "-next"
branches as targeting one major version later, so I'd assume v5.16?
...but it would be nice if this warning could get fixed somewhere in
v5.15.

Thanks and sorry if this was obvious and I just didn't know.

-Doug

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

* Re: [PATCH v2] coresight: syscfg: fix compiler warnings
  2021-09-07 17:51   ` Doug Anderson
@ 2021-09-07 17:58     ` Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2021-09-07 17:58 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Mathieu Poirier, Jian Cai, Mike Leach, Matthias Kaehlcke,
	Manoj Gupta, Luis Lozano, coresight, Linux ARM,
	clang-built-linux, Suzuki K Poulose, Leo Yan, Alexander Shishkin,
	Greg Kroah-Hartman, LKML

On Tue, Sep 07, 2021 at 10:51:53AM -0700, Doug Anderson wrote:
> Hi,
> 
> On Mon, Sep 6, 2021 at 8:06 AM Mathieu Poirier
> <mathieu.poirier@linaro.org> wrote:
> >
> > On Mon, Aug 30, 2021 at 10:28:19AM -0700, Jian Cai wrote:
> > > This fixes warnings with -Wimplicit-function-declaration, e.g.
> > >
> > > drivers/hwtracing/coresight/coresight-syscfg.c:455:15: error:
> > > implicit declaration of function 'kzalloc' [-Werror,
> > > -Wimplicit-function-declaration]
> > >         csdev_item = kzalloc(sizeof(struct cscfg_registered_csdev),
> > >                              GFP_KERNEL);
> > >
> > > Fixes: 85e2414c518a ("coresight: syscfg: Initial coresight system configuration")
> > > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > > Signed-off-by: Jian Cai <jiancai@google.com>
> > > ---
> > >
> > > Changes v1 -> v2:
> > >   Format the commit message and add Fixes and Reviewed-by tag.
> > >
> > >  drivers/hwtracing/coresight/coresight-syscfg.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> >
> > I have applied this patch to my local tree.  I will push it to the coresight-next
> > branch when 5.15-rc1 is published next week.
> 
> Out of curiosity, does the fact that it'll be in coresight-next mean
> that this will target v5.15 or v5.16? I usually think of "-next"
> branches as targeting one major version later, so I'd assume v5.16?
> ...but it would be nice if this warning could get fixed somewhere in
> v5.15.
> 
Normally "when 5.15-rc1 is published" would imply v5.16.

Note that warnings are now reported as errors in mainline,
since -Werror is now enabled by default.

Guenter

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

end of thread, other threads:[~2021-09-07 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 17:28 [PATCH v2] coresight: syscfg: fix compiler warnings Jian Cai
2021-09-06 15:06 ` Mathieu Poirier
2021-09-07 17:51   ` Doug Anderson
2021-09-07 17:58     ` Guenter Roeck

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).