[PATCH 18/21] media: av7110: coding style fixes: miscellaneous

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the following checkpatch warnings:

WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fe_func' - possible side-effects?

The MACRO_ARG_REUSE isn't really fixed but marked as intentional.
The comment is visible in the checkpatch warning.

Signed-off-by: Stefan Herdler <herdler@xxxxxxxxxxxxxx>
---
 drivers/staging/media/av7110/av7110.c       | 2 +-
 drivers/staging/media/av7110/av7110_ipack.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
index 14c512fdf..30e2e6e65 100644
--- a/drivers/staging/media/av7110/av7110.c
+++ b/drivers/staging/media/av7110/av7110.c
@@ -108,7 +108,7 @@ static int av7110_num;
 		av7110_copy = fe_func; \
 		fe_func = av7110_func; \
 	} \
-}
+}    /* Macro argument reuse of 'fe_func' is intentional! */

 static void init_av7110_av(struct av7110 *av7110)
 {
diff --git a/drivers/staging/media/av7110/av7110_ipack.c b/drivers/staging/media/av7110/av7110_ipack.c
index c41a233e1..9631aae71 100644
--- a/drivers/staging/media/av7110/av7110_ipack.c
+++ b/drivers/staging/media/av7110/av7110_ipack.c
@@ -23,10 +23,8 @@ int av7110_ipack_init(struct ipack *p, int size,
 		      void (*func)(u8 *buf, int size, void *priv))
 {
 	p->buf = vmalloc(size);
-	if (!p->buf) {
-		printk(KERN_WARNING "Couldn't allocate memory for ipack\n");
+	if (!p->buf)
 		return -ENOMEM;
-	}
 	p->size = size;
 	p->func = func;
 	p->repack_subids = 0;
--
2.34.0





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux