Skip to content

Commit ad5fd97

Browse files
Venkatraman Scjb
authored andcommitted
mmc: fix integer assignments to pointer
Fix the sparse warning output "warning: Using plain integer as NULL pointer" Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
1 parent 7513cd7 commit ad5fd97

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

drivers/mmc/card/block.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
291291
struct mmc_card *card;
292292
struct mmc_command cmd = {0};
293293
struct mmc_data data = {0};
294-
struct mmc_request mrq = {0};
294+
struct mmc_request mrq = {NULL};
295295
struct scatterlist sg;
296296
int err;
297297

@@ -466,7 +466,7 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
466466
u32 result;
467467
__be32 *blocks;
468468

469-
struct mmc_request mrq = {0};
469+
struct mmc_request mrq = {NULL};
470470
struct mmc_command cmd = {0};
471471
struct mmc_data data = {0};
472472
unsigned int timeout_us;

drivers/mmc/core/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ EXPORT_SYMBOL(mmc_wait_for_req);
371371
*/
372372
int mmc_wait_for_cmd(struct mmc_host *host, struct mmc_command *cmd, int retries)
373373
{
374-
struct mmc_request mrq = {0};
374+
struct mmc_request mrq = {NULL};
375375

376376
WARN_ON(!host->claimed);
377377

drivers/mmc/core/mmc_ops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static int
233233
mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host,
234234
u32 opcode, void *buf, unsigned len)
235235
{
236-
struct mmc_request mrq = {0};
236+
struct mmc_request mrq = {NULL};
237237
struct mmc_command cmd = {0};
238238
struct mmc_data data = {0};
239239
struct scatterlist sg;
@@ -454,7 +454,7 @@ static int
454454
mmc_send_bus_test(struct mmc_card *card, struct mmc_host *host, u8 opcode,
455455
u8 len)
456456
{
457-
struct mmc_request mrq = {0};
457+
struct mmc_request mrq = {NULL};
458458
struct mmc_command cmd = {0};
459459
struct mmc_data data = {0};
460460
struct scatterlist sg;

drivers/mmc/core/sd_ops.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ EXPORT_SYMBOL_GPL(mmc_app_cmd);
6767
int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
6868
struct mmc_command *cmd, int retries)
6969
{
70-
struct mmc_request mrq = {0};
70+
struct mmc_request mrq = {NULL};
7171

7272
int i, err;
7373

@@ -244,7 +244,7 @@ int mmc_send_relative_addr(struct mmc_host *host, unsigned int *rca)
244244
int mmc_app_send_scr(struct mmc_card *card, u32 *scr)
245245
{
246246
int err;
247-
struct mmc_request mrq = {0};
247+
struct mmc_request mrq = {NULL};
248248
struct mmc_command cmd = {0};
249249
struct mmc_data data = {0};
250250
struct scatterlist sg;
@@ -303,7 +303,7 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr)
303303
int mmc_sd_switch(struct mmc_card *card, int mode, int group,
304304
u8 value, u8 *resp)
305305
{
306-
struct mmc_request mrq = {0};
306+
struct mmc_request mrq = {NULL};
307307
struct mmc_command cmd = {0};
308308
struct mmc_data data = {0};
309309
struct scatterlist sg;
@@ -348,7 +348,7 @@ int mmc_sd_switch(struct mmc_card *card, int mode, int group,
348348
int mmc_app_sd_status(struct mmc_card *card, void *ssr)
349349
{
350350
int err;
351-
struct mmc_request mrq = {0};
351+
struct mmc_request mrq = {NULL};
352352
struct mmc_command cmd = {0};
353353
struct mmc_data data = {0};
354354
struct scatterlist sg;

drivers/mmc/core/sdio_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn,
121121
int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
122122
unsigned addr, int incr_addr, u8 *buf, unsigned blocks, unsigned blksz)
123123
{
124-
struct mmc_request mrq = {0};
124+
struct mmc_request mrq = {NULL};
125125
struct mmc_command cmd = {0};
126126
struct mmc_data data = {0};
127127
struct scatterlist sg;

0 commit comments

Comments
 (0)