From: Jakub Kicinski <kuba@kernel•org>
To: Michal Swiatkowski <michal.swiatkowski@linux•intel.com>
Cc: Su Hui <suhui@nfschina•com>,
alexanderduyck@fb•com, kernel-team@meta•com,
andrew+netdev@lunn•ch, davem@davemloft•net, edumazet@google•com,
pabeni@redhat•com, horms@kernel•org, mohsin.bashr@gmail•com,
sanmanpradhan@meta•com, kalesh-anakkur.purayil@broadcom•com,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
kernel-janitors@vger•kernel.org
Subject: Re: [PATCH v2] eth: fbnic: Avoid garbage value in fbnic_mac_get_sensor_asic()
Date: Mon, 30 Dec 2024 08:52:49 -0800 [thread overview]
Message-ID: <20241230085249.4aa68872@kernel.org> (raw)
In-Reply-To: <Z3JTFJgbzX4XGHwG@mev-dev.igk.intel.com>
On Mon, 30 Dec 2024 09:00:20 +0100 Michal Swiatkowski wrote:
> > @@ -688,23 +688,7 @@ fbnic_mac_get_eth_mac_stats(struct fbnic_dev *fbd, bool reset,
> >
> > static int fbnic_mac_get_sensor_asic(struct fbnic_dev *fbd, int id, long *val)
> > {
> > - struct fbnic_fw_completion fw_cmpl;
> Probably it should be:
> *fw_cmpl = fbd->cmpl_data
> but it is also never initialized.
The other way around, the completion declared on the stack should be
the thing that gets assigned to the pointer in fbd :S
> > - s32 *sensor;
> > -
> > - switch (id) {
> > - case FBNIC_SENSOR_TEMP:
> > - sensor = &fw_cmpl.tsene.millidegrees;
> > - break;
> > - case FBNIC_SENSOR_VOLTAGE:
> > - sensor = &fw_cmpl.tsene.millivolts;
> > - break;
> > - default:
> > - return -EINVAL;
> > - }
> > -
> > - *val = *sensor;
> > -
> > - return 0;
> > + return -EOPNOTSUPP;
>
> It is more like removing broken functionality than fixing (maybe whole
> commit should be reverted). Anyway returning not support is also fine.
I defer to other maintainers. The gaps are trivial to fill in, we'll
do so as soon as this patch makes it to net-next (this patch needs to
target net).
next prev parent reply other threads:[~2024-12-30 16:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 1:42 [PATCH v2] eth: fbnic: Avoid garbage value in fbnic_mac_get_sensor_asic() Su Hui
2024-12-30 8:00 ` Michal Swiatkowski
2024-12-30 16:52 ` Jakub Kicinski [this message]
2025-01-03 18:07 ` Jakub Kicinski
2025-01-06 1:08 ` Su Hui
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=20241230085249.4aa68872@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=alexanderduyck@fb$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=kalesh-anakkur.purayil@broadcom$(echo .)com \
--cc=kernel-janitors@vger$(echo .)kernel.org \
--cc=kernel-team@meta$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=michal.swiatkowski@linux$(echo .)intel.com \
--cc=mohsin.bashr@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sanmanpradhan@meta$(echo .)com \
--cc=suhui@nfschina$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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