From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Chris Lew <clew@codeaurora.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hemant Kumar <hemantk@codeaurora.org>,
Jeffrey Hugo <jhugo@codeaurora.org>,
Kalle Valo <kvalo@codeaurora.org>,
Siddartha Mohanadoss <smohanad@codeaurora.org>
Subject: Re: [PATCH v2 2/3] net: qrtr: Add MHI transport layer
Date: Mon, 27 Apr 2020 11:10:23 +0530 [thread overview]
Message-ID: <20200427054023.GA3311@Mani-XPS-13-9360> (raw)
In-Reply-To: <85591553-f1f2-a7c9-9c5a-58f74ebeaf38@web.de>
On Sun, Apr 26, 2020 at 03:45:41PM +0200, Markus Elfring wrote:
> > Hence, this commit adds MHI transport layer support to QRTR for
> > transferring the QMI messages over IPC Router.
>
> I suggest to reconsider software development consequences around
> another implementation detail.
>
>
> …
> > +static int qcom_mhi_qrtr_send(struct qrtr_endpoint *ep, struct sk_buff *skb)
> > +{
> …
> > + rc = mhi_queue_skb(qdev->mhi_dev, DMA_TO_DEVICE, skb, skb->len,
> > + MHI_EOT);
> > + if (rc) {
> > + kfree_skb(skb);
> > + return rc;
> > + }
> …
> > +}
>
> I propose again to add a jump target so that a bit of exception handling code
> can be better reused at the end of this function implementation.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=b2768df24ec400dd4f7fa79542f797e904812053#n450
>
Matter of taste! goto's are really useful if there are multiple exit paths
available. But in this case there is only one and I don't think we may add
anymore in future. So I'll keep it as it is.
Thanks,
Mani
> + if (rc)
> + goto free_skb;
> …
> + return rc;
> +
> +free_skb:
> + kfree_skb(skb);
> + return rc;
> +}
>
>
> Regards,
> Markus
next prev parent reply other threads:[~2020-04-27 5:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-26 13:45 [PATCH v2 2/3] net: qrtr: Add MHI transport layer Markus Elfring
2020-04-27 5:40 ` Manivannan Sadhasivam [this message]
2020-04-27 6:50 ` [v2 " Markus Elfring
2020-04-27 6:57 ` Manivannan Sadhasivam
[not found] <20200402053610.9345-1-manivannan.sadhasivam@linaro.org>
2020-04-02 5:36 ` [PATCH v2 " Manivannan Sadhasivam
2020-04-02 5:49 ` Bjorn Andersson
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=20200427054023.GA3311@Mani-XPS-13-9360 \
--to=manivannan.sadhasivam@linaro.org \
--cc=Markus.Elfring@web.de \
--cc=bjorn.andersson@linaro.org \
--cc=clew@codeaurora.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=hemantk@codeaurora.org \
--cc=jhugo@codeaurora.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=smohanad@codeaurora.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