git-reference icon indicating copy to clipboard operation
git-reference copied to clipboard

git merge No conflict reported!!

Open tangzhiqiang3 opened this issue 2 years ago • 1 comments

local branch: ` static int __clk_core_init(struct clk_core *core) { int ret; struct clk_core *parent; unsigned long rate; int phase;

if (!core)
    return -EINVAL;

clk_prepare_lock();
core->hw->core = core;

ret = clk_pm_runtime_get(core);
if (ret)
    goto unlock;

... } `

after branch: ` static int __clk_core_init(struct clk_core *core) { int ret; struct clk_core *parent; unsigned long rate; int phase;

if (!core)
    return -EINVAL;

clk_prepare_lock();

/*
 * Set hw->core after grabbing the prepare_lock to synchronize with
 * callers of clk_core_fill_parent_index() where we treat hw->core
 * being NULL as the clk not being registered yet. This is crucial so
 * that clks aren't parented until their parent is fully registered.
 */
core->hw->core = core;

ret = clk_pm_runtime_get(core);
if (ret)
    goto unlock;

... } `

local branch:execute "git merge after" ` static int __clk_core_init(struct clk_core *core) { int ret; struct clk_core *parent; unsigned long rate; int phase;

if (!core)
    return -EINVAL;

clk_prepare_lock();
core->hw->core = core;

/*
 * Set hw->core after grabbing the prepare_lock to synchronize with
 * callers of clk_core_fill_parent_index() where we treat hw->core
 * being NULL as the clk not being registered yet. This is crucial so
 * that clks aren't parented until their parent is fully registered.
 */
core->hw->core = core;

ret = clk_pm_runtime_get(core);
if (ret)
    goto unlock;

... } `

Result In two occurrences after merge:"core->hw->core = core;", And it happens every time.

  1. Can this problem be fixed
  2. How can I modify the source code so that this does not happen

tangzhiqiang3 avatar May 18 '22 07:05 tangzhiqiang3

git version 2.17.1 and git version 2.36.1 test result.

@schacon @matthewmccullough

tangzhiqiang3 avatar May 18 '22 07:05 tangzhiqiang3