From: Markus Elfring <Markus.Elfring@web.de>
To: Darshan Rathod <darshanrathod475@gmail.com>, linux-media@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH v2] media: b2c2: flexcop-eeprom: Fix assignment and missing return in MAC check
Date: Sun, 20 Jul 2025 12:48:36 +0200 [thread overview]
Message-ID: <54d3ec28-0e6c-4e9b-bd93-966efe649054@web.de> (raw)
In-Reply-To: <20250718145149.3180-1-darshanrathod475@gmail.com>
> 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
next prev parent reply other threads:[~2025-07-20 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 14:51 Darshan Rathod
2025-07-20 10:48 ` Markus Elfring [this message]
2025-07-21 5:20 ` Darshan Rathod
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54d3ec28-0e6c-4e9b-bd93-966efe649054@web.de \
--to=markus.elfring@web.de \
--cc=darshanrathod475@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®