mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
Address unused parameter warnings
Use __unused attribute to suppress compile warnings for callback implementations, where some parameters aren't used. For example: warning: unused parameter ‘qdl’ [-Wunused-parameter] ./firehose.c:257:80: warning: unused parameter ‘rawmode’ [-Wunused-parameter] 257 | static int firehose_configure_response_parser(xmlNode *node... Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
This commit is contained in:
committed by
Bjorn Andersson
parent
18f7e98632
commit
a79a572f18
@@ -83,7 +83,7 @@ static xmlNode *firehose_response_parse(const void *buf, size_t len, int *error)
|
||||
return node;
|
||||
}
|
||||
|
||||
static int firehose_generic_parser(xmlNode *node, void *data, bool *rawmode)
|
||||
static int firehose_generic_parser(xmlNode *node, void __unused *data, bool *rawmode)
|
||||
{
|
||||
xmlChar *value;
|
||||
int ret = -EINVAL;
|
||||
@@ -254,7 +254,8 @@ static int firehose_write(struct qdl_device *qdl, xmlDoc *doc)
|
||||
*
|
||||
* Return: max size supported by the remote, or negative errno on failure
|
||||
*/
|
||||
static int firehose_configure_response_parser(xmlNode *node, void *data, bool *rawmode)
|
||||
static int firehose_configure_response_parser(xmlNode *node, void *data,
|
||||
bool __unused *rawmode)
|
||||
{
|
||||
xmlChar *payload;
|
||||
xmlChar *value;
|
||||
@@ -944,7 +945,7 @@ static int firehose_reset(struct qdl_device *qdl)
|
||||
}
|
||||
|
||||
static int firehose_detect_and_configure(struct qdl_device *qdl,
|
||||
bool skip_storage_init,
|
||||
bool __unused skip_storage_init,
|
||||
enum qdl_storage_type storage,
|
||||
unsigned int timeout_s)
|
||||
{
|
||||
|
||||
4
ks.c
4
ks.c
@@ -24,12 +24,12 @@ static struct qdl_device qdl;
|
||||
|
||||
bool qdl_debug;
|
||||
|
||||
int qdl_read(struct qdl_device *qdl, void *buf, size_t len, unsigned int timeout)
|
||||
int qdl_read(struct qdl_device *qdl, void *buf, size_t len, unsigned int __unused timeout)
|
||||
{
|
||||
return read(qdl->fd, buf, len);
|
||||
}
|
||||
|
||||
int qdl_write(struct qdl_device *qdl, const void *buf, size_t len, unsigned int timeout)
|
||||
int qdl_write(struct qdl_device *qdl, const void *buf, size_t len, unsigned int __unused timeout)
|
||||
{
|
||||
return write(qdl->fd, buf, len);
|
||||
}
|
||||
|
||||
2
sahara.c
2
sahara.c
@@ -264,7 +264,7 @@ static void sahara_eoi(struct qdl_device *qdl, struct sahara_pkt *pkt)
|
||||
qdl_write(qdl, &done, done.length, SAHARA_CMD_TIMEOUT_MS);
|
||||
}
|
||||
|
||||
static int sahara_done(struct qdl_device *qdl, struct sahara_pkt *pkt)
|
||||
static int sahara_done(struct qdl_device __unused *qdl, struct sahara_pkt *pkt)
|
||||
{
|
||||
assert(pkt->length == SAHARA_DONE_RESP_LENGTH);
|
||||
|
||||
|
||||
16
sim.c
16
sim.c
@@ -13,26 +13,32 @@ struct qdl_device_sim {
|
||||
bool create_digests;
|
||||
};
|
||||
|
||||
static int sim_open(struct qdl_device *qdl, const char *serial)
|
||||
static int sim_open(struct qdl_device __unused *qdl,
|
||||
const char __unused *serial)
|
||||
{
|
||||
ux_info("This is a dry-run execution of QDL. No actual flashing has been performed\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sim_close(struct qdl_device *qdl) {}
|
||||
static void sim_close(struct qdl_device __unused *qdl) {}
|
||||
|
||||
static int sim_read(struct qdl_device *qdl, void *buf, size_t len, unsigned int timeout)
|
||||
static int sim_read(struct qdl_device __unused *qdl,
|
||||
void __unused *buf, size_t len,
|
||||
unsigned int __unused timeout)
|
||||
{
|
||||
return len;
|
||||
}
|
||||
|
||||
static int sim_write(struct qdl_device *qdl, const void *buf, size_t len, unsigned int timeout)
|
||||
static int sim_write(struct qdl_device __unused *qdl, const void __unused *buf,
|
||||
size_t len, unsigned int __unused timeout)
|
||||
{
|
||||
return len;
|
||||
}
|
||||
|
||||
static void sim_set_out_chunk_size(struct qdl_device *qdl, long size) {}
|
||||
static void sim_set_out_chunk_size(struct qdl_device __unused *qdl,
|
||||
long __unused size)
|
||||
{}
|
||||
|
||||
struct qdl_device *sim_init(void)
|
||||
{
|
||||
|
||||
2
ufs.c
2
ufs.c
@@ -36,7 +36,7 @@ bool ufs_need_provisioning(void)
|
||||
return !!ufs_epilogue_p;
|
||||
}
|
||||
|
||||
struct ufs_common *ufs_parse_common_params(xmlNode *node, bool finalize_provisioning)
|
||||
struct ufs_common *ufs_parse_common_params(xmlNode *node, bool __unused finalize_provisioning)
|
||||
{
|
||||
struct ufs_common *result;
|
||||
int errors;
|
||||
|
||||
Reference in New Issue
Block a user