Skip to contentSkip to conversation

staging: media: av7110: comparison to NULL could be written "fe_func"

PATCH In review Aliya Rahmani 2 participants 2 messages Apr 18, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media: av7110: comparison to NULL could be written "fe_func"

Fixed coding style for null comparisons to be more consistent with the rest of the kernel coding style.

---
 drivers/staging/media/av7110/av7110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/av7110/av7110.c +1 -1
index d74ee0ecfb36..bdc6adf70d72 100644
@@ -107,7 +107,7 @@ static int av7110_num;
 
 #define FE_FUNC_OVERRIDE(fe_func, av7110_copy, av7110_func) \
 {\
-	if (fe_func != NULL) { \
+	if (fe_func) { \
 		av7110_copy = fe_func; \
 		fe_func = av7110_func; \
 	} \
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Aliya Rahmani

Fixed coding style for null comparisons to be more consistent with the rest of the kernel coding style.

The log message (both the subject line and the text just above) should be in the imperative. Typically, that means that you should not be using verbs that end in "ed".

There is too much detail in the subject line. Consider how you could give the general idea, but be more concise.

For the text above, what could you say rather than "fix". When you say that you fixed something, the reader may know (or at least hope) that it is better, but gets no information about what you did, nor why.

julia

Quoted 24 lines
---
 drivers/staging/media/av7110/av7110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/av7110/av7110.c +1 -2
index d74ee0ecfb36..bdc6adf70d72 100644
@@ -107,7 +107,7 @@ static int av7110_num;
 
 #define FE_FUNC_OVERRIDE(fe_func, av7110_copy, av7110_func) \
 {\
-	if (fe_func != NULL) { \
+	if (fe_func) { \
 		av7110_copy = fe_func; \
 		fe_func = av7110_func; \
 	} \
--

2.25.1