Skip to content

Commit d8ebd81

Browse files
sudo-pandamchehab
authored andcommitted
media: atomisp: Fix __func__ style warnings
This patch fixes the checkpatch.pl warning: Prefer using '"%s...", __func__' to using '<function name>', this function's name, in a string Signed-off-by: Baidyanath Kundu <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 52c6f42 commit d8ebd81

File tree

1 file changed

+14
-14
lines changed
  • drivers/staging/media/atomisp/pci/base/refcount/src

1 file changed

+14
-14
lines changed

drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static struct ia_css_refcount_entry *refcount_find_entry(ia_css_ptr ptr,
4848
return NULL;
4949
if (!myrefcount.items) {
5050
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
51-
"refcount_find_entry(): Ref count not initialized!\n");
51+
"%s(): Ref count not initialized!\n", __func__);
5252
return NULL;
5353
}
5454

@@ -73,12 +73,12 @@ int ia_css_refcount_init(uint32_t size)
7373

7474
if (size == 0) {
7575
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
76-
"ia_css_refcount_init(): Size of 0 for Ref count init!\n");
76+
"%s(): Size of 0 for Ref count init!\n", __func__);
7777
return -EINVAL;
7878
}
7979
if (myrefcount.items) {
8080
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
81-
"ia_css_refcount_init(): Ref count is already initialized\n");
81+
"%s(): Ref count is already initialized\n", __func__);
8282
return -EINVAL;
8383
}
8484
myrefcount.items =
@@ -99,7 +99,7 @@ void ia_css_refcount_uninit(void)
9999
u32 i;
100100

101101
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
102-
"ia_css_refcount_uninit() entry\n");
102+
"%s() entry\n", __func__);
103103
for (i = 0; i < myrefcount.size; i++) {
104104
/* driver verifier tool has issues with &arr[i]
105105
and prefers arr + i; as these are actually equivalent
@@ -120,7 +120,7 @@ void ia_css_refcount_uninit(void)
120120
myrefcount.items = NULL;
121121
myrefcount.size = 0;
122122
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
123-
"ia_css_refcount_uninit() leave\n");
123+
"%s() leave\n", __func__);
124124
}
125125

126126
ia_css_ptr ia_css_refcount_increment(s32 id, ia_css_ptr ptr)
@@ -133,7 +133,7 @@ ia_css_ptr ia_css_refcount_increment(s32 id, ia_css_ptr ptr)
133133
entry = refcount_find_entry(ptr, false);
134134

135135
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
136-
"ia_css_refcount_increment(%x) 0x%x\n", id, ptr);
136+
"%s(%x) 0x%x\n", __func__, id, ptr);
137137

138138
if (!entry) {
139139
entry = refcount_find_entry(ptr, true);
@@ -145,7 +145,7 @@ ia_css_ptr ia_css_refcount_increment(s32 id, ia_css_ptr ptr)
145145

146146
if (entry->id != id) {
147147
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
148-
"ia_css_refcount_increment(): Ref count IDS do not match!\n");
148+
"%s(): Ref count IDS do not match!\n", __func__);
149149
return mmgr_NULL;
150150
}
151151

@@ -165,7 +165,7 @@ bool ia_css_refcount_decrement(s32 id, ia_css_ptr ptr)
165165
struct ia_css_refcount_entry *entry;
166166

167167
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
168-
"ia_css_refcount_decrement(%x) 0x%x\n", id, ptr);
168+
"%s(%x) 0x%x\n", __func__, id, ptr);
169169

170170
if (ptr == mmgr_NULL)
171171
return false;
@@ -175,7 +175,7 @@ bool ia_css_refcount_decrement(s32 id, ia_css_ptr ptr)
175175
if (entry) {
176176
if (entry->id != id) {
177177
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
178-
"ia_css_refcount_decrement(): Ref count IDS do not match!\n");
178+
"%s(): Ref count IDS do not match!\n", __func__);
179179
return false;
180180
}
181181
if (entry->count > 0) {
@@ -225,8 +225,8 @@ void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
225225
u32 count = 0;
226226

227227
assert(clear_func_ptr);
228-
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_clear(%x)\n",
229-
id);
228+
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s(%x)\n",
229+
__func__, id);
230230

231231
for (i = 0; i < myrefcount.size; i++) {
232232
/* driver verifier tool has issues with &arr[i]
@@ -236,14 +236,14 @@ void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
236236
entry = myrefcount.items + i;
237237
if ((entry->data != mmgr_NULL) && (entry->id == id)) {
238238
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
239-
"ia_css_refcount_clear: %x: 0x%x\n",
239+
"%s: %x: 0x%x\n", __func__,
240240
id, entry->data);
241241
if (clear_func_ptr) {
242242
/* clear using provided function */
243243
clear_func_ptr(entry->data);
244244
} else {
245245
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
246-
"ia_css_refcount_clear: using hmm_free: no clear_func\n");
246+
"%s: using hmm_free: no clear_func\n", __func__);
247247
hmm_free(entry->data);
248248
}
249249

@@ -260,7 +260,7 @@ void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
260260
}
261261
}
262262
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
263-
"ia_css_refcount_clear(%x): cleared %d\n", id,
263+
"%s(%x): cleared %d\n", __func__, id,
264264
count);
265265
}
266266

0 commit comments

Comments
 (0)