[PATCH 17/21] media: av7110: coding style fixes: variable types

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

 



This patch fixes the following checkpatch warnings:

CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 's32' over 'int32_t'
CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u64' over 'uint64_t'
WARNING:UNNECESSARY_INT: Prefer 'long' over 'long int' as the int is unnecessary
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Stefan Herdler <herdler@xxxxxxxxxxxxxx>
---

==========================================================================

CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
Will be fixes in:
[PATCH 21/21] media: av7110: coding style fixes: avoid_externs

==========================================================================

 drivers/staging/media/av7110/av7110.c    |  4 ++--
 drivers/staging/media/av7110/av7110.h    |  2 +-
 drivers/staging/media/av7110/av7110_av.c | 12 ++++++------
 drivers/staging/media/av7110/av7110_av.h |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
index 42b5d049e..14c512fdf 100644
--- a/drivers/staging/media/av7110/av7110.c
+++ b/drivers/staging/media/av7110/av7110.c
@@ -1094,7 +1094,7 @@ static void restart_feeds(struct av7110 *av7110)
 }

 static int dvb_get_stc(struct dmx_demux *demux, unsigned int num,
-		       uint64_t *stc, unsigned int *base)
+		       u64 *stc, unsigned int *base)
 {
 	int ret;
 	u16 fwstc[4];
@@ -1183,7 +1183,7 @@ static int stop_ts_capture(struct av7110 *budget)

 static int start_ts_capture(struct av7110 *budget)
 {
-	unsigned y;
+	unsigned int y;

 	dprintk(2, "budget: %p\n", budget);

diff --git a/drivers/staging/media/av7110/av7110.h b/drivers/staging/media/av7110/av7110.h
index 1cfe13df6..3f6b88f0f 100644
--- a/drivers/staging/media/av7110/av7110.h
+++ b/drivers/staging/media/av7110/av7110.h
@@ -58,7 +58,7 @@ enum av7110_video_mode {
 struct av7110_p2t {
 	u8		  pes[TS_SIZE];
 	u8		  counter;
-	long int	  pos;
+	long		  pos;
 	int		  frags;
 	struct dvb_demux_feed *feed;
 };
diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c
index 3e0db8e9a..a408e10fb 100644
--- a/drivers/staging/media/av7110/av7110_av.c
+++ b/drivers/staging/media/av7110/av7110_av.c
@@ -71,7 +71,7 @@
 #define PIECE_RATE	 0x40
 #define SEAM_SPLICE	 0x20

-static void p_to_t(u8 const *buf, long int length, u16 pid,
+static void p_to_t(u8 const *buf, long length, u16 pid,
 		   u8 *counter, struct dvb_demux_feed *feed);
 static int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len);

@@ -585,7 +585,7 @@ static void clear_p2t(struct av7110_p2t *p)
 	p->frags = 0;
 }

-static int find_pes_header(u8 const *buf, long int length, int *frags)
+static int find_pes_header(u8 const *buf, long length, int *frags)
 {
 	int c = 0;
 	int found = 0;
@@ -634,7 +634,7 @@ static int find_pes_header(u8 const *buf, long int length, int *frags)
 	return c;
 }

-void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p)
+void av7110_p2t_write(u8 const *buf, long length, u16 pid, struct av7110_p2t *p)
 {
 	int c, c2, l, add;
 	int check, rest;
@@ -763,7 +763,7 @@ static int write_ts_header2(u16 pid, u8 *counter, int pes_start, u8 *buf, u8 len
 	return c;
 }

-static void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter,
+static void p_to_t(u8 const *buf, long length, u16 pid, u8 *counter,
 		   struct dvb_demux_feed *feed)
 {
 	int l, pes_start;
@@ -1023,7 +1023,7 @@ static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x

 static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock)
 {
-	unsigned i, n;
+	unsigned int i, n;
 	int progressive = 0;
 	int match = 0;

@@ -1090,7 +1090,7 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len
 #ifdef CONFIG_COMPAT
 struct compat_video_still_picture {
 	compat_uptr_t iFrame;
-	int32_t size;
+	s32 size;
 };

 #define VIDEO_STILLPICTURE32 _IOW('o', 30, struct compat_video_still_picture)
diff --git a/drivers/staging/media/av7110/av7110_av.h b/drivers/staging/media/av7110/av7110_av.h
index ce0f9945d..f1c5c26c6 100644
--- a/drivers/staging/media/av7110/av7110_av.h
+++ b/drivers/staging/media/av7110/av7110_av.h
@@ -21,7 +21,7 @@ extern int av7110_av_start_play(struct av7110 *av7110, int av);
 extern void dvb_video_add_event(struct av7110 *av7110, struct video_event *event);

 extern void av7110_p2t_init(struct av7110_p2t *p, struct dvb_demux_feed *feed);
-extern void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p);
+extern void av7110_p2t_write(u8 const *buf, long length, u16 pid, struct av7110_p2t *p);

 extern int av7110_av_register(struct av7110 *av7110);
 extern void av7110_av_unregister(struct av7110 *av7110);
--
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