From: Simon Horman <horms@kernel.org>
To: Jinjian Song <songjinjian@hotmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, corbet@lwn.net, loic.poulain@linaro.org,
ryazanov.s.a@gmail.com, jiri@resnulli.us,
johannes@sipsolutions.net, chandrashekar.devegowda@intel.com,
linuxwwan@intel.com, chiranjeevi.rapolu@linux.intel.com,
haijun.liu@mediatek.com, m.chetan.kumar@linux.intel.com,
ricardo.martinez@linux.intel.com, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
nmarupaka@google.com, vsankar@lenovo.com,
danielwinkler@google.com, Jinjian Song <jinjian.song@fibocom.com>
Subject: Re: [net-next v4 4/5] net: wwan: t7xx: Adds sysfs attribute of modem event
Date: Wed, 13 Sep 2023 16:16:58 +0200 [thread overview]
Message-ID: <20230913141658.GV401982@kernel.org> (raw)
In-Reply-To: <ME3P282MB27032EB049D5135D68ADE09FBBF1A@ME3P282MB2703.AUSP282.PROD.OUTLOOK.COM>
On Tue, Sep 12, 2023 at 05:48:44PM +0800, Jinjian Song wrote:
> From: Jinjian Song <jinjian.song@fibocom.com>
>
> Adds support for t7xx wwan device firmware flashing & coredump collection
> using devlink.
>
> Provides sysfs attribute on user space to query the event from modem
> about flashing/coredump/reset.
>
> Base on the v5 patch version of follow series:
> 'net: wwan: t7xx: fw flashing & coredump support'
> (https://patchwork.kernel.org/project/netdevbpf/patch/fc8bbb0b66a5ff3a489ea9857d79b374508090ef.1674307425.git.m.chetan.kumar@linux.intel.com/)
>
> Signed-off-by: Jinjian Song <jinjian.song@fibocom.com>
Hi Jinjian Song,
some minor feedback from my side.
...
> diff --git a/drivers/net/wwan/t7xx/t7xx_pci.c b/drivers/net/wwan/t7xx/t7xx_pci.c
...
> +static ssize_t t7xx_event_show(struct device *dev, struct device_attribute *attr,
> + char *buf)
> +{
> + enum t7xx_event event = T7XX_UNKNOWN;
> + struct pci_dev *pdev;
> + struct t7xx_pci_dev *t7xx_dev;
Please arrange local variables in networking code in reverse xmas tree
order - longest line to shortest.
https://github.com/ecree-solarflare/xmastree can be helpful here.
...
> diff --git a/drivers/net/wwan/t7xx/t7xx_port_flash_dump.c b/drivers/net/wwan/t7xx/t7xx_port_flash_dump.c
...
> @@ -361,6 +367,10 @@ static int t7xx_devlink_flash_update(struct devlink *devlink,
> clear_bit(T7XX_FLASH_STATUS, &flash_dump->status);
>
> err_out:
> + if (ret)
> + atomic_set(&port->t7xx_dev->event, T7XX_FLASH_FAILURE);
> + else
> + atomic_set(&port->t7xx_dev->event, T7XX_FLASH_SUCCESS);
If the lines immediately above are reached as the result of jumping
to err_out, then port is not initialised.
> return ret;
> }
...
next prev parent reply other threads:[~2023-09-13 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230912094845.11233-1-songjinjian@hotmail.com>
2023-09-12 9:48 ` [net-next v4 1/5] net: wwan: t7xx: Infrastructure for early port configuration Jinjian Song
2023-09-12 9:48 ` [net-next v4 2/5] net: wwan: t7xx: Register with devlink and implement firmware flashing Jinjian Song
2023-09-12 9:48 ` [net-next v4 3/5] net: wwan: t7xx: Creates region & snapshot for coredump log collection Jinjian Song
2023-09-12 9:48 ` [net-next v4 4/5] net: wwan: t7xx: Adds sysfs attribute of modem event Jinjian Song
2023-09-13 14:16 ` Simon Horman [this message]
2023-09-12 9:48 ` [net-next v4 5/5] net: wwan: t7xx: Devlink documentation Jinjian Song
2023-09-13 14:08 ` Simon Horman
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=20230913141658.GV401982@kernel.org \
--to=horms@kernel.org \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=corbet@lwn.net \
--cc=danielwinkler@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haijun.liu@mediatek.com \
--cc=jinjian.song@fibocom.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxwwan@intel.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=nmarupaka@google.com \
--cc=pabeni@redhat.com \
--cc=ricardo.martinez@linux.intel.com \
--cc=ryazanov.s.a@gmail.com \
--cc=songjinjian@hotmail.com \
--cc=vsankar@lenovo.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.