Skip to content

Commit

Permalink
can: j1939: j1939_session_tx_dat(): use consistent name se_skcb for s…
Browse files Browse the repository at this point in the history
…ession skb control buffer

This patch changes the name of the "skcb" variable in
j1939_session_tx_dat() to "se_skcb" as it's the session skb's control
buffer. The same name is used in other functions for the session skb's
control buffer.

Cc: Robin van der Gracht <robin@protonic.nl>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20210616102811.2449426-5-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Jul 25, 2021
1 parent 7ac56e4 commit 78b77c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/can/j1939/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ static int j1939_session_tx_dpo(struct j1939_session *session)
static int j1939_session_tx_dat(struct j1939_session *session)
{
struct j1939_priv *priv = session->priv;
struct j1939_sk_buff_cb *skcb;
struct j1939_sk_buff_cb *se_skcb;
int offset, pkt_done, pkt_end;
unsigned int len, pdelay;
struct sk_buff *se_skb;
Expand All @@ -788,7 +788,7 @@ static int j1939_session_tx_dat(struct j1939_session *session)
if (!se_skb)
return -ENOBUFS;

skcb = j1939_skb_to_cb(se_skb);
se_skcb = j1939_skb_to_cb(se_skb);
tpdat = se_skb->data;
ret = 0;
pkt_done = 0;
Expand All @@ -800,15 +800,15 @@ static int j1939_session_tx_dat(struct j1939_session *session)

while (session->pkt.tx < pkt_end) {
dat[0] = session->pkt.tx - session->pkt.dpo + 1;
offset = (session->pkt.tx * 7) - skcb->offset;
offset = (session->pkt.tx * 7) - se_skcb->offset;
len = se_skb->len - offset;
if (len > 7)
len = 7;

if (offset + len > se_skb->len) {
netdev_err_once(priv->ndev,
"%s: 0x%p: requested data outside of queued buffer: offset %i, len %i, pkt.tx: %i\n",
__func__, session, skcb->offset,
__func__, session, se_skcb->offset,
se_skb->len , session->pkt.tx);
ret = -EOVERFLOW;
goto out_free;
Expand Down

0 comments on commit 78b77c7

Please sign in to comment.