hotfix: checkpatch-related issues
This commit is contained in:
parent
f11d2bc921
commit
ace684facc
10
hello1.c
10
hello1.c
|
@ -46,7 +46,7 @@ struct TimingList {
|
|||
|
||||
static struct TimingList *tl_head;
|
||||
|
||||
static struct TimingList* write_first_node(void)
|
||||
static struct TimingList *write_first_node(void)
|
||||
{
|
||||
tl_head = kmalloc(sizeof(struct TimingList), GFP_KERNEL);
|
||||
tl_head->next = NULL;
|
||||
|
@ -54,7 +54,7 @@ static struct TimingList* write_first_node(void)
|
|||
return tl_head;
|
||||
}
|
||||
|
||||
static struct TimingList* insert_next_node(struct TimingList *tail)
|
||||
static struct TimingList *insert_next_node(struct TimingList *tail)
|
||||
{
|
||||
struct TimingList *new_tl_node = kmalloc(sizeof(struct TimingList),
|
||||
GFP_KERNEL);
|
||||
|
@ -65,7 +65,7 @@ static struct TimingList* insert_next_node(struct TimingList *tail)
|
|||
return new_tl_node;
|
||||
}
|
||||
|
||||
static struct TimingList* add_new_node(struct TimingList *tail)
|
||||
static struct TimingList *add_new_node(struct TimingList *tail)
|
||||
{
|
||||
if (tail == NULL)
|
||||
return write_first_node();
|
||||
|
@ -93,6 +93,7 @@ void destroy_list(void)
|
|||
curr_tl = next_tl;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(destroy_list);
|
||||
|
||||
static int __init hello_init(void)
|
||||
{
|
||||
|
@ -112,14 +113,13 @@ void print_hello(int msg_count)
|
|||
current_tail->t_after = ktime_get();
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(print_hello);
|
||||
|
||||
static void __exit hello_exit(void)
|
||||
{
|
||||
destroy_list();
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(print_hello);
|
||||
EXPORT_SYMBOL(destroy_list);
|
||||
|
||||
module_init(hello_init);
|
||||
module_exit(hello_exit);
|
||||
|
|
3
hello2.c
3
hello2.c
|
@ -49,9 +49,8 @@ static int __init hello_init(void)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (msg_count == 0 || msg_count >= 5) {
|
||||
if (msg_count == 0 || msg_count >= 5)
|
||||
pr_warn("Warning: msg_count = %d (msg_count == 0 or 5 <= msg_count <= 10)\n", msg_count);
|
||||
}
|
||||
|
||||
print_hello(msg_count);
|
||||
return 0;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
void print_hello(int);
|
||||
void print_hello(int msg_count);
|
||||
void destroy_list(void);
|
||||
|
|
Loading…
Reference in New Issue