media: firewire: Fix app_info parameter type in avc_ca{,_app}_info
[ Upstream commit b2e9a4eda11fd2cb1e6714e9ad3f455c402568ff ] Clang warns: drivers/media/firewire/firedtv-avc.c:999:45: warning: implicit conversion from 'int' to 'char' changes value from 159 to -97 [-Wconstant-conversion] app_info[0] = (EN50221_TAG_APP_INFO >> 16) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/media/firewire/firedtv-avc.c:1000:45: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion] app_info[1] = (EN50221_TAG_APP_INFO >> 8) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/media/firewire/firedtv-avc.c:1040:44: warning: implicit conversion from 'int' to 'char' changes value from 159 to -97 [-Wconstant-conversion] app_info[0] = (EN50221_TAG_CA_INFO >> 16) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/media/firewire/firedtv-avc.c:1041:44: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion] app_info[1] = (EN50221_TAG_CA_INFO >> 8) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ 4 warnings generated. Change app_info's type to unsigned char to match the type of the member msg in struct ca_msg, which is the only thing passed into the app_info parameter in this function. Link: https://github.com/ClangBuiltLinux/linux/issues/105 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
dc21489da6
commit
bb457a479c
@ -968,7 +968,8 @@ static int get_ca_object_length(struct avc_response_frame *r)
|
|||||||
return r->operand[7];
|
return r->operand[7];
|
||||||
}
|
}
|
||||||
|
|
||||||
int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
|
int avc_ca_app_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||||
|
unsigned int *len)
|
||||||
{
|
{
|
||||||
struct avc_command_frame *c = (void *)fdtv->avc_data;
|
struct avc_command_frame *c = (void *)fdtv->avc_data;
|
||||||
struct avc_response_frame *r = (void *)fdtv->avc_data;
|
struct avc_response_frame *r = (void *)fdtv->avc_data;
|
||||||
@ -1009,7 +1010,8 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
|
int avc_ca_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||||
|
unsigned int *len)
|
||||||
{
|
{
|
||||||
struct avc_command_frame *c = (void *)fdtv->avc_data;
|
struct avc_command_frame *c = (void *)fdtv->avc_data;
|
||||||
struct avc_response_frame *r = (void *)fdtv->avc_data;
|
struct avc_response_frame *r = (void *)fdtv->avc_data;
|
||||||
|
@ -124,8 +124,10 @@ int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst,
|
|||||||
struct dvb_diseqc_master_cmd *diseqcmd);
|
struct dvb_diseqc_master_cmd *diseqcmd);
|
||||||
void avc_remote_ctrl_work(struct work_struct *work);
|
void avc_remote_ctrl_work(struct work_struct *work);
|
||||||
int avc_register_remote_control(struct firedtv *fdtv);
|
int avc_register_remote_control(struct firedtv *fdtv);
|
||||||
int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
|
int avc_ca_app_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||||
int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
|
unsigned int *len);
|
||||||
|
int avc_ca_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||||
|
unsigned int *len);
|
||||||
int avc_ca_reset(struct firedtv *fdtv);
|
int avc_ca_reset(struct firedtv *fdtv);
|
||||||
int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length);
|
int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length);
|
||||||
int avc_ca_get_time_date(struct firedtv *fdtv, int *interval);
|
int avc_ca_get_time_date(struct firedtv *fdtv, int *interval);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user