Skip to content

Commit

Permalink
scsi: megaraid: Remove set but unused variable
Browse files Browse the repository at this point in the history
The variable remainder is unused in mega_div64_32(). Remove it to avoid a
compiler warning. While at it, also fix the function documentation
comments.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
damien-lemoal authored and martinkpetersen committed Jul 8, 2020
1 parent 7b3c103 commit 97eec79
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/scsi/megaraid/megaraid_sas_fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,20 @@ u32 mega_mod64(u64 dividend, u32 divisor)
}

/**
* @param dividend : Dividend
* @param divisor : Divisor
* mega_div64_32 - Do a 64-bit division
* @dividend: Dividend
* @divisor: Divisor
*
* @return quotient
**/
static u64 mega_div64_32(uint64_t dividend, uint32_t divisor)
{
u32 remainder;
u64 d;
u64 d = dividend;

if (!divisor)
printk(KERN_ERR "megasas : DIVISOR is zero in mod fn\n");

d = dividend;
remainder = do_div(d, divisor);
do_div(d, divisor);

return d;
}
Expand Down

0 comments on commit 97eec79

Please sign in to comment.