mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaomeng Tong <xiam0nd.tong@gmail.com>
To: jakobkoschel@gmail.com
Cc: davem@davemloft.net, kuba@kernel.org, kvalo@kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, pizza@shaftnet.org,
	xiam0nd.tong@gmail.com
Subject: Re: [PATCH] cw1200: remove an unneeded NULL check on list iterator
Date: Sun, 20 Mar 2022 09:53:02 +0800	[thread overview]
Message-ID: <20220320015302.6883-1-xiam0nd.tong@gmail.com> (raw)
In-Reply-To: <EFA8A102-59B2-4FC6-AB2E-CA8311E11635@gmail.com>

On Sun, 20 Mar 2022 01:47:26 +0100, Jakob Koschel
<jakobkoschel@gmail.com> wrote:  
> I don't think this is fixing anything here. You are basically just removing
> a check that was always true.

Yes.

> 
> I'm pretty sure that this check is here to check if either the list is empty or no
> element was found. If I'm not wrong, some time ago, lists where not circular but
> actually pointed to NULL (or the head was NULL) so this check made sense but doesn't
> anymore.
> 
> The appropriate fix would be only setting 'item' when a break is hit and keep
> the original check.

You are right if that is the author's original intention. I will fix it in PATCH v2.

> 
> > 			unsigned long tmo = item->queue_timestamp + queue->ttl;
> > 			mod_timer(&queue->gc, tmo);
> > 			cw1200_pm_stay_awake(&stats->priv->pm_state,
> > -- 
> > 2.17.1
> > 
> > 
> 
> I've made those changes already and I'm in the process of upstreaming them in an organized
> way, so maybe it would make sense to synchronize, so we don't post duplicate patches.

Ok, I will cc you when sending related patches to avoid duplication.
I hope you can do the same, thank you.

Here are the 9 patches I have sent, so you don't have to reinvent th wheel:
https://lore.kernel.org/all/20220319102222.3079-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319073143.30184-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319063800.28791-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319053742.27443-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319052350.26535-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319044416.24242-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319043606.23292-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220319042657.21835-1-xiam0nd.tong@gmail.com/
https://lore.kernel.org/all/20220316075153.3708-1-xiam0nd.tong@gmail.com/

--
Xiaomeng Tong

      reply	other threads:[~2022-03-20  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-19  6:38 Xiaomeng Tong
2022-03-20  0:47 ` Jakob Koschel
2022-03-20  1:53   ` Xiaomeng Tong [this message]

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=20220320015302.6883-1-xiam0nd.tong@gmail.com \
    --to=xiam0nd.tong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jakobkoschel@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pizza@shaftnet.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

all inboxes | Powered by JetHome®