[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200427054023.GA3311@Mani-XPS-13-9360>
Date: Mon, 27 Apr 2020 11:10:23 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Chris Lew <clew@...eaurora.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
netdev@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hemant Kumar <hemantk@...eaurora.org>,
Jeffrey Hugo <jhugo@...eaurora.org>,
Kalle Valo <kvalo@...eaurora.org>,
Siddartha Mohanadoss <smohanad@...eaurora.org>
Subject: Re: [PATCH v2 2/3] net: qrtr: Add MHI transport layer
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
Powered by blists - more mailing lists