public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
	davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	Tom Rix <trix@redhat.com>,
	netdev@vger.kernel.org, richardcochran@gmail.com,
	vinicius.gomes@intel.com,
	Simon Horman <simon.horman@corigine.com>,
	Sasha Neftin <sasha.neftin@intel.com>,
	Naama Meir <naamax.meir@linux.intel.com>
Subject: Re: [PATCH net 1/1] igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp()
Date: Thu, 2 Feb 2023 14:04:00 +0100	[thread overview]
Message-ID: <Y9u0wOxgx5ciMYC7@nanopsycho> (raw)
In-Reply-To: <20230201100454.61f32747@kernel.org>

Wed, Feb 01, 2023 at 07:04:54PM CET, kuba@kernel.org wrote:
>On Wed, 1 Feb 2023 10:12:27 +0100 Jiri Pirko wrote:
>> >@@ -652,7 +655,8 @@ static void igc_ptp_tx_hwtstamp(struct igc_adapter *adapter)
>> > 
>> > 	regval = rd32(IGC_TXSTMPL);
>> > 	regval |= (u64)rd32(IGC_TXSTMPH) << 32;
>> >-	igc_ptp_systim_to_hwtstamp(adapter, &shhwtstamps, regval);
>> >+	if (igc_ptp_systim_to_hwtstamp(adapter, &shhwtstamps, regval))  
>> 
>> Use variable to store the return value.
>
>Is that a rule.. IDK.. there's probably worse code in this driver 🤷️

Well, it was in the past at least. I recall DaveM wanted it that way.
And I think it makes sense. Makes the code easier to follow.


>The return value can't be propagated further anyway, since this is 
>a work.

  reply	other threads:[~2023-02-02 13:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 21:54 [PATCH net 1/1] igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp() Tony Nguyen
2023-02-01  9:12 ` Jiri Pirko
2023-02-01 18:04   ` Jakub Kicinski
2023-02-02 13:04     ` Jiri Pirko [this message]
2023-02-02  5:30 ` patchwork-bot+netdevbpf

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=Y9u0wOxgx5ciMYC7@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=naamax.meir@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=sasha.neftin@intel.com \
    --cc=simon.horman@corigine.com \
    --cc=trix@redhat.com \
    --cc=vinicius.gomes@intel.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