Message ID | 20250516092716.3918-2-victorshihgli@gmail.com |
---|---|
State | New |
Headers | show |
Series | Adjust some error messages for SD UHS-II initialization process | expand |
On Fri, 16 May 2025 at 11:27, Victor Shih <victorshihgli@gmail.com> wrote: > > From: Victor Shih <victor.shih@genesyslogic.com.tw> > > Adjust some error messages to debug mode to avoid causing > misunderstanding it is an error. > > Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> > Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw> > --- > drivers/mmc/core/sd_uhs2.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/sd_uhs2.c b/drivers/mmc/core/sd_uhs2.c > index 1c31d0dfa961..58c4cef37f7c 100644 > --- a/drivers/mmc/core/sd_uhs2.c > +++ b/drivers/mmc/core/sd_uhs2.c > @@ -36,6 +36,10 @@ > #include "sd_ops.h" > #include "mmc_ops.h" > > +#define DRIVER_NAME "sd_uhs2" > +#define DBG(f, x...) \ > + pr_debug(DRIVER_NAME " [%s()]: " f, __func__, ## x) > + We don't need a macro for this, just use a pr_debug() below instead. > #define UHS2_WAIT_CFG_COMPLETE_PERIOD_US (1 * 1000) > #define UHS2_WAIT_CFG_COMPLETE_TIMEOUT_MS 100 > > @@ -91,8 +95,8 @@ static int sd_uhs2_phy_init(struct mmc_host *host) > > err = host->ops->uhs2_control(host, UHS2_PHY_INIT); > if (err) { > - pr_err("%s: failed to initial phy for UHS-II!\n", > - mmc_hostname(host)); > + DBG("%s: failed to initial phy for UHS-II!\n", > + mmc_hostname(host)); > } > > return err; > -- > 2.43.0 > Kind regards Uffe
On Mon, May 19, 2025 at 8:10 PM Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Fri, 16 May 2025 at 11:27, Victor Shih <victorshihgli@gmail.com> wrote: > > > > From: Victor Shih <victor.shih@genesyslogic.com.tw> > > > > Adjust some error messages to debug mode to avoid causing > > misunderstanding it is an error. > > > > Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> > > Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw> > > --- > > drivers/mmc/core/sd_uhs2.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/mmc/core/sd_uhs2.c b/drivers/mmc/core/sd_uhs2.c > > index 1c31d0dfa961..58c4cef37f7c 100644 > > --- a/drivers/mmc/core/sd_uhs2.c > > +++ b/drivers/mmc/core/sd_uhs2.c > > @@ -36,6 +36,10 @@ > > #include "sd_ops.h" > > #include "mmc_ops.h" > > > > +#define DRIVER_NAME "sd_uhs2" > > +#define DBG(f, x...) \ > > + pr_debug(DRIVER_NAME " [%s()]: " f, __func__, ## x) > > + > > We don't need a macro for this, just use a pr_debug() below instead. > Hi, Ulf I will drop this macro and use pr_debug() instead in the next version. Thanks, Victor Shih > > #define UHS2_WAIT_CFG_COMPLETE_PERIOD_US (1 * 1000) > > #define UHS2_WAIT_CFG_COMPLETE_TIMEOUT_MS 100 > > > > @@ -91,8 +95,8 @@ static int sd_uhs2_phy_init(struct mmc_host *host) > > > > err = host->ops->uhs2_control(host, UHS2_PHY_INIT); > > if (err) { > > - pr_err("%s: failed to initial phy for UHS-II!\n", > > - mmc_hostname(host)); > > + DBG("%s: failed to initial phy for UHS-II!\n", > > + mmc_hostname(host)); > > } > > > > return err; > > -- > > 2.43.0 > > > > Kind regards > Uffe
diff --git a/drivers/mmc/core/sd_uhs2.c b/drivers/mmc/core/sd_uhs2.c index 1c31d0dfa961..58c4cef37f7c 100644 --- a/drivers/mmc/core/sd_uhs2.c +++ b/drivers/mmc/core/sd_uhs2.c @@ -36,6 +36,10 @@ #include "sd_ops.h" #include "mmc_ops.h" +#define DRIVER_NAME "sd_uhs2" +#define DBG(f, x...) \ + pr_debug(DRIVER_NAME " [%s()]: " f, __func__, ## x) + #define UHS2_WAIT_CFG_COMPLETE_PERIOD_US (1 * 1000) #define UHS2_WAIT_CFG_COMPLETE_TIMEOUT_MS 100 @@ -91,8 +95,8 @@ static int sd_uhs2_phy_init(struct mmc_host *host) err = host->ops->uhs2_control(host, UHS2_PHY_INIT); if (err) { - pr_err("%s: failed to initial phy for UHS-II!\n", - mmc_hostname(host)); + DBG("%s: failed to initial phy for UHS-II!\n", + mmc_hostname(host)); } return err;