Enforce consistent style

Execute "make indent" before submitting patches.
This commit is contained in:
Jim Huang 2021-08-07 23:33:37 +08:00
parent 43f20d0279
commit a26d93037e
3 changed files with 9 additions and 8 deletions

View File

@ -12,6 +12,9 @@ html: lkmpg.tex html.cfg
ln -sf lkmpg.html html/index.html
rm -f lkmpg.xref lkmpg.tmp lkmpg.html lkmpg.css lkmpg.4ct lkmpg.4tc lkmpg.dvi lkmpg.lg lkmpg.idv lkmpg*.svg lkmpg.log lkmpg.aux
indent:
(cd examples; find . -name '*.[ch]' | xargs clang-format -i)
clean:
rm -f *.dvi *.aux *.log *.ps *.pdf *.out lkmpg.bbl lkmpg.blg lkmpg.lof lkmpg.toc
rm -rf _minted-lkmpg

View File

@ -27,10 +27,9 @@ ssize_t procfile_read(struct file *filePointer,
ssize_t ret = len;
if (*offset >= len || copy_to_user(buffer, s, len)) {
pr_info("copy_to_user failed\n");
ret = 0;
}
else {
pr_info("copy_to_user failed\n");
ret = 0;
} else {
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name);
*offset += len;
}

View File

@ -47,10 +47,9 @@ ssize_t procfile_read(struct file *filePointer,
ssize_t ret = len;
if (*offset >= len || copy_to_user(buffer, s, len)) {
pr_info("copy_to_user failed\n");
ret = 0;
}
else {
pr_info("copy_to_user failed\n");
ret = 0;
} else {
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name);
*offset += len;
}