Skip to content

Commit 08bdcb1

Browse files
Stefan Herdleropsiff
authored andcommitted
media: av7110: coding style fixes: variable types
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> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> (cherry picked from commit a6257cc) Stable-dep-of: 458ea1c ("media: av7110: fix a spectre vulnerability") Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent ec29c01 commit 08bdcb1

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

drivers/staging/media/av7110/av7110.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ static void restart_feeds(struct av7110 *av7110)
10941094
}
10951095

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

11841184
static int start_ts_capture(struct av7110 *budget)
11851185
{
1186-
unsigned y;
1186+
unsigned int y;
11871187

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

drivers/staging/media/av7110/av7110.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ enum av7110_video_mode {
5858
struct av7110_p2t {
5959
u8 pes[TS_SIZE];
6060
u8 counter;
61-
long int pos;
61+
long pos;
6262
int frags;
6363
struct dvb_demux_feed *feed;
6464
};

drivers/staging/media/av7110/av7110_av.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#define PIECE_RATE 0x40
7272
#define SEAM_SPLICE 0x20
7373

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

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

588-
static int find_pes_header(u8 const *buf, long int length, int *frags)
588+
static int find_pes_header(u8 const *buf, long length, int *frags)
589589
{
590590
int c = 0;
591591
int found = 0;
@@ -634,7 +634,7 @@ static int find_pes_header(u8 const *buf, long int length, int *frags)
634634
return c;
635635
}
636636

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

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

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

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

10961096
#define VIDEO_STILLPICTURE32 _IOW('o', 30, struct compat_video_still_picture)

drivers/staging/media/av7110/av7110_av.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extern int av7110_av_start_play(struct av7110 *av7110, int av);
2121
extern void dvb_video_add_event(struct av7110 *av7110, struct video_event *event);
2222

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

2626
extern int av7110_av_register(struct av7110 *av7110);
2727
extern void av7110_av_unregister(struct av7110 *av7110);

0 commit comments

Comments
 (0)