mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
dmaengine: dmatest: Return boolean result directly in filter()
There is no need to have a conditional for boolean expression when function returns bool. Drop unnecessary code and return boolean result directly. While at it, drop unneeded casting from void *. Cc: Vladimir Murzin <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
1 parent
b28de385b7
commit
da75ba2482
1 file changed
+1
-7
@@ -1058,13 +1058,7 @@ static int dmatest_add_channel(struct dmatest_info *info,
|
||||
|
||||
static bool filter(struct dma_chan *chan, void *param)
|
||||
{
|
||||
struct dmatest_params *params = param;
|
||||
|
||||
if (!dmatest_match_channel(params, chan) ||
|
||||
!dmatest_match_device(params, chan->device))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
return dmatest_match_channel(param, chan) && dmatest_match_device(param, chan->device);
|
||||
}
|
||||
|
||||
static void request_channels(struct dmatest_info *info,
|
||||
|
||||
Reference in new issue
Block a user