ddr: altera: use KBUILD_BASENAME instead of __FILE__
PATCH 1/1 ddr: altera: use KBUILD_BASENAME instead of __FILE__
The KBUILD_BASENAME contains just the name of the compiled module, in this case 'sequencer', rather than a full path to the compiled file. Use it to prevent pulling the full path into the U-Boot binary, which is useless and annoying.
--- drivers/ddr/altera/sequencer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ddr/altera/sequencer.c +4 -4
@@ -3714,7 +3714,7 @@ static void debug_mem_calibrate(struct socfpga_sdrseq *seq, int pass)u32 debug_info;if (pass) { -debug ("%s: CALIBRATION PASSED\n" , __FILE__); +debug (KBUILD_BASENAME ": CALIBRATION PASSED\n" ); seq->gbl.fom_in /=2 ; seq->gbl.fom_out /=2 ;
@@ -3733,7 +3733,7 @@ static void debug_mem_calibrate(struct socfpga_sdrseq *seq, int pass)writel (debug_info, &phy_mgr_cfg->cal_debug_info);writel (PHY_MGR_CAL_SUCCESS , &phy_mgr_cfg->cal_status); }else { -debug ("%s: CALIBRATION FAILED\n" , __FILE__); +debug (KBUILD_BASENAME ": CALIBRATION FAILED\n" ); debug_info = seq->gbl.error_stage; debug_info |= seq->gbl.error_substage <<8 ;
@@ -3750,7 +3750,7 @@ static void debug_mem_calibrate(struct socfpga_sdrseq *seq, int pass)writel (debug_info, &sdr_reg_file->failing_stage); } -debug ("%s: Calibration complete\n" , __FILE__); +debug (KBUILD_BASENAME ": Calibration complete\n" ); }/**
@@ -3934,7 +3934,7 @@ int sdram_calibration_full(struct socfpga_sdr *sdr)initialize_tracking (&seq); -debug ("%s: Preparing to start memory calibration\n" , __FILE__); +debug (KBUILD_BASENAME ": Preparing to start memory calibration\n" );debug ("%s:%d\n" , __func__, __LINE__); debug_cond(DLEVEL >= 1,
Signature · 1 line
2.33.0
Quoted 14 lines
-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Tuesday, 14 September, 2021 11:20 AM
To: [email protected]
Cc: Marek Vasut <[email protected]>; Lim, Elly Siew Chin <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>
Subject: [PATCH] ddr: altera: useKBUILD_BASENAMEinstead of__FILE__The
KBUILD_BASENAMEcontains just the name of the compiled module, in this case 'sequencer', rather than a full path to the compiled file. Use it to prevent pulling the full path into the U-Boot binary, which is useless and annoying.
Quoted 8 lines
Signed-off-by Marek Vasut <[email protected]>Cc Siew Chin Lim <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Tien Fong Chee <[email protected]>--- drivers/ddr/altera/sequencer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Regards,
TF