[Sound-open-firmware] [PATCH] FIX: Remove unused variable.
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Thu Apr 19 08:39:14 CEST 2018
On 4/18/18 11:21 PM, Yan Wang wrote:
> Ping for review.
please be a bit more patient...
> Thanks.
>
> Yan Wang
>
> On 4/16/2018 4:24 PM, yan.wang at linux.intel.com wrote:
>> From: Yan Wang <yan.wang at linux.intel.com>
>>
>> The variable "i" shouldn't be used.
>>
>> Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
>> ---
>> Test with:
>> Mininow max rt5651 and APL UP^2 nocodec and CNL nocodec
>> SOF master: 29d4e8b1260e44004baad937d661bcc45fe05e81
>> SOF-Tool master: 8e8cd884c36e297f5996a7bb4f1e830a0f1ee84c
>> https://github.com/plbossart/sound/tree/topic/sof-v4.14:
>> 2cd03d26b66f8fee25b8b21ea3f60db11def5b13
>> ---
>> rimage/file_simple.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/rimage/file_simple.c b/rimage/file_simple.c
>> index a9f22d0..4068734 100644
>> --- a/rimage/file_simple.c
>> +++ b/rimage/file_simple.c
>> @@ -259,7 +259,7 @@ static int simple_write_module_reloc(struct image
>> *image, struct module *module)
>> {
>> struct snd_sof_mod_hdr hdr;
>> size_t count;
>> - int i, err;
>> + int err;
>> hdr.num_blocks = 1;
>> hdr.size = module->text_size + module->data_size;
>> @@ -288,7 +288,7 @@ static int simple_write_module_reloc(struct image
>> *image, struct module *module)
>> err = write_block_reloc(image, module);
>> if (err < 0) {
>> - fprintf(stderr, "error: failed to write section #%d\n", i);
>> + fprintf(stderr, "error: failed to write section #%d\n", err);
... and you have to change the error message string as well, or the log
will be non-sensical.
This error seems present in other places as well btw, this is worth
cleaning-up further.
>> return err;
>> }
>>
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
More information about the Sound-open-firmware
mailing list