mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:20:53 +07: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 <vladimir.murzin@arm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200922115847.30100-3-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
b28de385b7
commit
da75ba2482
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user