Linux-Media Archive mirror
 help / color / mirror / Atom feed
From: Stefan Herdler <herdler@nurfuerspam.de>
To: hverkuil-cisco@xs4all.nl
Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com,
	vinschen@redhat.com
Subject: [PATCH 17/21] media: av7110: coding style fixes: variable types
Date: Tue,  7 May 2024 02:24:56 +0200	[thread overview]
Message-ID: <20240507002500.81867-18-herdler@nurfuerspam.de> (raw)
In-Reply-To: <20240507002500.81867-1-herdler@nurfuerspam.de>

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@nurfuerspam.de>
---

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

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


  parent reply	other threads:[~2024-05-07  0:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07  0:24 [PATCH 00/21] media: av7110: make chackpatch happier Stefan Herdler
2024-05-07  0:24 ` [PATCH 01/21] media: av7110: remove old documentation files Stefan Herdler
2024-05-07  0:24 ` [PATCH 02/21] media: av7110: remove budget-patch driver Stefan Herdler
2024-05-07  0:24 ` [PATCH 03/21] media: sp8870: coding style fixes: whitespace Stefan Herdler
2024-05-07  0:24 ` [PATCH 04/21] media: sp8870: coding style fixes: newline, comments and braces Stefan Herdler
2024-05-07  0:24 ` [PATCH 05/21] media: sp8870: coding style fixes: miscellaneous Stefan Herdler
2024-05-07  0:24 ` [PATCH 06/21] media: sp8870: coding style fixes: logging Stefan Herdler
2024-05-07  0:24 ` [PATCH 07/21] media: av7110: coding style fixes: pointer_location Stefan Herdler
2024-05-07  0:24 ` [PATCH 08/21] media: av7110: coding style fixes: blank lines Stefan Herdler
2024-05-07  0:24 ` [PATCH 09/21] media: av7110: coding style fixes: whitespace Stefan Herdler
2024-05-07  0:24 ` [PATCH 10/21] media: av7110: coding style fixes: newline Stefan Herdler
2024-05-07  0:24 ` [PATCH 11/21] media: av7110: coding style fixes: whitespace (strict) Stefan Herdler
2024-05-07  0:24 ` [PATCH 12/21] media: av7110: coding style fixes: comments Stefan Herdler
2024-05-07  0:24 ` [PATCH 13/21] media: av7110: coding style fixes: braces Stefan Herdler
2024-05-07  0:24 ` [PATCH 14/21] media: av7110: coding style fixes: assignments Stefan Herdler
2024-05-07  0:24 ` [PATCH 15/21] media: av7110: coding style fixes: comparsations Stefan Herdler
2024-05-07  0:24 ` [PATCH 16/21] media: av7110: coding style fixes: sizeof Stefan Herdler
2024-05-07  0:24 ` Stefan Herdler [this message]
2024-05-07  0:24 ` [PATCH 18/21] media: av7110: coding style fixes: miscellaneous Stefan Herdler
2024-05-07  0:24 ` [PATCH 19/21] media: av7110: coding style fixes: deep_indentation Stefan Herdler
2024-05-07  0:24 ` [PATCH 20/21] media: av7110: coding style fixes: logging Stefan Herdler
2024-05-07  0:25 ` [PATCH 21/21] media: av7110: coding style fixes: avoid_externs Stefan Herdler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240507002500.81867-18-herdler@nurfuerspam.de \
    --to=herdler@nurfuerspam.de \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=smoch@web.de \
    --cc=tmn505@gmail.com \
    --cc=vinschen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).