public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Vivek Pernamitta <quic_vpernami@quicinc.com>
Cc: mhi@lists.linux.dev, mrana@quicinc.com, quic_qianyu@quicinc.com,
	manivannan.sadhasivam@linaro.org,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1] net: mhi : Add support to enable ethernet interface
Date: Fri, 30 Jun 2023 15:13:20 +0200	[thread overview]
Message-ID: <ZJ7U8D1Ej63lX06g@corigine.com> (raw)
In-Reply-To: <1688118281-13032-1-git-send-email-quic_vpernami@quicinc.com>

On Fri, Jun 30, 2023 at 03:14:41PM +0530, Vivek Pernamitta wrote:
> Add support to enable ethernet interface for MHI SWIP channels.
> 
> Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com>

...

> @@ -301,11 +318,17 @@ static void mhi_net_rx_refill_work(struct work_struct *work)
>  		schedule_delayed_work(&mhi_netdev->rx_refill, HZ / 2);
>  }
>  
> -static int mhi_net_newlink(struct mhi_device *mhi_dev, struct net_device *ndev)
> +static int mhi_net_newlink(struct mhi_device *mhi_dev, struct net_device *ndev, bool eth_dev)
>  {
>  	struct mhi_net_dev *mhi_netdev;
>  	int err;
>  
> +	if (eth_dev) {
> +		eth_random_addr(ndev->dev_addr);
> +		if (!is_valid_ether_addr(ndev->dev_addr))
> +			return -EADDRNOTAVAIL;
> +	}

Hi Vivek,

This doesn't seem right.
As GCC points out, dev_addr is const.
And I don't think eth_random_addr() produces invalid addresses.

Perhaps you want eth_hw_addr_random() here.

As was mentioned elsewhere in this thread, net-next, is closed.
So please post a v2 once it re-opens, after 10th July.

-- 
pw-bot: changes-requested


  parent reply	other threads:[~2023-06-30 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  9:44 [PATCH V1] net: mhi : Add support to enable ethernet interface Vivek Pernamitta
2023-06-30  9:55 ` Vivek Pernamitta
2023-06-30 11:55 ` Daniele Palmas
2023-06-30 13:13 ` Simon Horman [this message]
2023-06-30 13:46 ` kernel test robot
2023-07-02 13:37 ` kernel test robot
2023-07-11  7:50 ` kernel test robot

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=ZJ7U8D1Ej63lX06g@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mhi@lists.linux.dev \
    --cc=mrana@quicinc.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_qianyu@quicinc.com \
    --cc=quic_vpernami@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox