Skip to content

Commit

Permalink
ASoC: Intel: Atom: simplify boolean tests
Browse files Browse the repository at this point in the history
Detected with Coccinelle

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Pierre-Louis Bossart authored and Mark Brown committed Jan 3, 2019
1 parent e295450 commit 10583cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sound/soc/intel/atom/sst-atom-controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static int sst_swm_mixer_event(struct snd_soc_dapm_widget *w,
set_mixer = false;
}

if (set_mixer == false)
if (!set_mixer)
return 0;

if (SND_SOC_DAPM_EVENT_ON(event) ||
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/atom/sst-mfld-platform-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int sst_fill_stream_params(void *substream,
map = ctx->pdata->pdev_strm_map;
map_size = ctx->pdata->strm_map_size;

if (is_compress == true)
if (is_compress)
cstream = (struct snd_compr_stream *)substream;
else
pstream = (struct snd_pcm_substream *)substream;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/atom/sst/sst_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
return ret;

ret = is_byt_cr(dev, &bytcr);
if (!((ret < 0) || (bytcr == false))) {
if (!(ret < 0 || !bytcr)) {
dev_info(dev, "Detected Baytrail-CR platform\n");

/* override resource info */
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/atom/sst/sst_drv_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static int sst_power_control(struct device *dev, bool state)
int ret = 0;
int usage_count = 0;

if (state == true) {
if (state) {
ret = pm_runtime_get_sync(dev);
usage_count = GET_USAGE_COUNT(dev);
dev_dbg(ctx->dev, "Enable: pm usage count: %d\n", usage_count);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/atom/sst/sst_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static void sst_do_memcpy(struct list_head *memcpy_list)
struct sst_memcpy_list *listnode;

list_for_each_entry(listnode, memcpy_list, memcpylist) {
if (listnode->is_io == true)
if (listnode->is_io)
memcpy32_toio((void __iomem *)listnode->dstn,
listnode->src, listnode->size);
else
Expand Down

0 comments on commit 10583cd

Please sign in to comment.