On 3/18/26 4:17 PM, Huang Shijie wrote:
> I guess the .rej patch is left by previous operations.
> So you`d better to use "git clean -xdf" before you do the
"git-am".
>
> The following is my working log :
> ------------------------------------------------------
>
> huangsj@SH-HV00110:~/crash-2$ git log --oneline -1
> 95c1b0a (HEAD -> master, origin/master, origin/HEAD) Fix for "help
-r/-D" to display register values and notes[]
>
> huangsj@SH-HV00110:~/crash-2$ git am
0001-xarray-add-a-new-parameter-for-do_xarray.patch
> Applying: xarray: add a new parameter for do_xarray
> error: patch failed: ipcs.c:1150
> error: ipcs.c: patch does not apply
> Patch failed at 0001 xarray: add a new parameter for do_xarray
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
>
> huangsj@SH-HV00110:~/crash-2$ git apply --reject
0001-xarray-add-a-new-parameter-for-do_xarray.patch
> Checking patch bpf.c...
> Checking patch defs.h...
> Checking patch dev.c...
> Checking patch diskdump.c...
> Checking patch filesys.c...
> Checking patch ipcs.c...
> Checking patch kernel.c...
> Checking patch task.c...
> Applied patch bpf.c cleanly.
> Applied patch defs.h cleanly.
> Applied patch dev.c cleanly.
> Applied patch diskdump.c cleanly.
> Applied patch filesys.c cleanly.
> Applied patch ipcs.c cleanly.
> Applied patch kernel.c cleanly.
> Applied patch task.c cleanly.
>
> huangsj@SH-HV00110:~/crash-2$ git add -u
>
> huangsj@SH-HV00110:~/crash-2$ git am --continue
> Applying: xarray: add a new parameter for do_xarray
> ------------------------------------------------------
>
> I do not see any .rej patch.
If you still cannot fix this issue, please let me know.
I can create a patch to convert the ipcs.c to unix format by "dos2unit"
and rebase the whole patch set again.
Yes, please.
Here is my log:
[root@xx crash]# git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
1.patch
v4-0.patch
v4-1.patch
v4-2.patch
v4-3.patch
v4-4.patch
nothing added to commit but untracked files present (use "git add" to track)
[root@xx crash]# git am v4-1.patch
Applying: xarray: add a new parameter for do_xarray
error: patch failed: ipcs.c:1150
error: ipcs.c: patch does not apply
Patch failed at 0001 xarray: add a new parameter for do_xarray
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am
--abort".
hint: Disable this message with "git config set advice.mergeConflict false"
[root@xx crash]# git apply --reject v4-1.patch
Checking patch bpf.c...
Checking patch defs.h...
Checking patch dev.c...
Checking patch diskdump.c...
Checking patch filesys.c...
Checking patch ipcs.c...
error: while searching for:
{
long len;
ipcs_table.cnt = do_xarray(ipcs_idr_p, XARRAY_COUNT, NULL);
if (ipcs_table.cnt) {
len = sizeof(struct list_pair) * (ipcs_table.cnt+1);
ipcs_table.lp = (struct list_pair *)GETBUF(len);
ipcs_table.lp[0].index = ipcs_table.cnt;
ipcs_table.cnt = do_xarray(ipcs_idr_p, XARRAY_GATHER,
ipcs_table.lp);
} else
ipcs_table.lp = NULL;
}
error: patch failed: ipcs.c:1150
Checking patch kernel.c...
Checking patch task.c...
Applied patch bpf.c cleanly.
Applied patch defs.h cleanly.
Applied patch dev.c cleanly.
Applied patch diskdump.c cleanly.
Applied patch filesys.c cleanly.
Applying patch ipcs.c with 1 reject...
Rejected hunk #1.
Applied patch kernel.c cleanly.
Applied patch task.c cleanly.
[root@xx crash]#
[root@xx crash]# git add -u
[root@xx crash]# git am --continue
Applying: xarray: add a new parameter for do_xarray
[root@xx crash]# git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
1.patch
ipcs.c.rej
v4-0.patch
v4-1.patch
v4-2.patch
v4-3.patch
v4-4.patch
Lianbo