Skip to content

TASK06: SUBTASK01, SUBTASK02 Add user-space program with kernel module Vitaliy.Zhyrko#105

Open
vitaliyzhirko wants to merge 2 commits intoKernel-GL-HRK:Vitaliy.Zhyrkofrom
vitaliyzhirko:task06
Open

TASK06: SUBTASK01, SUBTASK02 Add user-space program with kernel module Vitaliy.Zhyrko#105
vitaliyzhirko wants to merge 2 commits intoKernel-GL-HRK:Vitaliy.Zhyrkofrom
vitaliyzhirko:task06

Conversation

@vitaliyzhirko
Copy link

User-space program which tries to allocate buffers

Signed-off-by: vitaliyzhirko vitaliyzh@gmail.com

User-space program which tries to allocate buffers

Signed-off-by: vitaliyzhirko <vitaliyzh@gmail.com>
@vitaliyzhirko vitaliyzhirko changed the title TASK06: SUBTASK01 Add user-space program Vitaliy.Zhyrko TASK06: SUBTASK01, SUBTASK02 Add user-space program with kernel module Vitaliy.Zhyrko Dec 7, 2021
@alexposukhov
Copy link
Contributor

Please check test_mem.c with checkpatch

@vitaliyzhirko
Copy link
Author

fixed all checkpatch errors, added check script

@alexposukhov
Copy link
Contributor

Hi, see a lot of warnings and at least 3 errors using your patch, please fix them

ERROR: that open brace { should be on the previous line
#63: FILE: ./test_mem.c:63:

  • switch (value)
  • {

WARNING: please, no spaces at the start of a line
#64: FILE: ./test_mem.c:64:

  • {$

WARNING: Statements should start on a tabstop
#68: FILE: ./test_mem.c:68:

  •   if (proc_buffer == NULL)
    

WARNING: Statements should start on a tabstop
#70: FILE: ./test_mem.c:70:

  •   break;
    

WARNING: Statements should start on a tabstop
#74: FILE: ./test_mem.c:74:

  •   if (proc_buffer == NULL)
    

WARNING: Statements should start on a tabstop
#76: FILE: ./test_mem.c:76:

  •   break;
    

WARNING: Statements should start on a tabstop
#80: FILE: ./test_mem.c:80:

  •   if (proc_buffer == NULL)
    

WARNING: Statements should start on a tabstop
#82: FILE: ./test_mem.c:82:

  •   break;
    

WARNING: Statements should start on a tabstop
#86: FILE: ./test_mem.c:86:

  •   if (proc_buffer == NULL)
    

WARNING: Statements should start on a tabstop
#88: FILE: ./test_mem.c:88:

  •   break;
    

WARNING: please, no spaces at the start of a line
#89: FILE: ./test_mem.c:89:

  • }$

WARNING: please, no spaces at the start of a line
#90: FILE: ./test_mem.c:90:

  • return ret;$

WARNING: please, no spaces at the start of a line
#95: FILE: ./test_mem.c:95:

  • if (proc_buffer)$

ERROR: that open brace { should be on the previous line
#95: FILE: ./test_mem.c:95:

  • if (proc_buffer)
  • {

WARNING: please, no spaces at the start of a line
#96: FILE: ./test_mem.c:96:

  • {$

ERROR: that open brace { should be on the previous line
#97: FILE: ./test_mem.c:97:

  • switch (value)
  • {

Kernel module and test allocation/freeing time

Signed-off-by: vitaliyzhirko <vitaliyzh@gmail.com>
@vitaliyzhirko
Copy link
Author

./check.sh
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
#1: FILE: ./test_mem.c:1:
+#include <linux/init.h>

total: 0 errors, 1 warnings, 160 lines checked

:))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants