From: Herve Codina <herve.codina@bootlin.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@google.com>,
Mark Brown <broonie@kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Jakub Kicinski <kuba@kernel.org>,
linuxppc-dev@lists.ozlabs.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2 5/6] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support
Date: Mon, 5 Feb 2024 16:00:33 +0100 [thread overview]
Message-ID: <20240205160033.2c017f46@bootlin.com> (raw)
In-Reply-To: <a8845eca2d9bab5d7805c19a16811820671c41f2.camel@redhat.com>
Hi Paolo,
On Thu, 01 Feb 2024 13:01:51 +0100
Paolo Abeni <pabeni@redhat.com> wrote:
[...]
> >
> > +static int qmc_hdlc_xlate_slot_map(struct qmc_hdlc *qmc_hdlc,
> > + u32 slot_map, struct qmc_chan_ts_info *ts_info)
> > +{
> > + DECLARE_BITMAP(ts_mask_avail, 64);
> > + DECLARE_BITMAP(ts_mask, 64);
> > + DECLARE_BITMAP(map, 64);
> > + u32 array32[2];
> > +
> > + /* Tx and Rx available masks must be identical */
> > + if (ts_info->rx_ts_mask_avail != ts_info->tx_ts_mask_avail) {
> > + dev_err(qmc_hdlc->dev, "tx and rx available timeslots mismatch (0x%llx, 0x%llx)\n",
> > + ts_info->rx_ts_mask_avail, ts_info->tx_ts_mask_avail);
> > + return -EINVAL;
> > + }
> > +
> > + bitmap_from_arr64(ts_mask_avail, &ts_info->rx_ts_mask_avail, 64);
> > + array32[0] = slot_map;
> > + array32[1] = 0;
> > + bitmap_from_arr32(map, array32, 64);
>
> What about using bitmap_from_u64 everywhere ?
Yes indeed.
Will be updated in the next series iteration.
Thanks for this review.
Best regards,
Hervé
next prev parent reply other threads:[~2024-02-05 15:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 8:40 [PATCH v2 0/6] Add support for QMC HDLC Herve Codina
2024-01-30 8:40 ` [PATCH v2 1/6] net: wan: " Herve Codina
2024-02-01 11:41 ` Paolo Abeni
2024-02-05 14:22 ` Herve Codina
2024-02-05 15:49 ` Paolo Abeni
2024-02-05 16:35 ` Herve Codina
2024-01-30 8:40 ` [PATCH v2 2/6] MAINTAINERS: Add the Freescale QMC HDLC driver entry Herve Codina
2024-01-30 8:40 ` [PATCH v2 3/6] bitmap: Make bitmap_onto() available to users Herve Codina
2024-01-30 8:40 ` [PATCH v2 4/6] bitmap: Introduce bitmap_off() Herve Codina
2024-01-30 8:40 ` [PATCH v2 5/6] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support Herve Codina
2024-02-01 12:01 ` Paolo Abeni
2024-02-05 15:00 ` Herve Codina [this message]
2024-01-30 8:40 ` [PATCH v2 6/6] net: wan: fsl_qmc_hdlc: Add framer support Herve Codina
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=20240205160033.2c017f46@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vadim.fedorenko@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).