diff mbox

[U-Boot,09/10] ddr: altera: Staticize global variables

Message ID 1459994646-11013-9-git-send-email-marex@denx.de
State Accepted
Commit 85f76628a05539699a4aeb0a511109d322293033
Delegated to: Marek Vasut
Headers show

Commit Message

Marek Vasut April 7, 2016, 2:04 a.m. UTC
Just staticize global variables in sequencer, since there is no
point in having these symbols available outside of the DDR code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
---
 drivers/ddr/altera/sequencer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

George Broz April 8, 2016, 10:15 p.m. UTC | #1
On 6 April 2016 at 19:04, Marek Vasut <marex@denx.de> wrote:
> Just staticize global variables in sequencer, since there is no
> point in having these symbols available outside of the DDR code.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> Cc: Chin Liang See <clsee@altera.com>
> ---
>  drivers/ddr/altera/sequencer.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
> index c41555f..5ea53ad 100644
> --- a/drivers/ddr/altera/sequencer.c
> +++ b/drivers/ddr/altera/sequencer.c
> @@ -57,7 +57,7 @@ const struct socfpga_sdram_misc_config *misccfg;
>         STATIC_SKIP_DELAY_LOOPS)
>
>  /* calibration steps requested by the rtl */
> -u16 dyn_calib_steps;
> +static u16 dyn_calib_steps;
>
>  /*
>   * To make CALIB_SKIP_DELAY_LOOPS a dynamic conditional option
> @@ -68,13 +68,13 @@ u16 dyn_calib_steps;
>   * zero when skipping
>   */
>
> -u16 skip_delay_mask;   /* mask off bits when skipping/not-skipping */
> +static u16 skip_delay_mask;    /* mask off bits when skipping/not-skipping */
>
>  #define SKIP_DELAY_LOOP_VALUE_OR_ZERO(non_skip_value) \
>         ((non_skip_value) & skip_delay_mask)
>
> -struct gbl_type *gbl;
> -struct param_type *param;
> +static struct gbl_type *gbl;
> +static struct param_type *param;
>
>  static void set_failing_group_stage(u32 group, u32 stage,
>         u32 substage)
> --
> 2.7.0
>

Tested on: SoCKit, DE0_Nano_SoC
Tested-by: George Broz <brozgeo at gmail.com>
Pavel Machek April 11, 2016, 11:05 a.m. UTC | #2
On Thu 2016-04-07 04:04:05, Marek Vasut wrote:
> Just staticize global variables in sequencer, since there is no
> point in having these symbols available outside of the DDR code.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> Cc: Chin Liang See <clsee@altera.com>

Acked-by: Pavel Machek <pavel@denx.de>
diff mbox

Patch

diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
index c41555f..5ea53ad 100644
--- a/drivers/ddr/altera/sequencer.c
+++ b/drivers/ddr/altera/sequencer.c
@@ -57,7 +57,7 @@  const struct socfpga_sdram_misc_config *misccfg;
 	STATIC_SKIP_DELAY_LOOPS)
 
 /* calibration steps requested by the rtl */
-u16 dyn_calib_steps;
+static u16 dyn_calib_steps;
 
 /*
  * To make CALIB_SKIP_DELAY_LOOPS a dynamic conditional option
@@ -68,13 +68,13 @@  u16 dyn_calib_steps;
  * zero when skipping
  */
 
-u16 skip_delay_mask;	/* mask off bits when skipping/not-skipping */
+static u16 skip_delay_mask;	/* mask off bits when skipping/not-skipping */
 
 #define SKIP_DELAY_LOOP_VALUE_OR_ZERO(non_skip_value) \
 	((non_skip_value) & skip_delay_mask)
 
-struct gbl_type *gbl;
-struct param_type *param;
+static struct gbl_type *gbl;
+static struct param_type *param;
 
 static void set_failing_group_stage(u32 group, u32 stage,
 	u32 substage)