linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] csky: Move static keyword to the front of declaration
@ 2019-09-03 11:36 Krzysztof Wilczynski
  2019-09-03 17:12 ` Guo Ren
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Wilczynski @ 2019-09-03 11:36 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Guo Ren, linux-kernel

Move the static keyword to the front of declaration of
csky_pmu_of_device_ids, and resolve the following compiler
warning that can be seen when building with warnings
enabled (W=1):

arch/csky/kernel/perf_event.c:1340:1: warning:
  ‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
---
Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com

 arch/csky/kernel/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index 4c1a1934d76a..bc33e4ed189d 100644
--- a/arch/csky/kernel/perf_event.c
+++ b/arch/csky/kernel/perf_event.c
@@ -1337,7 +1337,7 @@ int csky_pmu_device_probe(struct platform_device *pdev,
 	return ret;
 }
 
-const static struct of_device_id csky_pmu_of_device_ids[] = {
+static const struct of_device_id csky_pmu_of_device_ids[] = {
 	{.compatible = "csky,csky-pmu"},
 	{},
 };
-- 
2.22.1


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

* Re: [PATCH] csky: Move static keyword to the front of declaration
  2019-09-03 11:36 [PATCH] csky: Move static keyword to the front of declaration Krzysztof Wilczynski
@ 2019-09-03 17:12 ` Guo Ren
  2019-09-03 19:44   ` Krzysztof Wilczynski
  0 siblings, 1 reply; 3+ messages in thread
From: Guo Ren @ 2019-09-03 17:12 UTC (permalink / raw)
  To: Krzysztof Wilczynski
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Linux Kernel Mailing List

Thx,

Acked by: Guo Ren <guoren@kernel.org>

You may also modify others'

➜  linux-next git:(linux-next-for-v5.4) ✗ grep "const static" * -r
arch/csky/kernel/perf_event.c:const static struct of_device_id
csky_pmu_of_device_ids[] = {
arch/nds32/kernel/perf_event_cpu.c:const static struct of_device_id
cpu_pmu_of_device_ids[] = {
drivers/gpu/drm/amd/display/dc/core/dc.c:const static char
DC_BUILD_ID[] = "production-build";
drivers/gpu/drm/msm/dsi/dsi_cfg.c:const static struct
msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = {
drivers/gpu/drm/msm/dsi/dsi_cfg.c:const static struct
msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = {
drivers/gpu/drm/msm/dsi/dsi_cfg.c:const static struct
msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = {
drivers/leds/leds-ti-lmu-common.c:const static int ramp_table[16] =
{2048, 262000, 524000, 1049000, 2090000,
drivers/leds/leds-lm3532.c:const static int
als_imp_table[LM3532_NUM_IMP_VALS] = {37000, 18500, 12330,
drivers/leds/leds-lm3532.c:const static int
als_avrg_table[LM3532_NUM_AVG_VALS] = {17920, 35840, 71680,
drivers/leds/leds-lm3532.c:const static int
ramp_table[LM3532_NUM_RAMP_VALS] = { 8, 1024, 2048, 4096, 8192,
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:const static u8
he_if_types_ext_capa_sta[] = {
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:const static struct
wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:const static char
*iwarp_state_names[] = {
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:const static char
*g_dsaf_mode_match[DSAF_MODE_MAX] = {
drivers/pci/pci-bridge-emul.c:const static struct
pci_bridge_reg_behavior pci_regs_behavior[] = {
drivers/pci/pci-bridge-emul.c:const static struct
pci_bridge_reg_behavior pcie_cap_regs_behavior[] = {
fs/ceph/export.c: const static int snap_handle_length =
fs/ceph/export.c: const static int handle_length =
fs/ceph/export.c: const static int connected_handle_length =
fs/unicode/utf8-selftest.c:const static struct {
fs/unicode/utf8-selftest.c:const static struct {

On Tue, Sep 3, 2019 at 7:36 PM Krzysztof Wilczynski <kw@linux.com> wrote:
>
> Move the static keyword to the front of declaration of
> csky_pmu_of_device_ids, and resolve the following compiler
> warning that can be seen when building with warnings
> enabled (W=1):
>
> arch/csky/kernel/perf_event.c:1340:1: warning:
>   ‘static’ is not at beginning of declaration [-Wold-style-declaration]
>
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
> ---
> Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com
>
>  arch/csky/kernel/perf_event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
> index 4c1a1934d76a..bc33e4ed189d 100644
> --- a/arch/csky/kernel/perf_event.c
> +++ b/arch/csky/kernel/perf_event.c
> @@ -1337,7 +1337,7 @@ int csky_pmu_device_probe(struct platform_device *pdev,
>         return ret;
>  }
>
> -const static struct of_device_id csky_pmu_of_device_ids[] = {
> +static const struct of_device_id csky_pmu_of_device_ids[] = {
>         {.compatible = "csky,csky-pmu"},
>         {},
>  };
> --
> 2.22.1
>


-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

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

* Re: [PATCH] csky: Move static keyword to the front of declaration
  2019-09-03 17:12 ` Guo Ren
@ 2019-09-03 19:44   ` Krzysztof Wilczynski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Wilczynski @ 2019-09-03 19:44 UTC (permalink / raw)
  To: Guo Ren
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Linux Kernel Mailing List

Hello Guo,

Thank you for the feedback!

[...]
> You may also modify others'
[...]

That work is on-going, and patches are being sent out to address other
warnings of this nature to the respective maintainers. :)

Krzysztof

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

end of thread, other threads:[~2019-09-03 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 11:36 [PATCH] csky: Move static keyword to the front of declaration Krzysztof Wilczynski
2019-09-03 17:12 ` Guo Ren
2019-09-03 19:44   ` Krzysztof Wilczynski

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