Message ID | 1454502594-21700-3-git-send-email-vinod.koul@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ee564d489cc47b1b6043bbe7e95464306d112cf5 |
Headers | show |
On Wed, Feb 03, 2016 at 05:59:45PM +0530, Vinod Koul wrote:
> + delay = (hstream->bufsize == delay) ? 0 : delay;
Please don't abuse the ternery operator, if you're not inserting it into
the middle of another expression there's no reason not to use a normal
if statement.
On Thu, Feb 04, 2016 at 11:24:36AM +0000, Mark Brown wrote: > On Wed, Feb 03, 2016 at 05:59:45PM +0530, Vinod Koul wrote: > > > + delay = (hstream->bufsize == delay) ? 0 : delay; > > Please don't abuse the ternery operator, if you're not inserting it into > the middle of another expression there's no reason not to use a normal > if statement. Ah okay. Sure I will send an update to modify this Thanks
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index f3553258091a..b6e6b61d10ec 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -863,6 +863,7 @@ static int skl_get_delay_from_lpib(struct hdac_ext_bus *ebus, else delay += hstream->bufsize; } + delay = (hstream->bufsize == delay) ? 0 : delay; if (delay >= hstream->period_bytes) { dev_info(bus->dev,