[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b81a10dca78e286a9f806464b97111b5a15a91e.camel@perches.com>
Date: Wed, 06 Oct 2021 08:21:01 -0700
From: Joe Perches <joe@...ches.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Cc: Cezary Rojewski <cezary.rojewski@...el.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Jie Yang <yang.jie@...ux.intel.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Subject: Re: [PATCH v1 2/4] ASoC: Intel: bytcr_rt5640: Use temporary
variable for struct device
On Wed, 2021-10-06 at 18:04 +0300, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
trivia:
Some will complain about a lack of commit message.
> diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
[]
> @@ -1536,7 +1536,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
> put_device(&adev->dev);
> byt_rt5640_dais[dai_index].codecs->name = byt_rt5640_codec_name;
> } else {
> - dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id);
> + dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
> return -ENXIO;
> }
And code that does
if (foo) {
[code...]
} else {
log_msg();
return -ERR;
}
should generally have its test reversed and use an unindented block.
if (!foo) {
log_msg();
return -ERR;
}
[code...];
Powered by blists - more mailing lists