[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54d3ec28-0e6c-4e9b-bd93-966efe649054@web.de>
Date: Sun, 20 Jul 2025 12:48:36 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Darshan Rathod <darshanrathod475@...il.com>, linux-media@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: [PATCH v2] media: b2c2: flexcop-eeprom: Fix assignment and
missing return in MAC check
> Fixes a coding style violation and build error in
> `flexcop_eeprom_check_mac_addr()`.
Will it be more desirable to separate some adjustments?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16-rc6#n81
> The function contained
> an invalid assignment in an if-condition and was missing
> a return at the end of a non-void function.
I find this information inappropriate.
…
> ---
> drivers/media/common/b2c2/flexcop-eeprom.c | 15 +++++++++------
…
How do you think about to improve your version management?
https://lore.kernel.org/all/?q=%22This+looks+like+a+new+version+of+a+previously+submitted+patch%22
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16-rc6#n784
…
> @@ -135,12 +135,15 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended)
> u8 buf[8];
> int ret = 0;
>
> - if ((ret = flexcop_eeprom_lrc_read(fc,0x3f8,buf,8,4)) == 0) {
> + ret = flexcop_eeprom_lrc_read(fc, 0x3f8, buf, 8, 4);
> +
> + if (ret == 0) {
Would you like to use the following code variant?
int ret = flexcop_eeprom_lrc_read(fc, 0x3f8, buf, 8, 4);
…
> + ret = ret = -EINVAL;
…
Why do you present a duplicate assignment for this variable?
Regards,
Markus
Powered by blists - more mailing lists